rhel5.x 光盘yum源配置

来源:互联网 发布:zabbix监控nginx 编辑:程序博客网 时间:2024/05/18 01:27

[root@vmb ~]# mkdir -p /mnt/cdrom[root@vmb ~]# mount /dev/cdrom /mnt/cdrommount: block device /dev/cdrom is write-protected, mounting read-only[root@vmb ~]# [root@vmb ~]# [root@vmb ~]# df -hFilesystem            Size  Used Avail Use% Mounted on/dev/mapper/VolGroup00-LogVol01                       18G  4.8G   12G  30% //dev/sda1             190M   13M  168M   8% /boottmpfs                 500M     0  500M   0% /dev/shm/dev/hdc              4.1G  4.1G     0 100% /mnt/cdrom

[root@vmb ~]# cd /etc/yum.repos.d/[root@vmb yum.repos.d]# lltotal 8-rw-r--r-- 1 root root 254 Nov 13  2012 rhel-debuginfo.repo

原来:
[root@vmb yum.repos.d]# cat rhel-debuginfo.repo_back [rhel-debuginfo] name=Red Hat Enterprise Linux $releasever - $basearch - Debug baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/ enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release 


修改后:
[root@vmb yum.repos.d]# cat rhel-debuginfo.repo [rhel-debuginfo] name=Red Hat Enterprise Linux $releasever - $basearch - Debug baseurl=file:///mnt/cdrom/Server--------------------------> 此处有变化enabled=1 --------------------------> 此处有变化</span>gpgcheck=1 gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release

执行如下:
[root@rhel59 yum.repos.d]# yum clean allLoaded plugins: product-id, security, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.Cleaning up Everything

测试yum源的效果:
[root@rhel59 yum.repos.d]# yum list | grep gcccompat-libgcc-296.i386                  2.96-138                  installed     libgcc.i386                             4.1.2-54.el5              installed     libgcc.x86_64                           4.1.2-54.el5              installed     compat-gcc-34.x86_64                    3.4.6-4.1                 rhel-debuginfocompat-gcc-34-c++.x86_64                3.4.6-4.1                 rhel-debuginfocompat-gcc-34-g77.x86_64                3.4.6-4.1                 rhel-debuginfogcc.x86_64                              4.1.2-54.el5              rhel-debuginfogcc-c++.x86_64                          4.1.2-54.el5              rhel-debuginfogcc-gfortran.x86_64                     4.1.2-54.el5              rhel-debuginfogcc-gnat.x86_64                         4.1.2-54.el5              rhel-debuginfogcc-java.x86_64                         4.1.2-54.el5              rhel-debuginfogcc-objc.x86_64                         4.1.2-54.el5              rhel-debuginfogcc-objc++.x86_64                       4.1.2-54.el5              rhel-debuginfogcc44.x86_64                            4.4.7-1.el5               rhel-debuginfogcc44-c++.x86_64                        4.4.7-1.el5               rhel-debuginfogcc44-gfortran.x86_64                   4.4.7-1.el5               rhel-debuginfo[root@vmb yum.repos.d]# 





0 0
原创粉丝点击