Centos yum快速安装puppet,yum源安装puppet-server
一,配置yum源cd /etc/yum.repos.d/
vim puppet.repo
name=Puppet Labs Packagesbaseurl=http://yum.puppetlabs.com/base/enabled=0gpgcheck=0 vim epel.repo
name=Extra Packages for Enterprise Linux 5 -$basearch
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch
failovermethod=priority
enabled=0
gpgcheck=0
name=epel puppet
baseurl=http://tmz.fedorapeople.org/repo/puppet/epel/5/$basearch/
enabled=0
gpgcheck=0
编码 问题会有一个乱码:mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch
vim ruby.repo
name=rubybaseurl=http://repo.premiumhelp.eu/ruby/gpgcheck=0enabled=0 puppet 2.6 需要 ruby 1.8.6 去运行 puppet-dashboard
升级ruby
# yum --enablerepo="ruby" update ruby如果你没有安装ruby 请使用:#yum -y install ruby 安装 Puppet Server
Server端:On your puppetmaster server:
# yum --enablerepo=epel,epel-puppet install puppet-server Client 端:On your puppet client
# yum --enablerepo="epel,epel-puppet" install puppet Server端配置site.pp
vim /etc/puppet/site.pp
node default {
file { “/tmp/temp1.txt”: content => “hello,first puppet manifest”; }
}
Client端配置hostsname
echo ‘client.example.com’ > /etc/hostname
hostname -F /etc/hostname
Client端运行:
puppetd --server master.example.com --test 上面的命令让puppetd 从 master.example.com 去读取puppet配置文件. 第一次连接,双方会进行ssl证书的验证,这是一个新的客户端,在服务器端那里还没有被认证,因此需要在服务器端进行证书认证.
在服务器端的机器上执行下面的命令来认证客户端的证书
Server端:
puppetca -s client.example.com 然后再重新在客户端执行
puppetd --server master.example.com --test 配置完成。
参考:http://www.craigdunn.org/2010/08/part-1-installing-puppet-2-6-1-on-centos-with-yumrpm/
页:
[1]