CentOS 安装httpd

来源:互联网 发布:linux 万兆网卡配置 编辑:程序博客网 时间:2024/06/04 18:28
1.查询是否已经安装了apache软件

  rpm -qa | grep httpd

2. 如果系统已安装,用以下命令删除

  rpm -e httpd-NN

3. 用yum进行安装,直接输入以下命令
  yum install httpd -y

4. 设置为系统服务

  systemctl enable httpd.service

5. 启动停止服务方式

  systemctl start/stop httpd

 查看服务状态:

  systemctl status httpd

6. 测试,用浏览器访问:

  http://xx.xx.xx.xx/


0 0