yum
yum install httpd # 中间y就可以了
# 如果执行上面提示No package httpd available.那就试试下面的
yum --disableexcludes=all install httpd # 会告诉你Install 1 Package (+4 Dependent packages),输入y就执行安装
cd /etc/httpd/conf/
cp httpd.conf /etc/httpd/conf/cp_httpd.conf # 备份配置文件
vim httpd.conf
ServerName 202.108.22.5:80 # IP改自己的服务器IP地址,202.108.22.5只是示例
systemctl start httpd.service # 启动服务
访问服务器IP加上80端口号,例如202.108.22.5:80。出现下图就安装成功了
标签:httpd,202.108,22.5,yum,conf,Linux,Apache,80,安装 From: https://www.cnblogs.com/piggyyy/p/17011628.html