在 Centos 6.4 上,我正在尝试根据本教程运行多个 tomcat 实例: http ://www.openlogic.com/wazi/bid/188102/
为了说明问题,我将默认配置复制到/srv/tomcat/solr
保持相同默认端口值的新实例(并停止默认服务 /etc/init.d/tomcat6 以避免端口冲突),如下所示:
sudo su -
yum install tomcat6
name=solr
mkdir -p /srv/tomcat/${name}/logs
mkdir /srv/tomcat/${name}/webapps
mkdir /srv/tomcat/${name}/work
mkdir /srv/tomcat/${name}/temp
cp -R /usr/share/tomcat6/conf/ /srv/tomcat/${name}
#rm /srv/tomcat/${name}/conf/tomcat6.conf # this line is not in the tutorial, but adding it produces the same result
chown -R tomcat. /srv/tomcat/
ln -s /etc/init.d/tomcat6 /etc/init.d/${name}
cat >/etc/sysconfig/${name} <<EOF
CATALINA_BASE="/srv/tomcat/${name}"
CATALINA_PID="/var/run/${name}.pid"
CONNECTOR_PORT="8080"
TOMCAT_LOG="/srv/tomcat/${name}/logs/catalina.out"
EOF
# I keep the default port values at: /srv/tomcat/solr/conf/server.xml
/etc/init.d/tomcat6 stop # to avoid port conflicts
/etc/init.d/${name} start # i start my new instance
[root@localhost ~]# /etc/init.d/${name} start
Starting solr: [ OK ]
[root@localhost ~]# /etc/init.d/${name} status
PID file exists, but process is not running [FAILED]
[root@localhost ~]# cat /srv/tomcat/solr/logs/catalina.out
/usr/sbin/tomcat6: line 30: /srv/tomcat/solr/logs/catalina.out: Permission denied
可能是什么问题?