启动文件
拷贝tomcat6、tomcat6-1、tomcat6-1.conf文件到相应目录,并命名成相应名称(见附件)
/etc/init.d/tomcat6-1
/etc/tomcat6/tomcat6-1.conf 注意修改启动内存 加到/etc/tomcat6/tomcat6-1.conf
/usr/sbin/tomcat6
配置
/etc/tomcat6/tomcat6-1.conf文件
# Where your tomcat installation lives
CATALINA_BASE="/data/app/tomcat-6.0.44"
CATALINA_HOME="/data/app/tomcat-6.0.44"
CATALINA_TMPDIR="/data/app/tomcat-6.0.44"
JASPER_HOME="/data/app/tomcat-6.0.44/temp"
#tomcat安装目录,需要改地址
# What user should run tomcat
TOMCAT_USER="tomcat" #启动用户
# Set the TOMCAT_PID location
CATALINA_PID="/var/run/tomcat6/tomcat6.pid"
/etc/init.d/tomcat6-1文件
# Get the tomcat config (use this for environment specific settings)
TOMCAT_CFG="/etc/tomcat6/tomcat6-1.conf"
# Path to the tomcat launch script
TOMCAT_SCRIPT="/usr/sbin/tomcat6"
启动前准备
添加tomcat用户
useradd tomcat -M -s /sbin/nologin
变更一下目录属主与属组为tomcat
/data/app/tomcat-...
/data/data/app-log/
/var/run/tomcat6 #需要创建
启动
service tomcat6-1 start