jdk安装
wget http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html ##需要进去,点介绍协议,下载jdk8
tar zxvf jdk-8u144-linux-x64.tar.gz
mv jdk1.8.0_144/ /usr/local/jdk8.0
echo "JAVA_HOME=/usr/local/jdk8.0
JAVA_BIN=/usr/local/jdk8.0/bin
PATH=$PATH:$JAVA_BIN
CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME JAVA_BIN PATH CLASSPATH " >> /etc/profile
source /etc/profile
tomcat 安装
wget http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.0.46/bin/apache-tomcat-8.0.46.tar.gz
tar zxvf apache-tomcat-8.0.46.tar.gz
mv apache-tomcat-8.0.46 /usr/local/tomcat8.0
ln -s /usr/local/tomcat8.0/ /usr/local/tomcat
cd /usr/local/tomcat/bin/
echo "CATALINA_HOME=/usr/local/tomcat8.0/" >> catalina.sh
chmod +x *.sh
./startup.sh