puppet
做实验时客户端的puppet进程起不来,删掉重新ssl认证有好了,怎么重启虚拟机后puppet ssl证书老是同步错误。后面查到原因是虚拟机的时间没有同步。
软件下载
http://downloads.puppetlabs.com/puppet/puppet-2.7.13.tar.gz
facter下载地址:
http://downloads.puppetlabs.com/facter/facter-1.6.7.tar.gz
ruby下载地址:
http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7.tar.gz
安装的步骤:
master:
1.安装ruby环境
ruby我这里直接用的是yum安装的
yum install ruby ruby-devel ruby-libs
2.安装facter
tar xzvf facter-1.7.2.tar.gz
cd facter-1.7.2
ruby install.rb
3.安装puppet
tar -zxvf puppet-2.7.23.tar.gz
cd puppet-2.7.23
ruby install.rb
cp conf/auth.conf /etc/puppet/
cp conf/namespaceauth.conf /etc/puppet/
cp conf/redhat/puppet.conf /etc/puppet/
cp conf/redhat/server.init /etc/rc.d/init.d/puppetmaster
chmod +x /etc/rc.d/init.d/puppetmaster
cp sbin/puppet /sbin/
useradd puppet
/etc/init.d/puppetmaster start
chkconfig --add puppetmaster
chkconfig puppetmaster on
client:
安装ruby,和facter同master端前两个步骤
安装puppet
useradd puppet
chkconfig --add puppet
chkconfig puppet on
cp conf/auth.conf /etc/puppet/
cp conf/namespaceauth.conf /etc/puppet/
cp ext/redhat/puppet.conf /etc/puppet/
cp ext/redhat/client.init /etc/rc.d/init.d/puppet
chmod 755 /etc/rc.d/init.d/puppet
useradd puppet
chkconfig --add puppet
chkconfig puppet on
证书认证
#client
puppetd --test --server master
#master
puppetca --list #如果能看到证书就执行下面命令对说有证书请求签名
puppetca -s -a
简单测试
#master
vim /etc/puppet/manifests/site.pp
node default {
file { "/tmp/test.txt":
content => "hello"; }
}
#client
puppetd --test --server master
ok 安装成功,接下来可以根据需要写配置文件了