问题描述:服务器由于系统原因会不定时重启
1.jar包设置自启动
https://www.cnblogs.com/alsodzy/p/7931618.html
-- 最重要的一步就是修改Linux的开机启动配置文件(/etc/rc.d/rc.local)
vi /etc/rc.d/rc.local
-- 添加你的xxx.sh
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
/home/dzy/Desktop/test/test.sh
2.防火墙8080端口配置永久有效
-- 查看防火墙文件
vi /etc/sysconfig/iptables
-- 添加端口
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT
-- 重启
service iptables restart