RedHat6.5用ISO配置yum源
Posted 搞笑的大兵博客
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了RedHat6.5用ISO配置yum源相关的知识,希望对你有一定的参考价值。
RedHat 6.5 x64位
[[email protected] ~]# mkdir -p /mnt/cdrom
[[email protected] ~]# df –h
[[email protected] ~]# yum repolist
[[email protected] ~]# yum clean all
[[email protected] ~]# cd /opt
[[email protected] opt]# ls
rh rhel-server-6.5-x86_64-dvd.iso
[[email protected] ~]# cd /etc/yum.repos.d/
[[email protected] yum.repos.d]# ls
dvd.repo
[[email protected] opt]# mount -t iso9660 -o loop rhel-server-6.5-x86_64-dvd.iso /mnt/cdrom/
或者
[[email protected] opt]# mount -t iso9660 -o loop /opt/rhel-server-6.5-x86_64-dvd.iso /mnt/cdrom/
[[email protected] opt]# df –h
[[email protected] opt]# yum repolist
[[email protected] opt]# yum list|grep vsftpd
[[email protected] 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位
[[email protected] 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位
[[email protected] 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源的主要内容,如果未能解决你的问题,请参考以下文章