5.1, install cobbler:
Reference "linux cluster operation and maintenance _ _01 (35, cobbler automated installation of the operating system :)"
5.2, cobbler yum source common operations command:
cobbler repo add add yum source
cobbler repo copy Copy
cobbler repo edit modification
cobbler repo find Find
cobbler repo list yum source lists have been added
cobbler repo remove delete an added source of local yum
cobbler repo rename rename a source of local added
cobbler repo report lists detailed information about all sources
5.3, by adding the command yum repository:
[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, view the added warehouse:
[root@slave-node2 ~]# cobbler repo list
Centos7-SaltStack
5.5, specify a particular warehouse synchronization:
[root@slave-node2 ~]# cobbler reposync --only=Centos7-SaltStack
If the synchronization of all removed '--only = Centos7-SaltStack' parameter is all the synchronization yum repository;
5.6, see the yum package synchronization:
[root@slave-node2 ~]# ls /var/www/cobbler/repo_mirror/Centos7-SaltStack
5.7, yum source disposed on other machines:
[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, verify yum source:
[root@slave-node2 ~]# yum repolist enabled
Loaded plugins: 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
Source identifies the source state name
Centos7-SaltStack local-Centos7-SaltStack-2019_2 83