美文网首页
Red Hat yum 仓库配置

Red Hat yum 仓库配置

作者: 倒叙_b7a5 | 来源:发表于2018-12-28 16:46 被阅读0次

    1.查看系统版本和内核 

    a. 系统版本 

            cat /etc/redhat-release

     b.系统内核

            uname -a

    2. 挂载 /dev/cdrom

            umount /media/RHEL_6.4\ x86_64\ Disc\ 1/

            mount /dev/cdrom /media

    3. 配置repo仓库文件(后缀名必须是.repo)

            进入yum目录: cd /etc/yum.repos.d/

            修改或创建repo文件:vim rhel-source.repo,文件内容如下(仅适用Red Hat 6.4

                  [rhel-dvd]

    name=Red Hat Enterprise Linux $releasever - $basearch - dvd

    baseurl=file:///media/

    enabled=1

    gpgcheck=1

    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

    [rhel-Server]

    name=Red Hat Enterprise Linux $releasever - $basearch - Server

    baseurl=file:///media/Server

    enabled=1

    gpgcheck=1

    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

    [rhel-LoadBalancer]

    name=Red Hat Enterprise Linux $releasever - $basearch - LoadBalancer

    baseurl=file:///media/LoadBalancer

    enabled=1

    gpgcheck=1

    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

    [rhel-HighAvailability]

    name=Red Hat Enterprise Linux $releasever - $basearch - HighAvailability

    baseurl=file:///media/HighAvailability

    enabled=1

    gpgcheck=1

    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

    [rhel-ResilientStorage]

    name=Red Hat Enterprise Linux $releasever - $basearch - ResilientStorage

    baseurl=file:///media/ResilientStorage

    enabled=1

    gpgcheck=1

    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

    4. 验证

    yum list ---> 无报错即可

    5.yum 安装package

    yum -y install package_name

    相关文章

      网友评论

          本文标题:Red Hat yum 仓库配置

          本文链接:https://www.haomeiwen.com/subject/nxwslqtx.html