Recently, I took the time to study puppet, a foreign open-source software that is said to be a powerful tool for O & M in the circle. I originally wanted to compile the latest integrated documentation, and finally reported various errors during the debugging process, according to a google article by a foreigner, there were many incompatibility situations in the latest version. Later, I gave up and found a compatible version. The test was successful and I had to wait for two days, this is really a pitfall. Now I have integrated my experiences into documents for you to share.
System Environment: CentOS6.3
Puppet: puppet-2.7.13.
Facter: facter-1.6.5
Ruby: yum Source
Note:
Facter is used to obtain client system information (such as hostname, ip address, OS-Version, and fqdn)
Ruby is the development environment of puppet.
Puppet server: 192.168.7.196
Puppet client: 192.168.7.197
(Server) for server-only Configuration
(Client) for client-only Configuration
(Server, client) for server and client Configuration
1. Configure the environment (server, client ):
1. Disable iptables and selinux (server, client)
# Service iptables stop
# Setenforce 0
# Vi/etc/sysconfig/selinux
---------------
SELINUX = disabled
---------------
2. Install the ruby Development Environment (centos6.3 default update source) (server, client)
# Yum-y install ruby *
3. Scheduled synchronization time: (server, client)
Synchronization time every 5 minutes
# Crontab-e
-------------
*/5 */usr/sbin/ntpdate-u asia.pool.ntp.org
-------------
# Service crond restart
# Chkconfig crond on
4. Modify the HOST and HOST Name of the server and client:
(Server, client)
# Vi/etc/hosts
-------------------
192.168.7.196 server.example.com server
192.168.7.197 client.example.com client
-------------------
(Server)
# Vi/etc/sysconfig/network
----------------
HOSTNAME = server.example.com
----------------
(Client)
# Vi/etc/sysconfig/network
----------------
HOSTNAME = client.example.com
----------------