redhat5本地源NBD驱动安装

匿名 (未验证) 提交于 2019-12-02 21:59:42

1.将镜像挂载到本机上

1)将系统ISO镜像放到自己电脑/root下

2)在(/)目录下,建立yum目录

3)修改/etc下的yum配置文件

   cd /etc/yum.repos.d      ls      mv rhel-debuginfo.repo rhel-debuginfo.repo.bak      vim rhel-debuginfo.repo


rhel-debuginfo.repo配置文件为:

name=Red Hat Enterprise Linux $releasever - $basearch - Debug  baseurl=file:///root/yum  enabled=1  #gpgcheck=0  #gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release


4)配置完yum,然后在配置下自动挂载

 vim /etc/rc.local      mount -o loop /root/rhel-server-5.4-X86_64-dvd.iso /root/yum


5)重启机器

2.配置本地yum源

1)因为读写权限问题,需要将mount后的镜像文件手动拷贝到其他文件夹下

2)将Server目录下的所有文件制作yum源(或者将YUM目录下的所有文件作为yum源)
注意:在配置yum源之前需要先安装createrepo

  cd Server/      rpm -ivh createrepo-0.4.11-3.el5.noarch.rpm


3)重新配置yum源的配置文件

 cd /etc/yum.repos.d      vim rhel-debuginfo.repo


rhel-debuginfo.repo配置文件为:

name=Red Hat Enterprise Linux $releasever - $basearch - Debug  baseurl=file:///root/YUM/Server  enabled=1 #gpgcheck=0  #gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release


4)制作yum源

5)清空,并获取repolist下有效的rmp包

  yum clean all      yum repolist


3.安装NBD驱动

 
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!