- #for install puppet client
- #by linyd 2013/1/30
- #puppet version 2.7.3
- SERVER_HOST_NAME="" #puppet server hostname
- CLIENT_HOST_NAME="" #puppet client hostname
- SERVER_IP="" #puppet server ip
- CLIENT_IP="" #puppet client ip
- path=`pwd`
- ######## ntpdate time #########
- /sbin/ntpdate 210.72.145.44
- echo "$SERVER_HOST_NAME $SERVER_IP" > /etc/hosts
- echo "$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/puppet.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 "----------------------------"
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。