linux下部署tomcat应用


相关软件下载

解压jdk以及tomcat包
[root@localhost soft]# tar -zxvf apache-tomcat-8.0.30.tar.gz
[root@localhost soft]# tar -zxvf jdk-8u65-linux-x64.tar.gz
[root@localhost soft]# mv jdk-8u65-linux-x64.tar.gz jdk
[root@localhost soft]# mv apache-tomcat-8.0.30 tomcat

修改环境变量
进入/etc/profile中,加入下面4行数据
export JAVA_HOME=/soft/jdk
export JRE__HOME=/soft/jdk/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib


进入/soft/tomcat/bin目录下,启动
[root@localhost bin]# ./startup.sh 
Using CATALINA_BASE:   /soft/tomcat
Using CATALINA_HOME:   /soft/tomcat
Using CATALINA_TMPDIR: /soft/tomcat/temp
Using JRE_HOME:        /soft/jdk
Using CLASSPATH:       /soft/tomcat/bin/bootstrap.jar:/soft/tomcat/bin/tomcat-juli.jar
Tomcat started.


cat /soft/tomcat/logs/catalina.out 
23-Jan-2016 15:11:41.130 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 2827 ms


访问网页,http://ip:9999