赞
踩
yum仓库支持四种常见地址:
yum -y install httpd
systemctl enable --now httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
systemctl disable --now firewalld
firewall-cmd --add-service=http ## 防火墙添加http端口 临时生效 默认为80
firewall-cmd --permanent --add-service=http ## ## 防火墙永久添加 http端口
firewall-cmd --reload ## 重新加载
systemctl restart firewalld.service ## 重启防火墙
实例:
[15:11:24 root@C8[ ~]#systemctl status firewalld.service ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor p> Active: active (running) since Sun 2021-04-11 13:08:32 CST; 2h 3min ago Docs: man:firewalld(1) Main PID: 954 (firewalld) Tasks: 2 (limit: 11337) Memory: 30.1M CGroup: /system.slice/firewalld.service └─954 /usr/libexec/platform-python -s /usr/sbin/firewalld --nofork -> Apr 11 13:08:31 C8 systemd[1]: Starting firewalld - dynamic firewall daemon... Apr 11 13:08:32 C8 systemd[1]: Started firewalld - dynamic firewall daemon. [15:13:11 root@C8[ ~]#firewall-cmd --add-service=http success [15:13:59 root@C8[ ~]#firewall-cmd --reload success [15:14:19 root@C8<
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。