inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
[root@master ~]#
- firewall的话,直接
systemctl stop firewalld
即可
如果使用的是iptables,则吧firewalld替换成iptables
[root@master ~]# systemctl is-active firewalld
active
[root@master ~]#
[root@master ~]# systemctl stop firewalld
[root@master ~]#
[root@master ~]# systemctl is-active firewalld
inactive
[root@master ~]#
- selinux关闭:
setenforce 0
使用getenforce
查看结果为Disabled才行。
[root@master ~]#
[root@master ~]# getenforce
Disabled
[root@master ~]#
[root@master ~]# #setenforce 0
[root@master ~]#
- 我们需要安装http服务,所以我们需要先搭建一个本地源
下面我简单说下过程【照着我的做就行】,如果有不能理解的,去我博客中翻翻yum源的搭建,学习一下
#先创建一个文件用来挂载镜像
[root@master ~]# #mkdir /root/centos7.6
挂载镜像到刚才创建的那个文件
[root@master ~]# #mount CentOS-7.6-x86_64-DVD-1810.iso /root/centos7.6/
配置文件如下
[root@master ~]# cat /etc/yum.repos.d/centos.repo
[cenot-7.6]
name=cenots7.6
baseurl=file:///root/centos7.6
gpgcheck=0
enable=1
[root@master ~]#
正常情况直接执行这个命令就可以看到镜像数量了,如果为0,则执行一下:yum clean all
[root@master ~]# yum repolist
-
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos,
- subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Determining fastest mirrors
repo id repo name status
!cenot-7.6 cenots7.6 4,021
repolist: 4,021
[root@master ~]#
- 安装httpd服务
yum install -y httpd
[root@master ~]# yum install -y httpd
-
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos,
- subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
cenot-7.6 | 3.6 kB 00:00
Resolving Dependencies
–> Running transaction check
—> Package httpd.x86_64 0:2.4.6-88.el7.centos will be installed
–> Processing Dependency: httpd-tools = 2.4.6-88.el7.centos for package: httpd-2.4.6-88.el7.centos.x86_64
–> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-88.el7.centos.x86_64
–> Processing