pull/109/head
midoks 3 years ago
parent 1be6406ff3
commit bfa839e0ce
  1. 34
      scripts/install/debian.sh
  2. 32
      scripts/install/ubuntu.sh

@ -23,27 +23,22 @@ if [ ! -d /root/.acme.sh ];then
curl https://get.acme.sh | sh curl https://get.acme.sh | sh
fi fi
if [ -f /etc/init.d/iptables ];then if [ -f /usr/sbin/ufw ];then
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT ufw allow 22/tcp
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT ufw allow 80/tcp
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT ufw allow 443/tcp
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 888 -j ACCEPT ufw allow 888/tcp
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 7200 -j ACCEPT ufw allow 7200/tcp
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT ufw allow 3306/tcp
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT ufw allow 30000:40000/tcp
service iptables save
iptables_status=`service iptables status | grep 'not running'`
if [ "${iptables_status}" == '' ];then
service iptables restart
fi
fi fi
ufw disable
if [ "${isVersion}" == '' ];then if [ ! -f /usr/sbin/ufw ];then
if [ ! -f "/etc/init.d/iptables" ];then apt install -y firewalld
apt install firewalld
systemctl enable firewalld systemctl enable firewalld
systemctl start firewalld systemctl start firewalld
@ -56,11 +51,10 @@ if [ "${isVersion}" == '' ];then
firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp
firewall-cmd --reload firewall-cmd --reload
fi fi
fi
#安装时不开启 #安装时不开启
service iptables stop systemctl stop firewalld
if [ ! -d /www/server/mdserver-web ];then if [ ! -d /www/server/mdserver-web ];then

@ -24,26 +24,21 @@ if [ ! -d /root/.acme.sh ];then
fi fi
if [ -f /etc/init.d/iptables ];then if [ -f /usr/sbin/ufw ];then
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT ufw allow 22/tcp
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT ufw allow 80/tcp
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT ufw allow 443/tcp
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 888 -j ACCEPT ufw allow 888/tcp
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 7200 -j ACCEPT ufw allow 7200/tcp
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT ufw allow 3306/tcp
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT ufw allow 30000:40000/tcp
service iptables save
iptables_status=`service iptables status | grep 'not running'`
if [ "${iptables_status}" == '' ];then
service iptables restart
fi
fi fi
ufw disable
if [ "${isVersion}" == '' ];then if [ ! -f /usr/sbin/ufw ];then
if [ ! -f "/etc/init.d/iptables" ];then
apt install -y firewalld apt install -y firewalld
systemctl enable firewalld systemctl enable firewalld
systemctl start firewalld systemctl start firewalld
@ -57,11 +52,10 @@ if [ "${isVersion}" == '' ];then
firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp
firewall-cmd --reload firewall-cmd --reload
fi fi
fi
#安装时不开启 #安装时不开启
service iptables stop systemctl stop firewalld
if [ ! -d /www/server/mdserver-web ];then if [ ! -d /www/server/mdserver-web ];then
wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master

Loading…
Cancel
Save