安装完Tomcat之后,配置Tomcat环境变量。
vim /etc/profile.d/tomcat.sh
CATALINA_BASE=tomcat安装路径
PATH=$CATALINA_BASE/bin:$PATH
export PATH CATALINA_BASE
source /etc/profile.d/tomcat.sh
修改tomcat的server.xml (vim /tomcat安装路径/conf/server.xml)
修改连接标签connect:1端口号2将AJP改成HTTP/1.1
source /tomcat安装路径/conf/server.xml
启动Tomcat cd /tomcat安装路径/bin
./startup.sh