虚拟机中配置RHEL6实验系统

装好RHEL6
1.关闭NetworkManager
service NetworkManager stop                      #停止 NetworkManager
chkconfig NetworkManager off                     #设置 NetworkManager 开启不启动

2.关闭Selinux
vim /etc/selinux/config
将SELINUX=Enforcing
改为SELINUX=disabled

3.挂载光盘
mount /dev/sr0 /mnt                                      #将光盘挂在到/mnt 的挂载点

4.设置光盘自动挂载
echo “/dev/sr0 /mnt iso9660 defaults 0 0” >>  /etc/fstab

5.配置本地yum源
rm -rf /etc/yum.repos.d/*             #删除默认的yum源
cat > /etc/yum.repos.d/rhel6.repo << EOF                      配置新的yum源

>[rhel6-source]
>name=rhel6-source
>baseurl=file:///mnt
>enabled=1
>gpgcheck=0
>EOF

yum clean all #清除缓存
yum list #更新列表

6.配置网络yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo                 #下载CENTOS 的yum源
sed -i ‘s/$releasever/6.7/g’ /etc/yum.repos.d/CentOS-Base.repo                                     #修改版本

yum clean all #清除缓存
yum list #更新列表

7.清空iptables
iptables -F                                   #清除防火墙规则
/etc/init.d/iptables save                                #保存防火墙配置
iptables:将防火墙规则保存到 /etc/sysconfig/iptables: [确定]
[root@kin86 ~]# chkconfig iptables off                            #设置防火墙开启不启动

8.设置引导模式,开机后直接进入命令模式
vim /etc/inittab
id:3:initdefault


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章