tomcat及jdk安装配置文档
引自:http://blog.chinaunix.net/u1/40226/showart_314074.html
一.所需的文件 apache-tomcat-
二.安装步骤:
#gunzip apache-tomcat-
# tar xf apache-tomcat-
# mv apache-tomcat-
# chmod +x jdk-1_5_0_02-linux-i586.bin
# mv jdk-1_5_0_02 jdk
# cd jdk/bin
# ln –s /jdk/bin/java /usr/sbin/java
# cd /tomcat/bin
# vi startup.sh
添加 JAVA_HOME=/jdk
export JAVA_HOME
# vi shutdown.sh
添加 JAVA_HOME=/jdk
export JAVA_HOME
# vi Catalina.sh 添加下列红字部分
if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
. "$CATALINA_HOME"/bin/setenv.sh
fi
CATALINA_OPTS="-Djava.awt.headless=true"
#JAVA_OPTS="-Xms
JAVA_OPTS="-Xms
# For Cygwin, ensure paths are in UNIX format before anything is touched
# cd /tomcat/conf/
# vi tomcat-user.xml 添加下列红字部分
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="standard"/>
<role rolename="manager"/>
<role rolename="admin"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="zlwt" password="zlwt157" roles="standard,manager,admin"/>
</tomcat-users>
# vi server.xml 把里边的8080端口改为80
三.启动 tomcat
# cd /tomcat/bin/
# ./startup.sh
四.停止 tomcat
# ./shutdown.sh
# ps –ef |grep java 检查是否启动