centos_6.5 64位 安装puppet

我们先准备三台centos 6.5 x86_64机器,做好安装前的工作。

OS: Centos 6.5 x86_64

Puppet master: master.com (192.168.37.72)

Puppet clients: client1.com (192.168.37.83)

Puppet clients: client2.com (192.168.37.82)

一、先做好安装的准备工作:

  1. 在master和client均关闭selinux,iptables:

    停止iptables

    [[email protected] ~]# service iptables stop
    iptables:清除防火墙规则:                                 [确定]
    iptables:正在卸载模块:                                    [确定]
    [[email protected] ~]# chkconfig --list |grep iptables

    iptables           0:关闭    1:关闭    2:启用    3:启用    4:启用    5:启用    6:关闭

    [[email protected] ~]# chkconfig  ptables off

    关闭selinux

    [[email protected] ~]# vim /etc/selinux/config

    # This file controls the state of SELinux on the system.
    # SELINUX= can take one of these three values:
    #     enforcing - SELinux security policy is enforced.
    #     permissive - SELinux prints warnings instead of enforcing.
    #     disabled - No SELinux policy is loaded.
    SELINUX=enforcing 改成 SELINUX=disabled
    # SELINUXTYPE= can take one of these two values:
    #     targeted - Targeted processes are protected,
    #     mls - Multi Level Security protection.
    SELINUXTYPE=targeted

  2. 为了保证能向master主机申请到正确的有效证书,建议master和client设置ntp:

    [[email protected] ~]#  yum -y install ntp

    [[email protected] ~]#  ntpdate pool.ntp.org

    [[email protected] ~]#  chkconfig ntpd on

    [[email protected] ~]# chkconfig --list|grep ntp

    ntpd               0:关闭    1:关闭    2:启用    3:启用    4:启用    5:启用    6:关闭
    ntpdate            0:关闭    1:关闭    2:关闭    3:关闭    4:关闭    5:关闭    6:关闭

    [[email protected] ~]# service ntpd start
    正在启动 ntpd:                                            [确定]

  3. 在master和client端设置hosts

    Puppet 要求所有机器有完整的域名,如果没有 DNS 服务器提供域名的话,可以在机器上设置主机名(注意:要先安装
    Puppet之前设置主机名,因为安装 Puppet
    时会把主机名写入证书,客户端和服务端通信需要这个证书),为了简化安装过程我配置了/etc/hosts。

    [[email protected] ~]# vim /etc/hosts

    127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
    192.168.37.72 master.com
    192.168.37.83 client1.com
    192.168.37.82 client2.com

  4. 安装puppet官方源

    [[email protected] ~]# wget http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-7.noarch.rpm

    [[email protected] ~]# rpm -ivh puppetlabs-release-6-7.noarch.rpm

    [[email protected] ~]# yum update

二、Master端安装配置

  1. 安装 puppet-server

    [[email protected] ~]# yum -y install puppet-server

  2. 添加自动签发证书

    编辑 /etc/puppet/puppet.conf 文件, 在[main]段内加入 autosign = true,server = master.com

    [[email protected] ~]# vim /etc/puppet/puppet.conf

    [main]
        # The Puppet log directory.
        # The default value is ‘$vardir/log‘.
        logdir = /var/log/puppet

    # Where Puppet PID files are kept.
        # The default value is ‘$vardir/run‘.
        rundir = /var/run/puppet

    # Where SSL certificates are kept.
        # The default value is ‘$confdir/ssl‘.
        ssldir = $vardir/ssl
        autosign = true
        server = master.com

  3. 启动Puppetmaster

    [[email protected] ~]# service puppetmaster start

    启动 puppetmaster:                                        [确定]

    [[email protected] ~]#  netstat -tunlp | grep :8140

    tcp        0      0 0.0.0.0:8140                0.0.0.0:*                   LISTEN      9148/ruby

  4. 开机启动

    [[email protected] ~]# chkconfig --list |grep puppet
    puppet             0:关闭    1:关闭    2:关闭    3:关闭    4:关闭    5:关闭    6:关闭
    puppetmaster       0:关闭    1:关闭    2:关闭    3:关闭    4:关闭    5:关闭    6:关闭

    [[email protected] ~]# chkconfig puppetmaster on

    [[email protected] ~]# chkconfig --list |grep puppet
    puppet             0:关闭    1:关闭    2:关闭    3:关闭    4:关闭    5:关闭    6:关闭
    puppetmaster       0:关闭    1:关闭    2:启用    3:启用    4:启用    5:启用    6:关闭

三、客户端安装配置

  1.  puppet 安装

    [[email protected] ~]# yum -y install puppet

  2. 为客户端指定puppet服务器,并开启Master的推送功能

    编辑 /etc/puppet/puppet.conf 文件,在[agent]段内加入 listen = true,server = master.com

    [[email protected] ~]# vim /etc/puppet/puppet.conf

    [agent]
        # The file in which puppetd stores a list of the classes
        # associated with the retrieved configuratiion.  Can be loaded in
        # the separate ``puppet`` executable using the ``--loadclasses``
        # option.
        # The default value is ‘$confdir/classes.txt‘.
        classfile = $vardir/classes.txt

    # Where puppetd caches the local configuration.  An
        # extension indicating the cache format is added automatically.
        # The default value is ‘$confdir/localconfig‘.
        localconfig = $vardir/localconfig
        listen = true
        server = master.com

    编辑 /etc/puppet/auth.conf 文件, 在 auth / 最下面加入以下语句

    [[email protected] ~]# vim /etc/puppet/auth.conf

    path /run
    method save
    allow master.com

  3. 启动client

    [[email protected] ~]# service puppet start
    Starting puppet agent:                                     [确定]

    [[email protected] ~]#  netstat -tunlp | grep :8139
    tcp        0      0 0.0.0.0:8139                0.0.0.0:*                   LISTEN      15038/ruby

  4. 开机启动

    [[email protected] ~]# chkconfig puppet on

    [[email protected] ~]# chkconfig --list |grep puppet

    puppet             0:关闭    1:关闭    2:启用    3:启用    4:启用    5:启用    6:关闭

时间: 2024-08-25 15:38:20

centos_6.5 64位 安装puppet的相关文章

在CentOS .65 64位安装OpenMeetings .3.0.1

OpenMeetings是一个多语言可定制的视频会议和协作系统.它支持音频.视频,能让你查看每个与会者的桌面.OpenMeetings还包含一个白板,通过白板可以导入各种格式的图片和涂鸦. 其特色功能是白板功能,可以演示doc,ppt,pdf,jpg,txt等众多格式文件. 下面我们进入安装过程. 注意: OpenMeetings需要OpenOffice或者LibreOffice的支持 所以安装系统的时候把桌面何JDK安装上 这里我安装系统的时候已经将开发包,桌面,办公套件(office),My

ubuntu12.04 64位 安装w3af以及相关问题的解决

ubuntu12.04 64位下安装w3af: sudo apt-get install w3af 解决安装之后w3af_console不能运行的问题: 运行w3af_console会提示如下错误: /usr/bin/w3af_console: 3: /usr/bin/w3af_console: /usr/bin/python2.5: not found这是由于ubuntu12.04自带的python已经升级成2.7所致 修改/usr/bin/w3af_console sudo gedit /u

oracle 11g R2 64位 安装详细步骤

(oracle 11g R2 64位 + PLSQLDeveloper安装说明以及PLSQL Developer+ ORCALE11-instantclient-basic-win32-11.2.0.1.0连接oracle 11g R2 64位详细步骤) 第一步: 准备工具 1.oracle 11g R2 64位安装包 2.PLSQL Developer v11.0.2.1766 官方中文版(内含PLSQL Developer安装程序.汉化程序.PLSQL Developer注册程序.PLSQL

hadoop2.5发布:最新编译 32位、64位安装、源码包、API以及新特性

hadoop2.5发布:最新编译 32位.64位安装.源码包.API以及新特性 http://www.aboutyun.com/thread-8751-1-1.html (出处: about云开发) 问题导读:1.如何获取Hadoop安装包?2.编译Hadoop过程中,需要注意哪些问题?3.如何寻找API?4.如何获取Hadoop源码? 上述问题有的在本文,有的则在本文链接,感兴趣,可以找找答案 2014年08月06日 Hadoop2.5发布 官网下载地址 对Hadoop2.5进行了编译,编译的

ubuntu 12.04 64位 安装wps

1.去wps官网下载linux版的软件 http://community.wps.cn/download/ 我这里下载的是Alpha版的kingsoft-office_9.1.0.4280~a12p4_i386.deb 2.安装wps需要一些依赖包: libtiff.so.4 libpng12.so.0 libjpeg.so.62 用以下命令可以查看系统是否有它们: aptitude search libtiff 没有的话可以用以下命令安装: sudo apt-get install aptit

ubuntu14.04 64位安装WPS(成功解决没有ia32-libs的问题)

前几天,就把自己的系统换成了ubuntu14.04 64位的.然后就是安装WPS了(戳这里进入官网下载).由于官网提供的WPS是32位的操作系统,所以64位的操作系统不能用.因此我们还要安装32位操作系统的库文件.官网提供的方法为: 但是发现ubuntu14.04根本就没有这个.在网上找了大半天,试了好多办法都没有用,今天又来谷歌,终于找到一个可行的办法.下面是我的一些操作: [email protected]:~$ sudo passwd root [sudo] password for zh

window7 64位 安装配置php5.5+apache2.4+Mysql

开始安装时,参考了http://www.cnblogs.com/dreamhome/archive/2012/10/30/2747147.html,这篇文章,但是这篇文章有些地方讲的不是很全. 但是现在最新的mysq都是免安装的,所以又参考了http://supportopensource.iteye.com/blog/1415527, 遇到的错误 1.apache无法启动加载php5apache2_4.dll httpd: Syntax error on line 176 of D:/apac

win7 64位安装redis 及Redis Desktop Manager使用

win7 64位安装redis 及Redis Desktop Manager使用     喻高咏 论坛徽章: 3 写基于dapper的一套自动化程序,看到 mgravell的另一个项目,StackExchange.Redis,之前在.NET上用过一段时间redis,不过一直是其它的驱动开发包,这个根据作者介绍,是个高性能的线程安全的.NET c#开发redis客户端的库.说的很吊,不过我确信mgravell出品的东西都是精品.说多无益,先把redis在win上的开发环境搭一下.redis官方没有

hadoop2.6.0汇总:新增功能最新编译 32位、64位安装、源码包、API下载及部署文档

相关内容: hadoop2.5.2汇总:新增功能最新编译 32位.64位安装.源码包.API.eclipse插件下载Hadoop2.5 Eclipse插件制作.连接集群视频.及hadoop-eclipse-plugin-2.5.0插件下载hadoop2.5.1汇总:最新编译 32位.64位安装.源码包.API下载及新特性等 新手指导:hadoop官网介绍及如何下载hadoop(2.4)各个版本与查看hadoop API介绍 从零教你在Linux环境下(ubuntu 12.04)如何编译hadoo