标签:jdk tomcat
### 安装jdk
tar xf jdk-8u73-linux-x64.tar.gz
mv jdk1.8.0_73 /usr/local/jdk1.8.0_73
#配置
echo ‘
export JAVA_HOME=/usr/local/jdk1.8.0_73
export JRE_HOME=/usr/local/jdk1.8.0_73
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JAVA_HOME/bin:$PATH
PATH=/usr/local/jdk1.8.0_73/bin:/usr/local/jdk1.8.0_73/jre/bin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:/root/bin
export PATH
‘ >> /etc/profile ;
source /etc/profile;
#或者
echo ‘
JAVA_HOME=/usr/local/jdk1.8.0_73
JAVA_BIN=/usr/local/jdk1.8.0_73/bin
JRE_HOME=/usr/local/jdk1.8.0_73/jre
PATH=$PATH:/usr/local/jdk1.8.0_73/bin:/usr/local/jdk1.8.0_73/jre/bin
CLASSPATH=/usr/local/jdk1.8.0_73/jre/lib:/usr/local/jdk1.8.0_73/lib:/usr/local/jdk1.8.0_73/jre/lib/charsets.jar
‘ >> /etc/profile.d/java.sh
source /etc/profile.d/java.sh
#查看
java -version
### 安装tomcat
tar xf apache-tomcat-8.0.32.tar.gz
mv apache-tomcat-8.0.32 /usr/local/tomcat8
cp -pv /usr/local/tomcat8/bin/catalina.sh /etc/init.d/tomcat
vim /etc/init.d/tomcat
#!/bin/sh
# chkconfig: 2345 63 37
# description: tomcat server init script
# Source Function Library
. /etc/init.d/functions
JAVA_HOME=/usr/local/jdk1.8.0_73
CATALINA_HOME=/usr/local/tomcat8
chmod 755 /etc/init.d/tomcat
chkconfig --add tomcat
chkconfig tomcat on
service tomcat start
ps aux |grep tomcat
本文出自 “tang” 博客,请务必保留此出处http://tang028.blog.51cto.com/10011574/1859782
标签:jdk tomcat
原文地址:http://tang028.blog.51cto.com/10011574/1859782