Article From:https://www.cnblogs.com/qwangxiao/p/9062718.html
[html] view plain copy

 
  1. useradd hadoop   #Add users
  2. passwd hadoop    #Cipher
  3. chmod u+w /etc/sudoers  #Add write operation
  4. vim /etc/sudoers   #Write operations
  5. chmod u-w /etc/sudoers  #Delete write operation

2、Download jdk-8u161-linux-x64.tar.gz

Just started downloading is the jdk-8u171-linux-x64.tar.gz version, in the decompression process prompts the mistake.

Later, the jre-8u161-linux-x64.tar.gz version was downloaded. Finally, no JPS was found, and the heart was tired.

3、Go into the bin directory and execute

[html] view plain copy

 
  1. ./java -version  

See if the installation is successful. (no graph here)

4、Configuring environment variables

[html] view plain copy

 
  1. sudo vi /etc/profile  

The path to Java

[html] view plain copy

 
  1. export www.089188.cn JAVA_www.duobaoyule2.cn HOME=/www.qinlinyule.cn home/hadoop/hadoop/jdk1.8.0_161  
  2. export PATH=$PATH:$www.120xh.cn  JAVA_HOME/bin  

Configuration effective

[html] view plain copy

 
  1. source /etc/profile  

Entrance to the pit:

1、After the configuration is completed, the openjdk is still displayed, even if it is changed to the correct Java path.

Since the installation is not a minimized version of CentOS, it contains JDK itself, so it is necessary to delete the original one.

[html] view plain copy

 
  1. rpm -qa | grep Java   
  2. rpm -e –nodeps xxxx  

Then you can use the newly installed JDK

Similar Posts:

Link of this Article: [html] view plain copy

Leave a Reply

Your email address will not be published. Required fields are marked *