./startup.sh
提示错误:
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program
修改setclasspath.sh:增加JDK环境变量
export JAVA_HOME=/usr/lib/jvm/SunJDK/jdk1.6.0_25 export JRE_HOME=/usr/lib/jvm/SunJDK/jdk1.6.0_25/jre
# Make sure prerequisite environment variables are set
if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
# Bugzilla 37284 (reviewed).
if $darwin; then
if [ -d "/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home" ]; then
export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home"
再运行即可:
./startup.sh
Using CATALINA_BASE: /opt/apache-tomcat-7.0.12
Using CATALINA_HOME: /opt/apache-tomcat-7.0.12
Using CATALINA_TMPDIR: /opt/apache-tomcat-7.0.12/temp
Using JRE_HOME: /usr/lib/jvm/SunJDK/jdk1.6.0_25/jre
Using CLASSPATH: /opt/apache-tomcat-7.0.12/bin/bootstrap.jar:/opt/apache-tomcat-7.0.12/bin/tomcat-juli.jar
登录http://localhost:8080/
四,MySQL 安装