您好,登錄后才能下訂單哦!
- #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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。