Ubuntu tomcat
http://wiki.ubuntu.org.cn/Tomcat
sudo apt-get install tomcat7
sudo /etc/init.d/tomcat7 start
sudo /etc/init.d/tomcat7 stop
Tomcat 配置文件路径
Tomcat home directory : /usr/share/tomcat7 Tomcat base directory : /var/lib/tomcat7或/etc/tomcat7
设置Tomcat管理员帐号
Tomcat的用户帐号信息都保存在tomcat-users.xml的文件中,运行
sudo vi /var/lib/tomcat7/conf/tomcat-users.xml在</tomcat-users>的标签前添加一行
<user username="用户名" password="密码" roles="admin,manager"/>保存并关闭。重新运行tomcat即可输入该用户名和密码,登录Tomcat的管理页面。
设置80端口
sudo vi /etc/tomcat7/server.xml
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
->
<Connector executor="tomcatThreadPool"
port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
使端口生效
sudo vi /etc/default/tomcat7
#AUTHBIND=no
AUTHBIND=yes