Linux installation hadoop installation jdk
Install jdk. Net on centos.
1. Go to the official website to download the installation package. This is jdk-7u79-linux-x64.rpm.
2. Set up a usr/java directory in centos. You only need to mkdir java under usr.
3. Upload rpm package. Rz jdk-7u79-linux-x64.rpm . If you cannot execute the rz command, yum install lrzsz-y.
4. Install # rpm-ivh jdk-7u79-linux-x64.rpm.
5. Configure environment variables.
Enter / etc/profile and add at the end of the file
Export JAVA_HOME=/usr/java/jdk1.7.0_79
Export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
Export PATH=$PATH:$JAVA_HOME/bin
6 、 source / etc/profile
7. Java-version to view the version.
8. The result is
[root@test1 java] # java-version
Java version "1.7.045"
OpenJDK Runtime Environment (rhel-2.4.3.3.el6-x86_64 u45-b15)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)
9. Uninstall the original installation of jdk. (should uninstall the one in the installation first).
Find java
Rpm-qa | grep java
Java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.x86_64
Tzdata-java-2013g-1.el6.noarch
Java-1.6.0-openjdk-1.6.0.0-1.66.1.13.0.el6.x86_64
10. I originally wanted to uninstall it, but later I found that I didn't have to uninstall it. Wait till I learn to write.