配置tomcat
到官网下载tar包 将tar包上传到服务器 并解压tar -zxvf apache-tomcat-9.0.65.tar.gz重命名tomcat9
mv apache-tomcat-9.0.65 tomcat9配置环境变量
#编辑配置文件 vim /etc/profile # 配置Tomcat环境变量 export CATALINA_HOME=/myservice/tomcat9 export PATH=$PATH:$CATALINA_HOME/bin #重新加载配置文件 source /etc/profile启动
sh /myservice/tomcat9/bin/startup.sh查看进程
ps aux|grep tomcat关闭防火墙
systemctl stop firewalld查看防火墙状态
systemctl statue firewalld
如果是租赁的服务器则要设置开启防火墙相关端口
访问路径:服务器IP地址:8080
–END



