📜  在系统防火墙中安装并打开 HTTP、HTTPS 和 SSH 访问 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:42.439000             🧑  作者: Mango

代码示例1
sudo yum install -y curl policycoreutils-python openssh-server perl

sudo systemctl enable sshd
sudo systemctl start sshd

sudo yum install firewalld -y
sudo systemctl enable firewalld
sudo systemctl start firewalld
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo systemctl reload firewalld