centos_6.5 64-bit installation puppet

Source: Internet
Author: User

We first prepare three CentOS 6.5 x86_64 machines and do the work before installation.

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)

First, do the preparation of the installation:

  1. Close selinux,iptables on both master and client:

    Stop Iptables

    [[email protected] ~] # service iptables stop
    Iptables: Clear firewall Rules:                                   [ OK ]
    Iptables: Uninstalling module:                                      [ OK ]
    [[email protected] ~] # Chkconfig--list |grep iptables

    Iptables 0: Off 1: Off 2: enable 3: Enable 4: Enable 5: enable 6: Off

    [email protected] ~]# chkconfig ptables off

    Turn off SELinux

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


    # This file controls the state of the 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 changed into selinux=disabled
    # selinuxtype= can take one of these the values:
    # targeted-targeted processes is protected,
    # Mls-multi level Security protection.
    selinuxtype=targeted

  2. To ensure that you can request the correct valid certificate from the master host, it is recommended that both master and client set up 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: Close     1: Close     2: enable     3: enable      4 :     5: enable     6: Off closed
    ntpdate            0: Off     1: Close     2: Close     3: Close     4: Close     5: Close     6: Close

    [[email protected] ~]# service ntpd Start
    is starting ntpd:                                              [ OK ]

  3. set hosts on master and client

    Puppet requires all machines have a full domain name, if there is no DNS server to provide the domain name, you can set the hostname on the machine ( note : to First Set the hostname before installing Puppet , because the hostname is written to the certificate when the Puppet is installed, this certificate is required for client and server communication, and I configured/etc/hosts in order to simplify the installation process.

    [[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. Install puppet official source

    [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

Second,master-side installation configuration

  1. Installing puppet -server

    [email protected] ~]# yum-y Install Puppet-server

  2. Add auto-sign certificate

    Edit the/etc/puppet/puppet.conf file, add autosign = True in the [main] section, Strong>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 is kept.
        # The default value is ' $confdir/ssl '.
        ssldir = $vardir/ssl
        autosign = True
        Server = master.com

  3. Start puppetmaster

    [[email protected] ~]# service puppetmaster start

    Start puppetmaster: [ OK ]

    [email protected] ~]# NETSTAT-TUNLP | grep:8140

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

  4. Boot up

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

    [email protected] ~]# chkconfig puppetmaster on

    [email protected] ~]# chkconfig--list |grep puppet
    Puppet 0: Off 1: Off 2: Off 3: Off 4: off 5: off 6: Off
    puppetmaster 0: Off 1: Off 2: enable 3: enable 4: Enable 5: enable 6: Off

Third, client installation configuration

  1. Puppet Installation

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

  2. Specify the puppet server for the client and turn on the push feature of master

    Edit the/etc/puppet/puppet.conf file, add listen = True,server = master.com in the [Agent] segment

    [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 is 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.  a
        # extension indicating the cache format is added automatically.
        # The default value is ' $confdir/localconfig '.
        localconfig = $vardir/localconfig
            Server = master.com

    Edit the/etc/puppet/auth.conf file and add the following statement to the Auth/bottom

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

    Path/run
    Method Save
    Allow master.com

  3. Start Client

    [email protected] ~]# Service puppet Start
    Starting puppet agent: [ OK ]

    [email protected] ~]# NETSTAT-TUNLP | grep:8139
    TCP 0 0 0.0.0.0:8139 0.0.0.0:* LISTEN 15038/ruby

  4. Boot up

    [email protected] ~]# chkconfig puppet on

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

    Puppet 0: Off 1: Off 2: enable 3: Enable 4: Enable 5: enable 6: Off

This article is from the "Operations ing" blog, please be sure to keep this source http://8596830.blog.51cto.com/8586830/1688466

centos_6.5 64-bit installation puppet

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.