tar xf jdk-7u67-linux-x64.tar.gz
#vim /etc/profile.d/java.sh
export JAVA_HOME=/usr/local/java
export PATH=$JAVA_HOME/bin:$PATH
#source /etc/profile.d/java.sh
#java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
二. 安装tomcat:
mv apache-tomcat-7.0.73 /usr/local/tomcat
useradd -d /usr/local/tomcat tomcat
#chown tomcat.tomcat /usr/local/tomcat/ -R
#cd /usr/local/tomcat/
bin 命令:shutdown.sh 关闭tomcat;startup.sh启动tomcat
lib java的库 .jar
logs 日志
temp 临时文件
work 运行JSP脚本需要的class文件
conf 配置文件
webapps DocumentRoot
三. 启动tomcat :
cd bin/
./startup.sh
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/local/java
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.
#netstat -tanp |grep 8080
tcp 0 0 :::8080 :::* LISTEN 2045/java
原文地址:http://blog.51cto.com/13553337/2097646