zoukankan      html  css  js  c++  java
  • REAL6 本地yum源配置

    创建源文件存放的目录

    #mkdir /yum/

    加载光盘

    #mount /dev/cdrom /media

    将光盘文件复制到服务器上的源目录

    #cp -a /media/* /yum/

    新建一个yum源的响应文件

    # vi /etc/yum.repos.d/local.repo

     内容如下:

    [base]
    name=linux 6
    baseurl=file:///yum
    gpgcheck=0
    enable=1

    修改yum源的地址

    # vi /usr/lib/python2.6/site-packages/yum/yumRepo.py

     在上面的文件中找到下面这行

     remote = url + '/' + relative

    将其改为

     remote + '/yum' + relative

    配置到这里就完成了,安装个软件做下测试

    [root@rhel6-a yum]# yum install samba
    Loaded plugins: rhnplugin
    This system is not registered with RHN.
    RHN support will be disabled.
    base                                                      | 3.7 kB     00:00 ... 
    base/primary_db                                           | 2.3 MB     00:00 ... 
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package samba.i686 0:3.5.4-68.el6 set to be updated
    --> Finished Dependency Resolution

    Dependencies Resolved

    =================================================================================
     Package          Arch            Version                  Repository       Size
    =================================================================================
    Installing:
     samba            i686            3.5.4-68.el6             base            5.0 M

    Transaction Summary
    =================================================================================
    Install       1 Package(s)
    Upgrade       0 Package(s)

    Total download size: 5.0 M
    Installed size: 17 M
    Is this ok [y/N]:

    大功告成。

    当然还可以通过上述方法配置ftp和http的yum源。

    转载请注明:

    本文转自:http://www.liusuping.com/ubuntu-linux/rhel6-local-yum.html

  • 相关阅读:
    设计模式-观察者模式
    获取ubuntu中软件包的有用地址
    vim 简单命令
    adb logcat 日志过滤
    shell编程——
    shell编程——参数传递
    Chromecast
    linux 广播
    【转】Git命令解说
    linux 多播
  • 原文地址:https://www.cnblogs.com/hanleng/p/3381405.html
Copyright © 2011-2022 走看看