预计阅读本页时间:-
5.5.1 如何同步Puppet-Client端上的常用服务
在同步Puppet-Client端上的常用服务之前,会有如下要求:
·开启httpd服务和postfix服务。
广告:个人专属 VPN,独立 IP,无限流量,多机房切换,还可以屏蔽广告和恶意软件,每月最低仅 5 美元
·关闭vsftpd服务。
同步的步骤其实并不复杂,还是在服务器端/etc/puppet/manifests的site.pp文件上进行操作,内容如下(为了实验方便,请提前用yum安装好下面的服务):
service {
["httpd","postfix">:
ensure => running;
"vsftpd":
ensure => stopped;
}
Puppet-Client端顺利连接上服务器端后,以节点机器client.cn7788.com 为例,正常显示结果应该如下所示:
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Caching catalog for client.cn7788.com
Info: Applying configuration version '1446608434'
Notice: /Stage[main]/Main/Service
Info: /Stage[main]/Main/Service
Notice: Finished catalog run in 1.60 seconds
在客户端机上输入命令验证下实验结果:
service postfix status
master (pid 10028) is running...
service httpd status
httpd (pid 9603) is running...
service vsftpd status
vsftpd is stopped
结果表明需求已经正确完成了。