步骤
下载 Tomcat ,我下的是Tomcat 7.0.12
解压,文件夹改名为Tomcat
移动该文件夹,至你习惯的目录,比如/Library
执行/Library/Tomcat/bin下的startup.sh
打开http://localhost:8080查看是否Tomcat已经启动
解决文件权限问题:sudo chmod 755 /Library/Tomcat/bin/*.sh
定义JAVA_HOME,在/etc/profile中新增:export JAVA_HOME=/Library/Java/Home
配置
在/Library/Tomcat/conf/tomcat-users.xml文件合适位置加上
role rolename="tomcat"/>
< role rolename ="role1" />
< role rolename ="manager" />
< role rolename ="admin" />
< role rolename ="admin-gui" />
< role rolename ="admin-script" />
< role rolename ="manager-gui" />
< role rolename ="manager-script" />
< role rolename ="manager-jmx" />
< role rolename ="manager-status" />
< user username ="admin" password ="admin"
roles ="admin,manager,role1,tomcat,admin-gui,admin-
script,manager-gui,manager-script,manager-jmx,manager-status" />
好了,你可以使用用户名密码均是admin,来进行web管理了。