红帽RHEL 6.8之光盘挂载及设置yum源

1.挂载盘

[root@rac01 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_rac01-LogVol01
                       37G  4.4G   31G  13% /
tmpfs                 3.9G   76K  3.9G   1% /dev/shm
/dev/sda1             477M   40M  412M   9% /boot
/dev/sr0              3.7G  3.7G     0 100% /media/RHEL-6.8 Server.x86_64
[root@rac01 yum.repos.d]# mount /dev/sr0 /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only

2.修改yum源

[root@rac01 mnt]# cd /etc/yum.repos.d/
[root@rac01 yum.repos.d]# vim  rhel-source.repo
[rhel68]
name=rhel68 repo
baseurl=file:///mnt/Server
gpgcheck=0

3.更新yum

[root@rac01 yum.repos.d]# yum clean all
Loaded plugins: product-id, refresh-packagekit, search-disabled-repos, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Cleaning repos: rhel68
Cleaning up Everything
[root@rac01 yum.repos.d]# yum list | grep zsh
zsh.x86_64                             4.3.11-4.el6_7.2                   rhel68

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值