码迷,mamicode.com
首页 > 系统相关 > 详细

Ubuntu将tomcat7 端口改为81

时间:2018-05-24 19:31:11      阅读:190      评论:0      收藏:0      [点我收藏+]

标签:tomcat

Ubuntu将tomcat7 端口改为81:

apt-get install authbind

vi /etc/default/tomcat7

AUTHBIND=yes (默认为#AUTHBIND=no)
:wq

vi /var/lib/tomcat7/conf/server.xml (默认为8080)

<Connector port="81" protocol="HTTP/1.1"
connectionTimeout="20000"
URIEncoding="UTF-8"
redirectPort="8443" />
:wq

touch /etc/authbind/byport/81

chown tomcat7:tomcat7 /etc/authbind/byport/81

chmod 0755 /etc/authbind/byport/81

service tomcat7 restart

netstat –ntpl | grep 81

Ubuntu将tomcat7 端口改为81

标签:tomcat

原文地址:http://blog.51cto.com/yangzhiming/2119994

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!