1、下载Tomcat,网址:http://tomcat.apache.org/download-70.cgi

2、进入终端Terminal,打开配置文件.bash_profile,输入open .bash_profile;

3、在配置文件中输入:export PATH=$PATH:/Library/apache-tomcat-7.0.72/bin并保存;

4、在终端输入source .bash_profile使配置生效;

5、在终端输入startup.sh启动Tomcat,显示以下信息则配置成功:

Using CATALINA_BASE:   /Library/apache-tomcat-7.0.72

Using CATALINA_HOME:   /Library/apache-tomcat-7.0.72

Using CATALINA_TMPDIR: /Library/apache-tomcat-7.0.72/temp

Using JRE_HOME:        /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home

Using CLASSPATH:       /Library/apache-tomcat-7.0.72/bin/bootstrap.jar:/Library/apache-tomcat-7.0.72/bin/tomcat-juli.jar

Tomcat started.

6、在浏览器中输入http://localhost:8080/,能打开Tomcat首页则配置成功。

05-11 16:55