yum

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

 

转载于:https://www.cnblogs.com/ray-mmss/p/9988683.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值