Linux 搭建tomcat
参考:http://jingyan.baidu.com/article/6525d4b1382f0aac7d2e9421.html
1.准备
安装jre
rpm -ivh xxxx/java.rpm
解压tomcat
tar zxvf xxx.tar.gz
2.vi startup.sh
添加
#chkconfig: 2345 80 90
#description:tomcat auto start
#processname: tomcat
3.vi catalina.sh
添加
export CATALINA_BASE=/xx/tomcat
export CATALINA_HOME=/xx/tomcat
export CATALINA_TMPDIR=/xx/tomcat
4.链接
ln -s /xx/bin/startup.sh /etc/rc.d/init.d/tomcat7
5.可执行权限
cd /etc/rc.d/init.d/
ls -l
添加x权限: chmod +x tomcat7
6.添加启动项
chkconfig --add tomcat7
查看启动项: chkconfig --list
7.启动tomcat
sh startup.sh