1.centos6安装配置java:
# rpm -ivh jdk-8u111-linux-x64.rpm # vim /etc/profile.d/java.sh (新建) # . /etc/profile.d/java.sh
linux允许多java版本共存,此处也可写成固定版本:
2.centos6安装配置TOMCAT
# wget http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.5.13/bin/apache-tomcat-8.5.13.tar.gz (或者直接去官网复制链接) # tar xf apache-tomcat-8.5.13.tar.gz -C /usr/local/ # cd /usr/local/ # ln -sv apache-tomcat-8.5.13/ tomcat # cd tomcat # vim /etc/profile.d/tomcat.sh (新建) # . /etc/profile.d/tomcat.sh export CATALINA_HOME=/usr/local/tomcat export PATH=$CATALINA_HOME/bin:$PATH