1  mount     查看挂载信息
2  mount /dev/sr0 /mnt/

3 vim /etc/yum.repos.d/base.repo //对yum的仓库信息进行配置
[base]
name=base
baseurl=file:///mnt //仓库的url
gpgcheck=0
enable=1

4 yum repolist //检查仓库状态

[[email protected] ~]# yum repolist
已加载插件:langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
源标识 源名称 状态
base base 4,620
repolist: 4,620 4620为本地源

5  yum install httpd -y   //安装httpd服务
6  rpm -qa httpd       // 查看httpd服务安装情况
7  rpm -ql httpd       // 查看httpd安装的文件

8 vim /etc/httpd/conf/httpd.conf //对httpd的配置文件进行修改
ServerName www.example.com:80改为ServerName 0.0.0.0:80 //改为对所有ip的缺省

9 systemctl start httpd //开启http服务
10 systemctl stop firewalld.service //关闭防火墙
11 setenforce 0 // 关闭SELinux

12 systemctl status httpd -l // 查看httpd的状态 并在网页查看服务是否打开
13 vim /var/www/html/index.html 编辑配置文件默认显示的html页面

this is a my new web. Hello World!

14 systemctl restart httpd //重启httpd的服务
15 systemctl status httpd //查看httpd服务状态是否开启

网页结果查看:
HTTP基础配置

相关文章:

  • 2021-10-08
  • 2021-04-03
  • 2021-11-15
  • 2021-06-30
  • 2021-12-05
  • 2021-10-10
  • 2021-10-12
  • 2021-10-05
猜你喜欢
  • 2021-04-11
  • 2022-12-23
  • 2022-01-16
  • 2022-12-23
  • 2022-12-23
  • 2021-05-27
  • 2021-11-27
相关资源
相似解决方案