标签:copy led tst 操作 配置yum源 -- pac ble mirror
5.1、安装cobbler:
参考"linux运维_集群_01(35、cobbler自动化安装操作系统:)"
5.2、cobbler yum源常用操作命令:
cobbler repo add 添加yum源
cobbler repo copy 复制
cobbler repo edit 修改
cobbler repo find 查找
cobbler repo list 列出已添加的yum源
cobbler repo remove 删除已添加的本地yum源
cobbler repo rename 重命名本地已添加的源
cobbler repo report 列出全部源的详细信息
5.3、通过命令添加yum仓库:
[root@slave-node2 ~]# cobbler repo add --name=Centos7-SaltStack --mirror=http://repo.saltstack.com/yum/redhat/7/x86_64/2019.2/ --arch=x86_64 --breed=yum
5.4、查看添加的仓库:
[root@slave-node2 ~]# cobbler repo list
Centos7-SaltStack
5.5、指定特定仓库进行同步:
[root@slave-node2 ~]# cobbler reposync --only=Centos7-SaltStack
如果同步所有去除‘--only=Centos7-SaltStack‘参数,则同步所有的yum仓库;
5.6、查看同步的yum软件包:
[root@slave-node2 ~]# ls /var/www/cobbler/repo_mirror/Centos7-SaltStack
5.7、在其它机器上配置yum源:
[root@slave-node2 ~]# cat /etc/yum.repos.d/local.repo
[Centos7-SaltStack]
name=local-Centos7-SaltStack-2019_2
baseurl=http://172.16.1.92/cobbler/repo_mirror/Centos7-SaltStack/
enable=1
gpgcheck=0
5.8、验证yum源:
[root@slave-node2 ~]# yum repolist enabled
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Centos7-SaltStack | 2.5 kB 00:00:00
Centos7-SaltStack/primary_db | 32 kB 00:00:00
源标识 源名称 状态
Centos7-SaltStack local-Centos7-SaltStack-2019_2 83
标签:copy led tst 操作 配置yum源 -- pac ble mirror
原文地址:https://www.cnblogs.com/LiuChang-blog/p/12324394.html