RHEL5本地光盘yum源配置

操作系统:RHEL5U8 64bit 带安装DVD光盘且已经可使用。

步骤:
1,光盘自动挂载标签为RHEL_5.8 x86_64 DVD,路径为/media/RHEL_5.8 x86_64 DVD,由于有空格,建议做个链接

# ln -s RHEL_5.8\ x86_64\ DVD rhel58cd

2,在/etc/yum.repos.d/ 目录下参考rhel-debuginfo.repo 编写一个本地源配置 rhel58cd-local.repo ,内容如下

[rhel58cd-local]                 -- 与文件名前缀相同
name=Red Hat Enterprise Linux $releasever - $basearch
baseurl=file:///media/rhel58cd/Server       -- 目录应指向光盘里的Server目录,注意file:后是3个斜线
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

3,完成以上2步,即完成了本地源配置,测试一下

# yum clean all

# yum list vsftpd          --显示yum源vsftpd的版本,5.8的应该是以下内容(本地已经安装vsftpd,显示installed)
Loaded plugins: katello, product-id, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Installed Packages
vsftpd.x86_64            2.0.5-24.el5            installed

标签: none

添加新评论

Free Web Hosting