Linux (centos 7) ---- rpm installed configuration Series (six) java environment

   Today angry to restore their servers off, hey, so the need to re-configure the environment, introduce rpm installed and configured java environment, as follows:

    Beginning with wegt download jdk, but because there is no sign in so rejected, and look at what the Internet, said the way the cookie, do not know how, anyway, did not succeed, so had to take the jdk downloaded to the local, then by xftp to upload to the server. After a successful upload, cd to the directory where your jdk, in turn enter the following two commands:

rpm -ivh jdk-8u212-linux-x64.rpm
rpm -qpl jdk-8u212-linux-x64.rpm

After installation, you need to configure the environment variables:

vim / etc / profile at the end of insertion:

export JAVA_HOME=/usr/java/default
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

  source / etc / profile refresh save it!

 Finally, enter javac commands to see if installed correctly!

Guess you like

Origin www.cnblogs.com/lazydays/p/12078000.html
Recommended