开启虚拟机查看本地IP地址
1.配置本地yum源
[CentOS7-yum]
name=CentOS7-source
baseurl=file:///mnt
enable=1
gpgcheck=0
挂载到/mnt
mount /dev/sr0 /mnt sr0
可能不一样输入df -h命令查看
2.安装httpd
yum -y install httpd
3.修改配置文件
vi /etc/httpd/conf/httpd.conf
是对应端口号的修改可不改默认为80
4.进入html页面写内容
cd /var/www/html
目录 写入
echo “hello,world” > index.html
5.启动http服务 ---systemctl restart httpd
6.查看状态 ---systemctl status httpd
7.关闭防火墙 停止SELinux
---systemctl stop firewalld #临时关闭
---systemctl disable firewalld #永久关闭
---getenforce 0 #临时停止SELinux
7.curl http://192.168.6.143 存放index.html 的服务器IP
8.在笔记本上打192.168.121.129
9.更改适配器DNS为192.168.121.129 输入域名也可



