How to install and set up Puppet in CentOS 5.5

  
                

Under Linux, Puppet is a centralized configuration management system with its own description language. If you want to develop Puppet, you need to use Puppet tool. The following small series takes CentOS 5.5 as an example to introduce you to CentOS 5.5 installation and configuration. Puppet's method.

a: Puppet is an automated configuration management tools, the most commonly used in C /S architecture.

The syntax of puppet allows you to create a separate script to create a user on the target host. All target hosts will then interpret and execute the module using the syntax appropriate for the local system. If it is executed in RedHat, the useradd command is used; if it is in FreeBSD, the adduser command is used. In addition, puppet has great flexibility.

2: Installation preparation:

Two CentOS 5.5 32-bit machines

Host IP and host name

172.16.100.10 server.tech10.com< Br>

172.16.100.11 slave.tech11.com

facter: http://puppetlabs.com/downloads/facter/facter-1.5.9.tar.g

puppet: Http://puppetlabs.com/downloads/puppet/puppet-2.6.3.tar.gz

Three: Installation steps

1:rpm -Uvh http://dl.Fedoraproject. Org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

yum install mysql mysql-devel mysql-server ruby ​​ruby-devel ruby-irb ruby-mysql ruby-rdoc ruby -ri

View the version of Ruby, the version is 1.8.5

Install facter and puppet

tar zxvf facter-1.5.9

cd facter -1.5.9

ruby ​​install.rb

tar zxvf puppet-2.6.3.tar.gz

cd puppet-2.6.3

ruby Install.rb

The above steps are executed on two machines

2:server configuration

a. Copy source files

mkdir /etc/puppet

cp conf/auth.conf /etc/puppet

cp conf/redhat/fileserver.conf /etc/puppet

cp conf/redhat/puppet.conf /etc/puppet

cp conf/redhat/server.init /etc/init.d/puppetmaster

chmod +x /etc/init.d /puppetmaster

chkconfig puppetmaster on

mkdir -p /etc/puppet/manifests

b.Creating a puppet account

groupadd puppet

useradd -g puppet puppet

puppetmasterd --mkusers

c.Create the appropriate directory

mkdir /var/lib/puppet /rrd

chown Puppet.puppet /var/lib/puppet/rrd

d.Starting the service

/etc/init.d/puppetmaster restart

Creating the first time you start it Required files, including certificate files, etc.

3:slave-side configuration

a.Copy files

mkdir /etc/puppet

cp conf/auth. Conf /etc/puppet

cp conf/namespaceauth.conf /etc/puppet

cp c Onf/redhat/puppet.conf /etc/puppet

cp conf/redhat/client.init /etc/init.d/puppet

chmod +x /etc/init.d/puppet

chkconfig --add puppet

chkconfig puppet on

b.Create puppet account

groupadd puppet

useradd -g puppet puppet

puppetd --mkusers
Previous12Next Total 2 Pages

Copyright © Windows knowledge All Rights Reserved