自定义yum仓库

[root@room9pc01 lnmp_soft]# mkdir /root/pan             #创建文件

[root@room9pc01 lnmp_soft]# cp php-bcmath-5.4.16-   42.el7.x86_64.rpm /root/pan                  #把rpm包放到新文件夹
[root@room9pc01 lnmp_soft]# cp php-fpm-5.4.16-42.el7.x86_64.rpm /root/pan


[root@room9pc01 /]# createrepo  /root/pan               #生成createrepo仓管数据文件
Spawning worker 0 with 1 pkgs
Spawning worker 1 with 1 pkgs
Spawning worker 2 with 0 pkgs
Spawning worker 3 with 0 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete

  • 配置新的yum仓库

    [root@room9pc01 /]# vim /etc/yum.repos.d/dvd.repo   #创建仓库文件
    [dvd]
    name=pan
    baseurl=file:///mnt          #路径
    enabled=1
    gpgcheck=0
    [dee]                       #第二个仓库
    name=fei
    baseurl=file:///root/pan      #路径
    enabled=1
    gpgcheck=0

你可能感兴趣的:(yum配置)