[root@localhost yjh]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# vim baser.repo
[baseos]
name=baseos
baseurl=/mnt/BaseOS
gpgcheck=0
[appstream]
name=appTream
baseurl=/mnt/AppStream
gpgcheck=0
[root@localhost ~]# dnf install vim -y 下载
[root@localhost yum.repos.d]# mount /dev/sr0 /mnt 挂载
mount: /mnt: WARNING: device write-protected, mounted read-only.
出现这句话表示挂载成功
[root@localhost yum.repos.d]# vim /etc/httpd/conf/httpd.conf
(复制并更改98行代码:ServerName 0.0.0.0:80)
[root@localhost yum.repos.d]# systemctl start httpd 启动服务器
[root@localhost yum.repos.d]# systemctl stop firewalld 停止防火墙
[root@localhost yum.repos.d]# echo niuniuwudi > /var/www/html/index.html
([root@localhost yum.repos.d]# systemctl status httpd 查看状态)
本文详细介绍了在CentOS系统上搭建httpd服务器的过程,包括编辑baser.repo文件,安装vim,挂载设备,启动httpd服务,停止firewalld防火墙,并创建index.html测试页面。
1237

被折叠的 条评论
为什么被折叠?



