Build a JDK environment using CentOS
CentOS 7.0 & jdk1.8.0 _ 45
1. Upload the downloaded jdk package to the centos operating system through ssh.
Here is jdk-8u45-linux-x64.tar.gz download link: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2. decompress the package
tar -vxzf jdk-8u45-linux-x64.tar.gz
Obtain the jdk1.8.0 _ 45 folder, as shown in.
3. Edit System Environment Variables
vim /etc/profile
Add the following at the end of the file:
Export JAVA_HOME =/root/jdk1.8.0 _ 45 // you can change the export PATH according to the position of your jdk package. export PATH = $ JAVA_HOME/bin: $ PATH
4. execute commands. /etc/profile
Note: there is a space between. And /.
If the current directory is in/etc/, you can directly execute./profile. Here, there is no space between. And /.
5. Inputjava -versionTest
The above words are displayed, indicating that the configuration is successful!
Install JDK 1.8.0 _ 25 on Ubuntu 14.04 and configure Environment Variables
Install Oracle JDK 14.04 on Ubuntu 1.8 LTS
CentOS6.3 install JDK and environment Configuration
Install JDK 8 on Ubuntu 14.04
Install JDK graph analysis in Ubuntu