码迷,mamicode.com
首页 > 其他好文 > 详细

Puppet Master安裝手冊(CentOS 7)

时间:2015-01-14 18:29:51      阅读:224      评论:0      收藏:0      [点我收藏+]

标签:puppet 安裝


Puppet Master安装

注意:Puppet Master不支持Windows平台,Puppet Agent支持Windows,但不是很理想.

因为foreman最低要求CentOS 6,所以建议使用6以上版本或使用Ubuntu 10以上版本。

 

本篇以CentOS 7为例安装Puppet Master

 

1.系统准备工作:

最小化安装CentOS 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

# 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 = true

reports = 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证书自动签发


Puppet Master安裝手冊(CentOS 7)

标签:puppet 安裝

原文地址:http://brotherhai.blog.51cto.com/529547/1603761

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!