centos 7 安装Apache

 时间:2026-04-21 15:19:52

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

  • Linux CentOS 7安装
  • VirtualBox 安装 CentOS 7
  • centos 7 安装mariadb
  • Centos 7 如何安装zabbix
  • centos7配置网络连接
  • 热门搜索
    铁锅生锈怎么处理 怎么做红烧肉好吃 打印机共享怎么设置 电热水器怎么安装 家庭基本情况怎么写 迈克尔杰克逊为什么变白 生日快乐英文怎么写 车贷利息怎么算 吉他怎么调音 罩杯abcd怎么分大小