标签:remote 分享 .com kill target image down dir rip
cd /usr/local
进入/usr/local目录
mkdir tomcat
创建tomcat目录
cd tomcat
进入tomcat目录
wget http://www-us.apache.org/dist/tomcat/tomcat-9/v9.0.7/bin/apache-tomcat-9.0.7.tar.gz
下载Tomcat9
tar -zxvf apache-tomcat-9.0.7.tar.gz
解压
mv apache-tomcat-9.0.7 tomcat9
重命名
vim /usr/lib/systemd/system/tomcat9.service
创建文件
添加以下内容
[Unit]
Description=Tomcat
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
Type=oneshot
ExecStart=/usr/local/tomcat/tomcat9/bin/startup.sh
ExecStop=/usr/local/tomcat/tomcat9/bin/shutdown.sh
ExecReload=/bin/kill -s HUP $MAINPID
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
systemctl start tomcat9.service
启动tomcat
systemctl enable tomcat
使tomcat开机启动
firewall-cmd --zone=public --permanent --add-port=8080/tcp
firewall-cmd --reload
开启防火墙8080端口
访问http://192.168.1.13:8080/
标签:remote 分享 .com kill target image down dir rip
原文地址:https://www.cnblogs.com/yjlch1016/p/8902277.html