1、安装制作yum仓库的软件包和yum-priorities管理包
[root@master ~]# yum install createrepo yum-plugin-priorities
[root@master ~]# rpm -qa | egrep "createrepo|priorities"
createrepo-0.9.9-24.el6.noarch
yum-plugin-priorities-1.1.30-37.el6.noarch
2、启用 YUM 优先级功能
[root@master ~]# sed -i 's/0/1/g' /etc/yum/pluginconf.d/priorities.conf
[root@master ~]# cat /etc/yum/pluginconf.d/priorities.conf
[main]
enabled = 1
3、下载对应的puppet安装包到本地
puppetlabs官网http://yum.puppetlabs.com/
[root@master puppet]# wget http://yum.puppetlabs.com/el/6.4/products/x86_64/puppet-2.7.25-1.el6.noarch.rpm
[root@master puppet]# wget http://yum.puppetlabs.com/el/6.4/products/x86_64/puppet-server-2.7.25-1.el6.noarch.rpm
[root@master puppet]# wget http://yum.puppetlabs.com/el/6.4/products/x86_64/facter-1.7.6-1.el6.x86_64.rpm
4、本地制作puppet源
5、添加puppet的repo文件
[root@master yum.repos.d]# cat puppet.repo
[puppet]
name=puppet for centos6.4
baseurl=file:///home/puppet
enabled=1
gpgcheck=0
priority=1 #设置优先级为最高
6、安装官方puppetlabs源
[root@master puppet]# wget http://yum.puppetlabs.com/el/6.4/products/x86_64/puppetlabs-release-6-12.noarch.rpm
[root@master puppet]# rpm -ivh puppetlabs-release-6-12.noarch.rpm
warning: puppetlabs-release-6-12.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 4bd6ec30: NOKEY
Preparing... ########################################### [100%]
1:puppetlabs-release ########################################### [100%]
[root@master puppet]# ll /etc/yum.repos.d/puppet*
-rw-r--r-- 1 root root 1250 Apr 13 02:01 /etc/yum.repos.d/puppetlabs.repo
-rw-r--r-- 1 root root 97 Jul 2 16:40 /etc/yum.repos.d/puppet.repo
7、修改puppetlabs源和epel源优先级
priority=3
8、修改yum保存下载的安装包为本地缓存
[root@master ~]#vi /etc/yum.conf
keepcache=1 #设置保存下载的软件缓存
9、安装puppet软件
[root@master ~]#yum clean all
[root@master ~]#yum install puppet
10、复制yum缓存下来的安装包至之前创建的puppet本地源,然后更新repo
参考制作
http://kisspuppet.com/2014/01/26/puppet_create_repo/