标签:
1. 安装eclipse
2. 安装eclipse需要的组件
3. 安装Tomcat (参考:在mac系统安装Apache Tomcat的详细步骤)
执行脚本:startup.sh,在 Mac终端输入:sh startup.sh
Mac下tomcat启动 Cannot find ./catalina.sh 的解决方法:
Cannot find ./catalina.sh
The file is absent or does not have execute permission
This file is needed to run this program
没有给bin目录下的文件授权可执行权限:
chmod +x bin/*.sh
若已经在bin目录下了,就在Mac终端直接执行 chmod +x *.sh
Mac下出现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 的解决方法:
是因为系统没有安装java环境,只需要打开命令行,输入:java -version,系统将会引导你安装java环境,你直接安装就可以了。
出现下面的提示说明Tomcat启动成功:
SunMmdeiMac:bin qianjing$ sh startup.sh
Using CATALINA_BASE: /usr/local/apache-tomcat-7.0.57
Using CATALINA_HOME: /usr/local/apache-tomcat-7.0.57
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-7.0.57/temp
Using JRE_HOME: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Using CLASSPATH: /usr/local/apache-tomcat-7.0.57/bin/bootstrap.jar:/usr/local/apache-tomcat-7.0.57/bin/tomcat-juli.jar
Tomcat started.
打开safari浏览器,然后输入网址 http://localhost:8080
如果能正常打开tomcat首页,说明tomcat 配置启动成功。
4. eclipse下配置tomcat(参考:http://jingyan.baidu.com/article/ca2d939dd90183eb6d31ce79.html)
标签:
原文地址:http://www.cnblogs.com/sunminmin/p/4210026.html