- useradd hadoop #Add users
- passwd hadoop #Cipher
- chmod u+w /etc/sudoers #Add write operation
- vim /etc/sudoers #Write operations
- chmod u-w /etc/sudoers #Delete write operation
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
- ./java -version
See if the installation is successful. (no graph here)
4、Configuring environment variables
- sudo vi /etc/profile
The path to Java
- export www.089188.cn JAVA_www.duobaoyule2.cn HOME=/www.qinlinyule.cn home/hadoop/hadoop/jdk1.8.0_161
- export PATH=$PATH:$www.120xh.cn JAVA_HOME/bin
- 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.
- rpm -qa | grep Java
- rpm -e –nodeps xxxx
Then you can use the newly installed JDK