#forinstallpuppetclient#bylinyd2013/1/30#puppetversion2.7.3SERVER_HOST_NAME=""#puppetserverhostnameCLIENT_HOST_NAME=""#puppetclienthostnameSERVER_IP=""#puppetserveripCLIENT_IP=""#puppetclientippath=`pwd`########ntpdatetime#########/sbin/ntpdate210.72.145.44echo"$SERVER_HOST_NAME$SERVER_IP">/etc/hostsecho"$CLIENT_HOST_NAME$CLIENT_IP">/etc/hosts###startinstallcd$pathyum-yinstallrubyruby-develruby-rdocruby-irbtar-zxvffacter-1.6.5.tar.gz/usr/bin/rubyinstall.rbcd..tar-zxvfpuppet-2.7.20.tar.gzcdpuppet-2.7.20/usr/bin/rubyinstall.rbcpconf/auth.conf/etc/puppetcpconf/namespaceauth.conf/etc/puppetcpconf/redhat/puppet.conf/etc/puppetcpconf/redhat/client.init/etc/init.d/puppetchmod+x/etc/init.d/puppetsed-i"s#localconfig.*#&\nlisten=true\nserver=$SERVER_HOST_NAME#"/etc/puppet/puppet.conf#echo"listen=true">>/etc/puppet/puppet.conf#echo"server=$SERVER_HOST_NAME">>/etc/puppet/puppet.confsed-i"s/allow.*/allow$SERVER_HOST_NAME/"/etc/puppet/namespaceauth.confsed-i"/path\//i#toshowthedefaultpolicywhichisdenyeverythingelse\npath\/run\nmethodsave\nallow$SERVER_HOST_NAME\n"/etc/puppet/auth.conf/usr/sbin/puppetmasterd--mkusers/etc/init.d/puppetstartecho"############################"echo"puppetstatus"/usr/sbin/lsof-i:8139/usr/sbin/lsof-i:8140echo"----------------------------"