Today, a simple pseudo-distributed cluster of Hadoop was built, with three CentOS systems on a virtual machine, but the password was forgotten. I would like to install a set of Oraclelinux, because of the time, or decided to check the method of retrieving the CentOS password. Make a record for easy access.
1. All passwords have been forgotten.
Press and hold ESC, enter an interface, select the second item by E, enter a space of +1, and then select the second item by B to enter the root screen.
passwd Root Reset root password
passwd centos Reset CentOS user password
Vi/etc/inittab 3,5 graphical and command line switching
Vi/etc/shadow file saved by user password
Shutdown-r now reboot
Who view current logged in user
Last View user login record
Tips : You can not skip the problem, you need to actively consult the data to solve the problem, so as to progress.
Service iptables Status View firewall state
Service iptables Stop shutting down the firewall
Installation of the JDK
Tar zxvf./jdk-8u91-linux-x64.tar.gz-c/usr/java
Gedit ~/.BASHRC
Export java_home=/usr/java/jdk1.8.0_91
Export JRE_HOME=${JAVA_HOME}/JRE
Export Classpath=.:${java_home}/lib:${jre_home}/lib
Export Path=${java_home}/bin: $PATH
SOURCE ~/.BASHRC
Java-version
which installation path for Java programs:/usr/local/apps/jdk1.7.0_79/bin/java
Linux password retrieval, graphical interface and command line switching and common commands, installation (JDK)