1.设置 /etc/sysconfig/network
master:
# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=master.zjcap.cn
client:
#
cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=slave-puppet.zjcap.cn
2.设置 /etc/hosts ,此处就可以不用配置 dns
# vim /etc/hosts
192.168.32.104 master.zjcap.cn
192.168.32.105 puppet-client.zjcap.cn
3.同步时间
# yum -y install ntp
# ntpdate time.windows.com > /dev/null 2>&1
添加计划任务:
*/10 * * * *
ntpdate time.windows.com > /dev/null 2>&1
4.开始安装:
安装 puppet 源:
# rpm -ivh "
http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-7.noarch.rpm"
安装服务端程序:(客户端)
# yum -y install puppet-server (# yum -y install puppet)
启动服务:
# service puppetmaster start (# service puppet start)
开机启动:
# chkconfig puppetmaster on (# chkconfig puppet on)
查看进程跟端口:
服务端: ps -ef | grep puppet ; netstat -nlp | grep ruby
客户端: ps -ef | grep puppet ;
5.配置文件(客户端)
# vim /etc/puppet/puppet.conf 添加
listen = True
server = master.zjcap.cn
runinterval = 30
重启服务
报错:puppet dead but pid file exists
rm -rf /var/run/puppet/agent.pid