下载tomcat
sudo wget http://learning.happymmall.com/tomcat/apache-tomcat-7.0.73.tar.gz
下载完后直接解压 sudo tar -zxvf apache-tomcat-7.0.73.tar.gz
cd apache-tomcat-7.0.73
sudo vim conf/server.xml
给这个,添加 URIEncoding="utf-8"
<Connector port="8081" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
URIEncoding="utf-8" />
esc :wq退出
cd apache-tomcat-7.0.73/bin
sudo ./startup.sh 启动tomcat,这时就可以用公网:8080访问了,如果不能访问,检查安全组配置
单机部署多应用

vim /etc/profile
export CATALINA_BASE_8080=/yangjun/tomcat-8080
export CATALINA_HOME_8080=/yangjun/tomcat-8080
export TOMCAT_HOME_8080=/yangjun/tomcat-8080
export CATALINA_BASE_7777=/yangjun/tomcat-7777
export CATALINA_HOME_7777=/yangjun/tomcat-7777
export TOMCAT_HOME_7777=/yangjun/tomcat-7777
保存退出,执行:source /etc/profile 使配置文件生效


export CATALINA_BASE=$CATALINA_BASE_7777
export CATALINA_HOME=$CATALINA_HOME_7777
export CATALINA_BASE=$CATALINA_BASE_8080
export CATALINA_HOME=$CATALINA_HOME_8080


linux搜索配置文件,按/从上往下搜索,?从下往上搜索
网友评论