# java下载地址:https://www.oracle.com/technetwork/java/javase/downloads/index.html
[root@kazihuo ~]# mkdir -pv /usr/java
[root@kazihuo ~]# tar -axvf jdk-8u151-linux-x64.tar.gz -C /usr/java/
[root@kazihuo ~]# vim /etc/profile.d/java.sh #创建文件并添加以下信息;
JAVA_HOME=/usr/java/jdk1.8.0_151 PATH=$JAVA_HOME/bin:$PATH CLASSPATH=$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar export PATH JAVA_HOME CLASSPATH
[root@kazihuo ~]# source /etc/profile.d/java.sh
[root@kazihuo ~]# java -version
java version "1.8.0_151" Java(TM) SE Runtime Environment (build 1.8.0_151-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
JAVA_HOME=/usr/java/jdk1.7.0_55 PATH=$JAVA_HOME/bin:$PATH export JAVA_HOME
[root@kazihuo ~]# wget -P /usr/local/ http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.5.24/bin/apache-tomcat-8.5.24.tar.gz
[root@kazihuo /usr/local]# tar -axvf apache-tomcat-8.5.24.tar.gz
CATALINA_BASE=/usr/local/tomcat PATH=$CATALINA_BASE/bin:$PATH export CATALINA_BASE
-------------------------------------------------------------
转载请保留此段声明,且在文章页面明显位置给出原文链接,谢谢!
------------------------------------------------------------------------------
如果觉得这篇文章对你有小小的帮助的话,记得在右下角点个“推荐”哦,博主在此感谢!
------------------------------------------------------------------------------