centos 安装网站
最后更新时间:2023-02-14 11:29:34
1. yum install httpd -y
2.在 /etc/httpd/conf/httpd.conf
配置文件里修改 Listen 80
为 Listen 8088
sed -i 's/Listen 80/Listen 8088/' /etc/httpd/conf/httpd.conf
3. firewall-cmd --permanent --add-port=12345/tcp --permanent
4.systemctl start firewalld
systemctl start httpd //打开服务器
systemctl enable httpd // 开机自启服务器