# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled //此时状态由本来的enforcing改为了disabled
# SELINUXTYPE= can take one of three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
//注,设置本地yum源要将网关改掉,使其不能联网
二、开始设置yum源
1.用xshell连上机器后,将镜像文件上传,起首点击图中所指标识
2.点击之后进入如下界面,此时找到你要上传的镜像
3.找到镜像之后,右击鼠标,然后点击传输
4.备份yum源
[root@test1 ~]# cd /etc/yum.repos.d
/etc/yum.repos.d //yum的设置文件所在
[root@test1 yum.repos.d]# mkdir bak
[root@test1 yum.repos.d]# ls
bak CentOS-Media.repo
CentOS-Base.repo CentOS-Sources.repo
CentOS-CR.repo CentOS-Vault.repo
CentOS-Debuginfo.repo CentOS-x86_64-kernel.repo
CentOS-fasttrack.repo
[root@test1 yum.repos.d]# mv *.repo bak/
[root@test1 yum.repos.d]# ls
bak
//注每台机器都要进行这一步操作
5.创建yum_http.repo文件
[root@test1 yum.repos.d]# mkdir yum_http.repo
[root@test1 yum.repos.d]# vim yum_http.repo
将一下内容写入
[centos]
name=centos
baseurl=file:///opt/centos
gpgcheck=0
enabled=1
[root@test1 yum.repos.d]# ls /opt/centos
ls: 无法访问/opt/centos: 没有谁人文件或目录
[root@test1 yum.repos.d]# mkdir /opt/centos
[root@test1 yum.repos.d]# cd /opt/centos
[root@test1 centos]# ls
[root@test1 centos]# ls
CentOS-7-x86_64-DVD-2009.iso
[root@test1 centos]# mount /opt/centos/CentOS-7-x86_64-DVD-2009.iso /opt/centos //挂载镜像文件,简朴挂载mount: /dev/loop0 写保护,将以只读方式挂载
6.安装httpd服务
[root@test1 yum.repos.d]# yum -y install httpd