#for Install puppet client #by linyd 2013/1/30 #puppet version 2.7.3 "" #puppet server hostname client_host_name= "" #puppet CLIENT hostname server_ip= "" #puppet Server IP client_ip= "" #puppet CLIENT IP path= ' pwd ' ######## NT Pdate time #########/sbin/ntpdate 210.72.145.44 echo "$SERVER _host_name $SERVER _ip" >/etc/hosts ech O "$CLIENT _host_name $CLIENT _ip" >/etc/hosts ### start install CD $path yum-y install Ruby
Ruby-devel ruby-rdoc RUBY-IRB tar-zxvf facter-1.6.5.tar.gz/usr/bin/ruby install.rb CD. TAR-ZXVF puppet-2.7.20.tar.gz CD Puppet-2.7.20/usr/bin/ruby install.rb CP conf/auth.conf/etc/puppet 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
Sed-i "S#localconfig. *#&\n Listen = true\n Server = $SERVER _host_name#"/etc/puppet/puppet.conf #echo "Listen = True" >>/etc/puppet/puppet.conf #echo "server = $SERVER _host_name" >>/etc/puppet/pupp et.conf sed-i "S/allow.*/allow $SERVER _host_name/"/etc/puppet/namespaceauth.conf sed-i "/path \//i# to show the"
Default policy which is deny everything Else\npath \/run\nmethod save\nallow $SERVER _host_name\n "/etc/puppet/auth.conf /usr/sbin/puppetmasterd--mkusers/etc/init.d/puppet start echo "############################ echo" Puppet status "/usr/sbin/lsof-i:8139/usr/sbin/lsof-i:8140 echo"----------------------------"
Source: http://tntdba.blog.51cto.com/1199791/1131487