Update ubuntu.sh

pull/109/head
midoks 3 years ago
parent 66309adaa1
commit ffe6e51eda
  1. 28
      scripts/install/ubuntu.sh

@ -10,4 +10,32 @@ mkdir -p /www/wwwlogs
mkdir -p /www/backup/database mkdir -p /www/backup/database
mkdir -p /www/backup/site mkdir -p /www/backup/site
apt install -y wget curl vixie-cron lsof
if [ ! -f /root/.acme.sh ];then
curl https://get.acme.sh | sh
fi
if [ -f /etc/init.d/iptables ];then
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 888 -j ACCEPT
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 7200 -j ACCEPT
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT
service iptables save
iptables_status=`service iptables status | grep 'not running'`
if [ "${iptables_status}" == '' ];then
service iptables restart
fi
fi
#安装时不开启
service iptables stop
echo "ubuntu dev ..." echo "ubuntu dev ..."
Loading…
Cancel
Save