diff --git a/data/sql/default.sql b/data/sql/default.sql index 3453d4978..ab168862e 100755 --- a/data/sql/default.sql +++ b/data/sql/default.sql @@ -47,8 +47,9 @@ CREATE TABLE IF NOT EXISTS `firewall` ( INSERT INTO `firewall` (`id`, `port`, `ps`, `addtime`) VALUES (1, '80', '网站默认端口', '0000-00-00 00:00:00'), (2, '7200', 'WEB面板', '0000-00-00 00:00:00'), -(3, '22', 'SSH远程管理服务', '0000-00-00 00:00:00') -(3, '888', 'phpMyAdmin默认端口', '0000-00-00 00:00:00'); +(3, '22', 'SSH远程管理服务', '0000-00-00 00:00:00'), +(4, '888', 'phpMyAdmin默认端口', '0000-00-00 00:00:00'), +(5, '3306', 'MySQL端口', '0000-00-00 00:00:00'); diff --git a/scripts/install_centos.sh b/scripts/install_centos.sh index 2f8cfb6e0..732e3ec7d 100755 --- a/scripts/install_centos.sh +++ b/scripts/install_centos.sh @@ -33,6 +33,7 @@ if [ -f "/etc/init.d/iptables" ];then 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 @@ -56,6 +57,7 @@ if [ "${isVersion}" == '' ];then firewall-cmd --permanent --zone=public --add-port=443/tcp firewall-cmd --permanent --zone=public --add-port=888/tcp firewall-cmd --permanent --zone=public --add-port=7200/tcp + firewall-cmd --permanent --zone=public --add-port=3306/tcp firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp firewall-cmd --reload fi