vi /etc/profile
export JAVA_HOME=/usr/java/jdk1.8.0_121
export JRE_HOME=/usr/java/jdk1.8.0_121/jre
export CATALINA_BASE=/home/xxx/apache-tomcat-8.5.11
export CATALINA_HOME=/home/xxx/apache-tomcat-8.5.11
export CLASSPATH=.:${CATALINA_HOME}/bin/tomcat-juli.jar:${CATALINA_HOME}/bin/bootstrap.jar:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar:$JAVA_HOME_8/jre/libexport PATH=$JAVA_HOME_8/bin:$JRE_HOME/bin:$PATH
source /etc/profile
vi */bin/catalina.sh
export JAVA_HOME=$JAVA_HOME
export JRE_HOME=$JRE_HOME
export CATALINA_BASE=$CATALINA_BASE
export CATALINA_HOME=$CATALINA_HOME
export CLASSPATH=$CLASSPATH
export PATH=$PATH