centos7- extracting installation java1.8 / jdk1.8
background:
Development needs java environment, centos built openjdk, but the kind of uncontrolled feeling very bad, I personally prefer the custom.
He said that, java environment is very simple to install, can be installed directly through yum command, did not say in detail here, I'm a programmer, I prefer the kind of java environment like windows in a folder
In bash input which java
can see the path /usr/bin
under, /usr/bin
under a lot of executable command file, java environment in this way is really disgusting. So I deleted this openjdk the compressed file is installed directly from the official website.
step
-
Obtain official website files, get into the oracle official website
-
Extracting tar -zxvf ****
-
Move into their specified path, people like to install
/usr/local
mv **** /usr/local/java
-
Configuration environment variable vi / etc / profile
#set java environment #JAVA_HOME自己的安装的路径 JAVA_HOME=/usr/local/java JRE_HOME=$JAVA_HOME/jre PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib export JAVA_HOME JRE_HOME PATH CLASSPATH
-
carry out
Reproduced in: https: //my.oschina.net/suveng/blog/3056704