尝试使用多个实例来完成Filip Hanik“大规模Tomcat部署”中描述的内容。无法在Mac OSX和Ubuntu上运行我的run.sh。同样的错误:
java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:218)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:407)
我的run.sh脚本:
#!/bin/bash
CONF="$1"
ACTION="$2"
if [ -z "$1" -o -z "$2" ]; then
echo "usage: run.sh <configuration> [start|stop]"
exit -1
fi
export CATALINA_BASE="`pwd`/$CONF"
export CATALINA_HOME="`pwd`/apache-tomcat-7.0.8"
exec "$CATALINA_HOME/bin/catalina.sh" "$ACTION"
Tomcat 7.0.8
/S