准备工作:
1、 备份当前状态
2、 知道Centos7的IP地址
1、安装软件包/查看是否安装软件包
yum install httpd -y 安装软件
rpm -qa httpd 检测系统是否安装
2、cp一份,vim进入编辑
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak
vim /etc/httpd/conf/httpd.conf
3、编辑末行模式set nu 查看行号,修改
大概119行图片方框的三个修改成图片一样的
4、创建www目录,在www目录下建立网页文件index.html,写入东西去index.html
mkdir /www 创建www目录
touch index.html 网页文件
echo "Hello World" > index.html 把hello world写入index.html里面///也可以vim编辑
5、start/开启服务,restart/重启服务,关闭防火墙,将Selinux设置成允许Permissive
6、网页搜索cetos7的ip查看Centos7安装配置Apache服务