zoukankan      html  css  js  c++  java
  • linux 配置本地光盘YUM源

    1、挂载光盘到 /media下   

    [root@localhost ~]#  mount /dev/cdrom /media

    2、直接配置文件了。

    [root@localhost ~]#  cd /etc/yum.repos.d/
    [root@localhost yum.repos.d]# ls
    redhat.repo   rhel-source.repo
    [root@localhost yum.repos.d]touch rhel-media.repo
    [root@localhost yum.repos.d]# vi rhel-media.repo 
    [media]
    name=Red Hat Enterprise Linux 6.2                             
    baseurl=file:///media                                       
    enabled=1                                                         
    gpgcheck=1                                                        
    gpgkey=file:///media/RPM-GPG-KEY-redhat-release
    

    3、清除原有缓存

    [root@localhost ~]# yum clean all
    Loaded plugins: product-id, security, subscription-manager
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    Cleaning repos: media
    Cleaning up Everything

    4、获取yum列表

    验证yum配置是否成功

    [root@localhost ~]# yum makecache
    Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    media                                                                    | 4.1 kB     00:00 ... 
    media/group_gz                                                           | 211 kB     00:00 ... 
    media/filelists_db                                                       | 3.3 MB     00:00 ... 
    media/primary_db                                                         | 3.1 MB     00:00 ... 
    media/other_db                                                           | 1.4 MB     00:00 ... 
    Metadata Cache Created
    [root@localhost ~]# 
    

      

  • 相关阅读:
    git更新代码
    git标签
    git分支
    命令连接redis
    sql语句
    rm -rf无法删除文件解决方法
    lombda 使用记录
    centos查看磁盘空间大小
    CentOS7 防火墙Firewall常用命令
    安装rabbitmq
  • 原文地址:https://www.cnblogs.com/xzlive/p/10065540.html
Copyright © 2011-2022 走看看