- #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 "----------------------------"
创新互联www.cdcxhl.cn,专业提供香港、美国云服务器,动态BGP最优骨干路由自动选择,持续稳定高效的网络助力业务部署。公司持有工信部办法的idc、isp许可证, 机房独有T级流量清洗系统配攻击溯源,准确进行流量调度,确保服务器高可用性。佳节活动现已开启,新人活动云服务器买多久送多久。
创新互联公司专注于苍梧企业网站建设,成都响应式网站建设,商城网站开发。苍梧网站建设公司,为苍梧等地区提供建站服务。全流程按需网站制作,专业设计,全程项目跟踪,创新互联公司专业和态度为您提供的服务
当前题目:puppet系列之puppet客户端安装脚本-创新互联
转载源于:https://www.cdcxhl.com/article42/jsjec.html
成都网站建设公司_创新互联,为您提供网站导航、App开发、Google、小程序开发、外贸建站、品牌网站建设
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联