RHCE6 Preperation (2) - yum source and auto mount

本文将指导您如何配置YUM源到指定位置,包括创建文件、设置网络连接、执行SELinux设置、防火墙配置、ISO映像挂载等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1, configure the YUM source to the instructor location.

in the folder, '/etc/yum.repos.d', create the file,

vim serverX.repo

the content is as:

【serverX】
name=serverX
baseurl= the location of the YUM source

in my case the location of YUM source is "= http://instructor.example.com/pub/rhel6/dvd"
make sure you have network connection to http://instructor.example.com/pub/rhel6/dvd, this has already been done before.
enabled=1

gpgcheck=0 (without the gpg check)

Set the YUM source at Instructor computer, first insert the CentOS ISO image into the VirtualBox, as below,
VirtualBox_storage
set the automatic mount the CentOS ISO image by editing the configuration file, /etc/fstab, below is the result of command "cat /etc/fstab"
mount_CD
reboot the computer,
reboot
the last line as: "/dev/cdrom /var/ftp/pub/rhel6/dvd iso9660 auto,ro 0 0"
the folder /var/ftp/pub is linked to /var/www/html/pub, as below picture shows,
var.ftp.pub
so this DVD file can be accessed by http protocol from the student computer. Below pic shows the link:
access_dvd

2, set the selinux as enforcing mode,

edit the file /etc/sysconfig/selinux

SELINUX=enforcing

needs to reboot for SELinux take effect.

3,  enable the firewall,

iptables -F
iptables -X
iptables -Z
service iptables save

4, mount the example.iso to /mnt/iso, and auto mount at system boot time,

mkdir /mnt/iso
mount -o loop /root/examine.iso /mnt/iso

Write into the fstab file,

vim /etc/fstab
/root/examine.iso /mnt/iso iso9660 defaults,loop 0 0

to test the result,

mount -a
df -h


5, showmount -e localhost to show the directory shared in your system

if the command didn't display anything, means the NFS service didn't start,

if NFS service start fail, means rpcbind service didn't start,

service rpcbind start
service nfs start
showmount -e localhost


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值