linux下部署tomcat應用
相關軟件下載jdk http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html tomcat http://tomcat.apache.org/
解壓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/jdkexport JRE__HOME=/soft/jdk/jrePATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/binCLASSPATH=$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/tomcatUsing CATALINA_HOME: /soft/tomcatUsing CATALINA_TMPDIR: /soft/tomcat/tempUsing JRE_HOME: /soft/jdkUsing CLASSPATH: /soft/tomcat/bin/bootstrap.jar:/soft/tomcat/bin/tomcat-juli.jarTomcat 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
來自為知筆記(Wiz)