码迷,mamicode.com
首页 > 其他好文 > 详细

RedHat6.5用ISO配置yum源

时间:2016-10-18 09:39:42      阅读:180      评论:0      收藏:0      [点我收藏+]

标签:

RedHat 6.5 x64位

[root@gyum ~]# mkdir -p /mnt/cdrom
[root@gyum ~]# df –h
[root@gyum ~]# yum repolist
技术分享
[root@gyum ~]# yum clean all
[root@gyum ~]# cd /opt
[root@gyum opt]# ls
rh  rhel-server-6.5-x86_64-dvd.iso

[root@gyum ~]# cd /etc/yum.repos.d/
[root@gyum yum.repos.d]# ls
dvd.repo

[root@gyum opt]# mount -t iso9660 -o loop rhel-server-6.5-x86_64-dvd.iso /mnt/cdrom/
或者
[root@gyum opt]# mount -t iso9660 -o loop /opt/rhel-server-6.5-x86_64-dvd.iso /mnt/cdrom/

[root@gyum opt]# df –h
技术分享
[root@gyum opt]# yum repolist
技术分享
[root@gyum opt]# yum list|grep vsftpd
技术分享
[root@gyum opt]# yum -y install gcc
技术分享
技术分享

dvd.repo文件内容如下:
[rhel-dvd]
name=Red Hat Enterprise Linux $releasever - $dvd
baseurl=file:///mnt/cdrom
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[HighAvailability]
name=HighAvailability
baseurl=file:///mnt/cdrom/HighAvailability
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[LoadBalancer]
name=LoadBalancer
baseurl=file:///mnt/cdrom/LoadBalancer
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[ResilientStorage]
name=ResilientStorage
baseurl=file:///mnt/cdrom/ResilientStorage
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[ScalableFileSystem]
name=ScalableFileSystem
baseurl=file:///mnt/cdrom/ScalableFileSystem
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[Server]
name=Server
baseurl=file:///mnt/cdrom/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release


---------------------------------------------------------------------------
RedHat 7.2 x64位

[root@gyum opt]# mount -o ro /dev/cdrom /mnt/cdrom

dvd7.repo文件内容如下
[rhel-dvd7]
name=Red Hat Enterprise Linux $releasever - $dvd7
baseurl=file:///mnt/cdrom
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

----------------------------------------------------------------------------
RedHat 5.9 x64位
[root@gyum opt]# mount -o loop /dev/cdrom /mnt/cdrom

dvd5.repo文件内容如下
[Server]
name=Server
baseurl=file:///mnt/cdrom/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[VT]
name=VT
baseurl=file:///mnt/cdrom/VT
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[Cluster]
name=Cluster
baseurl=file:///mnt/cdrom/Cluster
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[ClusterStorage]
name=ClusterStorage
baseurl=file:///mnt/cdrom/ClusterStorage
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

RedHat6.5用ISO配置yum源

标签:

原文地址:http://www.cnblogs.com/zb9222/p/5971999.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!