用户收集的其他软件包需要手工创建repodata数据文件和存放目录,使用工具createrepo 创建
服务器端:在此基础上运行
[root@localhost ~]# mkdir /var/ftp/other
rz 将软件包上传进来
[root@localhost ~]# cd var/ftp/other
[root@localhost other]# ls
attr-2.4.46-12.el7.x86_64.rpm audit-2.7.6-3.el7.x86_64.rpm
[root@localhostother]# createrepo -g /var/ftp/centos/repodata/repomd.xml ./
[root@localhost other]# ls
attr-2.4.46-12.el7.x86_64.rpm audit-2.7.6-3.el7.x86_64.rpm repodata //发现生成了repodata
客户端:
[root@localhost yum.repos.d]# vim /etc/yum.repos.d/CentOS-Media.repo
设置成如下操作:多加【other一列】
[root@localhost yum.repos.d]# yum clean all
[root@localhost yum.repos.d]# yum makecache 重建缓存
生成缓存的时候,有两列 c7-media other说明有两个yum源