自动化运维之 - puppet client端安装
客户端客户端环境
[*]# lsb_release -a
[*]LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
[*]Distributor ID: CentOS
[*]Description: CentOS release 5.9 (Final)
[*]Release: 5.9
[*]Codename: Final
[*]
[*]# cat /etc/redhat-release
[*]CentOS release 5.9 (Final)
[*]
[*]# uname -a
[*]Linux web01 2.6.18-348.el5 #1 SMP Tue Jan 8 17:53:53 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
安装:
[*]# mkdir soft
[*]
[*]# cd soft/
[*]
[*]# wget http://puppetlabs.com/downloads/facter/facter-1.7.0.tar.gz
[*]
[*]# wget http://puppetlabs.com/downloads/puppet/puppet-2.7.21.tar.gz
[*]
[*]# yum -y install ruby ruby-devel ruby-libs ruby-shadow
[*]
[*]# tar xf puppet-2.7.21.tar.gz
[*]
[*]# tar xf facter-1.7.0.tar.gz
[*]
[*]# cd facter-1.7.0
[*]
[*]# ./install.rb
[*]
[*]# cd ../puppet-2.7.21
[*]
[*]# ./install.rb
[*]
[*]# cp conf/namespaceauth.conf /etc/puppet/
[*]
[*]# cp conf/redhat/puppet.conf /etc/puppet/
[*]
[*]# cp conf/redhat/client.init /etc/init.d/puppet
[*]
[*]# chmod +x /etc/init.d/puppet
[*]
[*]# chkconfig puppet on
[*]
[*]# chmod 644 /etc/passwd
[*]
[*]# chmod 644 /etc/shadow
[*]
[*]# chmod 644 /etc/group
[*]
[*]# chmod 644 /etc/gshadow
[*]
[*]# puppetmasterd --mkusers
添加hosts
[*]# vim /etc/hosts 添加server
[*]127.0.0.1 localhost.localdomain localhost web01
[*]::1 localhost6.localdomain6 localhost6
[*]172.16.10.252 Centos-server
[*]172.16.10.2 web01
[*]# vim /etc/puppet/puppet.conf
[*] Listen = true
[*] Server = Centos-server
[*]# vim /etc/puppet/namespaceauth.conf
[*]
[*] allow *
[*]
[*]
[*] allow *
[*]
[*]
[*] allow *
[*]
[*]
[*] allow *
[*]
[*]
[*] allow *
[*]
[*]
[*] allow *
[*]# /etc/init.d/puppet start
[*]Starting puppet:
[*] # netstat -tulnp
[*]Active Internet connections (only servers)
[*]Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
[*]tcp 0 0 0.0.0.0:8140 0.0.0.0:* LISTEN 6491/ruby
[*]tcp 0 0 0.0.0.0:2222 0.0.0.0:* LISTEN 3095/sshd
页:
[1]