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

  • 相关阅读:
    P2167 [SDOI2009]Bill的挑战
    P2153 [SDOI2009]晨跑
    洛咕 P2155 [SDOI2008]沙拉公主的困惑
    洛咕 P2465 [SDOI2008]山贼集团
    洛咕 P2463 [SDOI2008]Sandy的卡片
    洛咕 P4556 [Vani有约会]雨天的尾巴
    CF418D Big Problems for Organizers
    CF28D Don't fear, DravDe is kind
    CF97C Winning Strategy
    P4427 [BJOI2018]求和
  • 原文地址:https://www.cnblogs.com/ray-mmss/p/9988683.html
Copyright © 2011-2022 走看看