Chinaunix首页 | 论坛 | 博客
  • 博客访问: 415774
  • 博文数量: 43
  • 博客积分: 613
  • 博客等级: 中士
  • 技术积分: 756
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-01 11:25
文章分类

全部博文(43)

文章存档

2016年(1)

2015年(5)

2014年(5)

2013年(14)

2012年(18)

分类: 系统运维

2015-12-25 15:54:50

    安装puppet需要安装ruby,facter,puppet,我选择使用源码安装,过程如下:
   1、安装ruby,我使用的版本是ruby-2.0.0-rc2

点击(此处)折叠或打开

  1. wget -P /opt/
  2. cd /opt/
  3. tar zxf ruby-2.0.0-rc2.tar.gz
  4. ./configure --prefix=/usr/local/webserver/puppet
  5. make
  6. make install
   在make时可能会报错:
   make[2]: *** [ossl_pkey_ec.o] Error 1
   make[1]: *** [ext/openssl/all] Error 2
   解决办法:
   修改文件ext/openssl/ossl_pkey_ec.c,增加标红部分

点击(此处)折叠或打开

  1. 753
  2. 754 if (id == s_GFp_simple) {
  3. 755 method = EC_GFp_simple_method();
  4. 756 } else if (id == s_GFp_mont) {
  5. 757 method = EC_GFp_mont_method();
  6. 758 } else if (id == s_GFp_nist) {
  7. 759 method = EC_GFp_nist_method();
  8. 760 #if !defined(OPENSSL_NO_EC2M)
  9. 761 } else if (id == s_GF2m_simple) {
  10. 762 method = EC_GF2m_simple_method();
  11. 763 #endif
  12. 764 }
  13. 765


点击(此处)折叠或打开

  1. 815 if (id == s_GFp) {
  2. 816 new_curve = EC_GROUP_new_curve_GFp;
  3. 817 #if !defined(OPENSSL_NO_EC2M)
  4. 818 } else if (id == s_GF2m) {
  5. 819 new_curve = EC_GROUP_new_curve_GF2m;
  6. 820 #endif
  7. 821 } else {
  8. 822 ossl_raise(rb_eArgError, "unknown symbol, must be :GFp or :GF2m");
  9. 823 }

    2、安装ruby扩展

点击(此处)折叠或打开

  1. /usr/local/webserver/puppet/bin/ruby -r base64 -e "puts:installed"
  2. /usr/local/webserver/puppet/bin/ruby -r cgi -e "puts:installed"
  3. /usr/local/webserver/puppet/bin/ruby -r digest/md5 -e "puts:installed"
  4. /usr/local/webserver/puppet/bin/ruby -r etc -e "puts:installed"
  5. /usr/local/webserver/puppet/bin/ruby -r fileutils -e "puts:installed"
  6. /usr/local/webserver/puppet/bin/ruby -r ipaddr -e "puts:installed"
  7. /usr/local/webserver/puppet/bin/ruby -r openssl -e "puts:installed"
  8. /usr/local/webserver/puppet/bin/ruby -r strscan -e "puts:installed"
  9. /usr/local/webserver/puppet/bin/ruby -r syslog -e "puts:installed"
  10. /usr/local/webserver/puppet/bin/ruby -r uri -e "puts:installed"
  11. /usr/local/webserver/puppet/bin/ruby -r webrick -e "puts:installed"
  12. /usr/local/webserver/puppet/bin/ruby -r webrike/https -e "puts:installed"
  13. /usr/local/webserver/puppet/bin/ruby -r xmlrpc -e "puts:installed"

错误解决:/usr/local/webserver/puppet/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- openssl (LoadError)
        from /usr/local/webserver/puppet/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
解决方法:

点击(此处)折叠或打开

  1. yum -y install openssl-dev* libssl*
  2. cd /data/soft/ruby-2.0.0-rc2/ext/openssl
  3. ruby extconf.rb
  4. make
  5. make install





    3、安装ruby-shadow
   

点击(此处)折叠或打开

  1. git clone https://github.com/apalmblad/ruby-shadow

  2. cd ruby-shadow/

  3. ruby extconf.rb

  4. make

  5. make install

    4、安装facter

点击(此处)折叠或打开

  1. wget http://downloads.puppetlabs.com/facter/facter-2.4.4.tar.gz -P /opt
  2. tar zxf facter-2.4.4.tar.gz
  3. cd facter-2.4.4
  4. /usr/local/webserver/puppet/bin/ruby install.rb

    5、安装puppet

点击(此处)折叠或打开

  1. wget http://downloads.puppetlabs.com/puppet/puppet-2.7.26.tar.gz -P /opt/
  2. tar zxf puppet-2.7.26.tar.gz
  3. cd puppet-2.7.26
  4. /usr/local/webserver/puppet/bin/ruby install.rb --full
  5. cp /opt/puppet-2.7.26/examples/etc/puppet/puppet.conf /etc/puppet/
  6. cp /opt/puppet-2.7.26/examples/etc/puppet/fileserver.conf /etc/puppet/
  7. cp /opt/puppet-2.7.26/examples/etc/puppet/tagmail.conf /etc/puppet/










阅读(2698) | 评论(0) | 转发(0) |
0

上一篇:centos7下安装libiconv-1.14.tar.gz

下一篇:没有了

给主人留下些什么吧!~~