34r2312 发表于 2015-1-15 08:10:01

Puppet Master安裝手冊(CentOS 7)

Puppet Master安装注意:Puppet Master不支持Windows平台,Puppet Agent支持Windows,但不是很理想.因为foreman最低要求CentOS 6,所以建议使用6以上版本或使用Ubuntu 10以上版本。 本篇以CentOS 7为例安装Puppet Master 1.系统准备工作:
最小化安装CentOS 7,
1
2
3
4
5
6
7
# yum update                                                          #更新系统包至最新
# hostnamectl --staticset-hostname johnpuppet      #设置主机名
# yum -y install ntp                                                #安装ntp包
# ntpdate $NTP_SERVER_IP                              #时间同步
# systemctl stopfirewalld.service                     #关闭防火墙
# systemctl disable firewall                                 #禁用防火墙开机启动
# sed -i ‘s/\=enforcing/\=disabled/g’/etc/selinux/config               #关闭SELINUX





Master端
1
2
3
4
# cat <<EOF >>/etc/hosts                                    #配置hosts解析(测试环境没有DNS)
>192.168.1.189               johnpuppet
>192.168.1.198               puppetagent1.test.com
>EOF





Agent端# cat <<EOF>>/etc/hosts                                    #配置hosts解析(测试环境没有DNS)>192.168.1.189               johnpuppet>192.168.1.198               puppetagent1.test.com> EOF                                                                2.使用官方YUM源安装puppetmaster:
# rpm -ivhhttp://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm# yum -y install puppet-server 3.配置puppet.conf
# vim /etc/puppet/puppet.conf在agent字段添加:server = johnpuppet在master字段添加:report = truereports = log    4.启动puppetmaster
# systemctl enablepuppetmaster.service   #puppetmaster开机启动# systemctl enable puppet.service                            #puppet开机启动# systemctl start puppetmaster                        #启动puppetmaster# systemctl start puppet                                             #启动puppet 5.Agent申请证书验证
在agent上,# puppet agent –test在master上,# puppet cert list –all                                          #查看证书列表# puppet cert sign –all                                          #签发所有请求证书Master证书自动签发

页: [1]
查看完整版本: Puppet Master安裝手冊(CentOS 7)