网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 生活知识 知识问答

centos 7 安装Apache

时间:2026-02-16 21:03:55

1、添加Google的DNS和更新下露粒

sed -i '1a nameserver 8.8.8.8' /etc/resolv.confyum makecache fastyum  -y  update

centos 7 安装Apache

2、安装Apache服务

yum -y install httpd httpd-devel gcc gcc-c++ libstdc++-devel autoconf automake libtool

centos 7 安装Apache

3、开启Apache服务

加入启动项

systemctl start  httpd.service

systemctl enable httpd.service

centos 7 安装Apache

4、防火墙眠巨王允倘耍许Apache服务

firewall-cmd --add-service=http --permanent

systemctl restart firewalld.service

centos 7 安装Apache

5、访问测试

http://ip

centos 7 安装Apache

© 2026 小知经验
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com