rhces 发表于 2018-8-2 07:33:42

puppet源码安装部署

  一、安装环境
  系统环境

  CentOS>  2.6.32-642.1.1.el6.x86_64
  编译环境
  gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC)
  二、源码编译Puppet
  步骤1 Ruby的安装
  wget https://codeload.github.com/ruby/ruby/zip/ruby_1_8_7
  unzip ruby-ruby_1_8_7.zip
  cd ruby-ruby_1_8_7
run autoconf to (re)generate configure.  ./configure --prefix=/usr/local/puppet-2.7.25
  make
  make install
  出现如下错误:

[*]  ossl_pkey_ec.c:761: warning: assignment makes pointer from integer without a cast
[*]  ossl_pkey_ec.c:815: error: ‘EC_GROUP_new_curve_GF2m’ undeclared (first use in this function)
[*]
  ossl_pkey_ec.c:815: error: (Each undeclared>
[*]  ossl_pkey_ec.c:815: error: for each function it appears in.)
  解决办法:
  该问题在ruby网站上已经提交并有了补丁。
  参见链接:https://bugs.ruby-lang.org/issues/8384
  vi ext/openssl/ossl_pkey_ec.c
  760 #if !defined(OPENSSL_NO_EC2M)
  761             } else if (id == s_GF2m_simple) {
  762               method = EC_GF2m_simple_method();
  763 #endif
  .......
  816 #if !defined(OPENSSL_NO_EC2M)
  817             } else if (id == s_GF2m) {
  818               new_curve = EC_GROUP_new_curve_GF2m;
  819 #endif
  步骤2 安装Ruby的扩展支持及手动导入系统环境变量
  export PATH=$PATH:/usr/local/puppet/bin:/usr/local/puppet/sbin
  # ruby -r base64 -e "puts:installed"
  installed
  # ruby -r cgi -e "puts:installed"
  installed
  # ruby -r digest/md5 -e "puts:installed"
  installed
  # ruby -r etc -e "puts:installed"
  installed
  # ruby -r fileutils -e "puts:installed"
  installed
  # ruby -r ipaddr -e "puts:installed"
  installed
  # ruby -r openssl -e "puts:installed"
  installed
  # ruby -r strscan -e "puts:installed"
  installed
  # ruby -r syslog -e "puts:installed"
  installed
  # ruby -r uri -e "puts:installed"
  installed
  # ruby -r webrick -e "puts:installed"
  installed
  # ruby -r webrick/https -e "puts:installed"
  installed
  # ruby -r xmlrpc/client -e "puts:installed"
  installed
  步骤3 安装ruby-shadow
  wget https://codeload.github.com/apalmblad/ruby-shadow/zip/2.1.4
  unzip ruby-shadow-2.1.4.zip
  cd ruby-shadow-2.1.4
  ruby extconf.rb
  make
  make install
  步骤4 安装Facter
  wget https://codeload.github.com/puppetlabs/facter/zip/1.7.4
  unzip facter-1.7.4.zip
  cd facter-1.7.4
  ruby install.rb
  步骤5 安装Puppet
  wget https://codeload.github.com/puppetlabs/puppet/zip/2.7.x
  unzip puppet-2.7.x.zip
  cd puppet-2.7.x
  ruby install.rb --full
页: [1]
查看完整版本: puppet源码安装部署