其它讲解:http://www.33lc.com/article/49352.html
错误:
Cannot find ./catalina.sh
The file is absent or does not have execute permission
This file is needed to run this program
或者
sh: startup.sh: No such file or directory
或者
sudo: Library/tomcat7/bin/startup.sh: command not found
都是因为没有给*.sh文件授权的问题
首页 sudo chmod 755 /Users/laoshi/Library/tomcat7/bin/*.sh
/Users/laoshi/Library/tomcat7/bin:tomcat 对应存放在电脑上的目录
mac 设置Tomcat的环境变量:
①输入touch .bash_profile ( pico .bash_profile 也行)
②打开 open -e .bash_profile(nano .bash_profile亦可)
③输入export PATH=$PATH:/Users/keso/Library/Tomcat8/bin
④更新配置的环境变量source .bash_profile
⑤验证是否成功,终端中输入$PATH
8.tomcat的管理程序
编辑conf目录下得tomcat-users.xml文件,添加manager 角色,设置用户名和密码
<!--
<role rolename =“manager-gui”/>
<user username =“root” password =“root” roles =“manager-gui”/>
7.0 以后使用这个设置管理器
-->
<role rolename ="manager-gui"/>
<user roles ="manager-gui" password="admin" username="admin"/>