我这里有好几个tomcat,同时使用的话就要给端口号改成不一样的:
1、首先cd进tomcat目录里的conf文件夹,vi打开server.xml配置文件
[root@localhost soft]# ls download redis solrhome tomcat-sina-8081 tomcat-souhu-8082 jdk redis-3.0.0.gem tomcat tomcat-solr zookeeper-3.4.6 [root@localhost soft]# cd tomcat-solr/ [root@localhost tomcat-solr]# cd conf/ [root@localhost conf]# ls Catalina catalina.properties logging.properties tomcat-users.xml catalina.policy context.xml server.xml web.xml [root@localhost conf]# vim server.xml
2、改动之一
8005改成了8885
<Server port="8885" shutdown="SHUTDOWN">
<!-- Security listener. Documentation at /docs/config/listeners.html
<Listener className="org.apache.catalina.security.SecurityListener" />
3、改动之二
8080改成了8888
<Connector port="8888" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
4、改动之三
8009改成了8889
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8889" protocol="AJP/1.3" redirectPort="8443" />
5、wq保存退出
最后在tomcat的bin目录./startup.sh启动一下试试:OK