Install JDK in RedHat 6.1 and redhat6.1 install jdk
I have been using Ubuntu for Hadoop learning. Recently, I need to deploy the production environment. The server is changed to RedHat. I also recorded the installation of JDK in RedHat 6.1, compare it with JDK 8 installed on Ubuntu 14.04.
Download JDK
You can download it from the Oracle official website or through the command line.
$ wget -c http://download.oracle.com/otn-pub/java/jdk/8u20-b26/jdk-8u20-linux-x64.tar.gz?AuthParam=1413271341_9a3119e730583f5388664bfa2b4eb0a7
Unzip and install
$ tar xzvf jdk-8u5-linux-x64.tar.gz
In order to save trouble, the installation can end here. In fact, there is no need to do any link or move the location. linux is just for freedom.
Configure Environment Variables
Add environment variables to the system, including PATH, CLASSPATH, and JAVA_HOME.
$ vi ~/.bashrc
When there is a file. bash_profile in RedHat, it is used to add user-defined configuration, but it is still used to. bashrc.
Add at the end of the file
export JAVA_HOME=~/jdk1.8.0_05export JRE_HOME=$JAVA_HOME/jreexport CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/libexport PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$HADOOP_HOME/sbin:$PATH
Save and exit, and make the script take effect:
$ source ~/.bashrc
Verify that the installation is successful
$ java -version
If the following information is printed, the operation is successful.
java version "1.8.0_05"Java(TM) SE Runtime Environment (build 1.8.0_05-b13)Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
How does one install the Redhat linux system on a virtual machine and install JDK 16?
Networking:
Yum upgrade jdk
Or
Yum remove jdk
Yum install jdk remember to select the correct version
Go to the next jdk1.6 software package to install the SDK.
An error occurred while installing JDK 7 in redhat.
Jdk version too high