Tomcat

1、安装JDK
tar xf tar xf jdk-7u79-linux-x64.gz
mv jdk1.7.0_79/ /usr/local/
ln -s /usr/local/jdk1.7.0_79/ /usr/local/jdk
2、编写环境变量文件
vim /etc/profile
export JAVA_HOME=/usr/local/jdk
export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin
export CLASSPATH=.$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$JAVA_HOME/lib/tools.jar
声明
source /etc/profile
检查
java -version
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
3、安装Tomcat
tar xf apache-tomcat-6.0.41.tar.gz
ln -s /usr/local/apache-tomcat-6.0.41/ /usr/local/tomcat
也可以将tomcat路径写入环境变量
 echo "export PATH=$PATH:/usr/local/tomcat/bin">>/etc/profile
4、启动tomcat
/usr/local/tomcat/bin/startup.sh
或者
/usr/local/tomcat/bin/catalina.sh start
5、关闭tomcat
/usr/local/tomcat/bin/shutdown.sh
或者
/usr/local/tomcat/bin/catalina.sh stop
 
6、修订配置
vim /usr/local/tomcat/bin/catalina.sh
 
JAVA_HOME=/usr/local/jdk
JRE_HOME=/usr/local/jdk/jre
CATALINA_HOME=/usr/local/tomcat
CATALINA_PID=/tmp/tomcat.pid
posted @ 2016-06-02 14:08  毛葱  阅读(125)  评论(0编辑  收藏  举报