在Ubuntu上快速安装最新版本的Puppet
虽然Ubuntu的官方软件源中已经加入了Puppet,但是官方源中的Puppet版本太老,不但很多新功能没有,而且旧版本还可能有bug(比如在Puppet 2.6.4版本中的一个重大bug #6541 会在not-a-checksum MD5不对的情况下清空 file 文件【消息来源】)。结果就是我们仍然不得不手动安装Puppet。
Screenage的博主,资深Linux咨询师与系统管理员Caspar Clemens Mierau提供了两个脚本可以快速安装Puppet,大大简化了安装过程。
客户端安装:
$ bash < <(wget -qO - https://bit.ly/install-puppet-agent)
Master安装:
$ bash < <(wget -qO - https://bit.ly/install-puppet-master)
https://raw.github.com/moviepilot/puppet/master/tools/install-puppet-agent.sh
https://raw.github.com/moviepilot/puppet/master/tools/install-puppet-master.sh
不放心的朋友们可以自己检查脚本内容。
客户端安装脚本:
#!/bin/bash if [ "$(id -u)" != "0" ]; then echo "This script must be run as root" 1>&2 exit 1 fi # refresh package list apt-get update # bootstrap ruby env apt-get -y install irb libopenssl-ruby libreadline-ruby rdoc ri ruby ruby-dev git-core # get a working gem version and update it to the most recent one cd /usr/local/src wget http://production.cf.rubygems.org/rubygems/rubygems-1.5.2.tgz tar -xzf rubygems-1.5.2.tgz cd rubygems-1.5.2 ruby setup.rb update-alternatives --install /usr/bin/gem gem /usr/bin/gem1.8 1 gem update --system # install puppet itself gem install puppet --no-ri --no-rdoc
Master端安装脚本:
#!/bin/bash if [ "$(id -u)" != "0" ]; then echo "This script must be run as root" 1>&2 exit 1 fi # refresh package list apt-get update # bootstrap ruby env apt-get -y install irb libopenssl-ruby libreadline-ruby rdoc ri ruby ruby-dev git-core # get a working gem version and update it to the most recent one cd /usr/local/src wget http://production.cf.rubygems.org/rubygems/rubygems-1.5.2.tgz tar -xzf rubygems-1.5.2.tgz cd rubygems-1.5.2 ruby setup.rb update-alternatives --install /usr/bin/gem gem /usr/bin/gem1.8 1 gem update --system # install puppet itself gem install puppet --no-ri --no-rdoc # we want sqlite3 and rails for stored configs on the puppet master apt-get -y install sqlite3 libsqlite3-ruby libsqlite3-dev gem install sqlite3-ruby --no-ri --no-rdoc gem install rails -v 2.3.11 --no-ri --no-rdoc
)
相关推荐
zhangwentaohh 2020-06-05
YJWcsdn 2020-01-17
84453864 2020-01-17
tanzhe0 2020-01-13
小新没有蜡笔 2019-12-11
nicolesmile 2019-12-04
ppppfly 2015-08-20
83274251 2012-05-09
sxjinmingjie 2019-06-30
winxcoder 2019-06-28
80327065 2019-06-27
xinluke 2019-03-17
mayongzhancsdn 2018-04-26
83317360 2018-05-28
onepiecedn 2013-11-02
88971932 2013-05-23
Justypc 2013-05-23
ballyyang 2012-11-10