#!/bin/bash
echo "Install puppet client start"
yum -y install ruby
mkdir -p /home/oldboy/tools/
cd /home/oldboy/tools/
unzip puppet.zip
cd /home/oldboy/tools/puppet
#wget http://projects.puppetlabs.com/attachments/download/1101/facter-1.5.8.tar.gz
#wget http://projects.puppetlabs.com/attachments/download/1114/puppet-2.6.1.tar.gz
tar xf facter-1.5.8.tar.gz
cd facter-1.5.8
ruby install.rb
echo "check facter"
facter
echo "install puppet"
cd /home/oldboy/tools/puppet
tar zxf puppet-2.6.1.tar.gz
cd puppet-2.6.1
ruby install.rb
echo "configure puppet"
cp /home/oldboy/tools/puppet/puppetEtc.tar.gz /etc/
cd /etc
tar zxvf puppetEtc.tar.gz
echo "add crontab"
cp /etc/crontab /etc/crontab.ori
echo "#*/1 * * * * root /bin/sh /etc/puppet/autopuppetl.sh 2>&1 &" >>/etc/crontab
chmod 700 /etc/puppet/autopuppet.sh
2016-11-22
puppet客户端自动安装shell脚本
评论
发表评论
姓 名: