Skip to content

Commit

Permalink
Update rhel.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed Jul 15, 2023
1 parent c9e27c2 commit 9c6faef
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions scripts/install/rhel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,22 @@ echo "SSH PORT:${SSH_PORT}"
# fi
# echo "iptables wrap start"


if [ ! -f /usr/sbin/firewalld ];then
$PKGMGR install firewalld -y
systemctl enable firewalld
#取消服务锁定
systemctl unmask firewalld
systemctl start firewalld


sed -i 's#AllowZoneDrifting=yes#AllowZoneDrifting=no#g' /etc/firewalld/firewalld.conf
firewall-cmd --reload

#安装就开启
systemctl restart firewalld
fi

if [ -f /usr/sbin/firewalld ];then
# look
# firewall-cmd --list-all
# systemctl status firewalld
Expand All @@ -111,11 +120,7 @@ if [ ! -f /usr/sbin/firewalld ];then
# firewall-cmd --permanent --zone=public --add-port=3306/tcp
# firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp

sed -i 's#AllowZoneDrifting=yes#AllowZoneDrifting=no#g' /etc/firewalld/firewalld.conf
firewall-cmd --reload

#安装就开启
systemctl restart firewalld
firewall-cmd --reload
fi

$PKGMGR install -y epel-release
Expand Down

0 comments on commit 9c6faef

Please sign in to comment.