zoukankan      html  css  js  c++  java
  • yum

     

    使用阿里yun源

    mv /etc/yum.repos.d/* /etc/yum.repos.d/back
    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 
    (curl -O http://mirrors.aliyun.com/repo/Centos-7.repo )
    
    yum clean all
    
    yum makecache
    
    yum -y update

     

     

     

    1.搭建Yum服务端(这里假设服务器ip地址为ip)

      >>>搭建ftp服务

        安装 vsftpd

      >>>查看镜像文件绝对路径:

        ls -l /iso

        /var/lib/libvirt/images/iso

      >>>开机自动挂载镜像文件

        vim /etc/fstab

        /var/lib/libvirt/images/iso/rhel-server-7.4-x86_64-dvd.iso  /var/ftp/rhel7  iso9660  defaults 0 0

        测试:firefox ftp://ip/rhel7

    2.客户端

      vim /etc/yum.repos.d/rhel7.repo

      [rhel7]

      name=rhel7

      baseurl=ftp://ip/rhel7

      enabled=1

      gpgcheck=0

      

      yum repolist

     

    自建yum

    1.将搜集到的.rpm包存放在指定目录eg: /tools/others

    2.创建仓库档案repodata

      createrepo /tools/others

      vim /etc/yum.repos.d/rhel7.repo

        [myYum]

        name=other

        baseurl=file:///tools/other      #声明本地机器为Yum服务端

        enabled=1

        gpgcheck=0

      yum repolist

  • 相关阅读:
    查看dll定义的宏
    循环调用dll库的界面时,首次正常,再次无响应
    strftime使用%F格式化日期失败
    自己程序生成的二维码部分手机无法识别
    Drools规则
    idea快捷键
    风控文档笔记
    工作笔记
    工具方法
    BIO,NIO,AIO
  • 原文地址:https://www.cnblogs.com/ray-mmss/p/9988683.html
Copyright © 2011-2022 走看看