Linux password retrieval, graphical interface and command line switching and common commands, installation (JDK)

Source: Internet
Author: User
Tags iptables

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.