你好,谢谢你的阅读,
我目前正在为我们的ec2实例build立一个傀儡服务,并决定给工头一个尝试(节点证书pipe理和自动乘客设置看起来不错)。
不幸的是我遇到了安装困难。 我刚刚上了一台'Amazon Linux AMI x86_64 PV':
[root@hostname ~]# uname -a Linux hostname 3.10.35-43.137.amzn1.x86_64 #1 SMP Wed Apr 2 09:36:59 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
并尝试以下内容:
sudo yum -y update sudo yum -y install http://yum.theforeman.org/releases/1.1/el6/x86_64/foreman-release.rpm sudo yum -y install foreman-installer
其结果如下:
Error: Package: rubygem-foreman_api-0.1.11-1.el6.noarch (foreman) Requires: rubygem(rest-client) >= 1.6.1 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
这些build议似乎没用(–skip-broken安装所有的依赖关系,但工头/木偶)。 我结束了这里,并尝试安装存储库(删除旧的)
sudo yum -y remove epel-release sudo yum -y install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
现在再次,我试过了:
sudo -y update sudo -y install foreman-installer
导致相同的错误。 没有以前的更新安装是可能的(虽然百胜将抱怨公钥),并导致以下错误:
[ec2-user@hostname ~]$ foreman-installer /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- highline/import (LoadError) from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/sbin/foreman-installer:3:in `<main>'
我在试图搭载乘客时遇到了类似的问题,最终投降了。 我认为这是由于相互冲突的ruby版本,所以:
[root@hostname puppet]# ruby --version ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-linux] [root@hostname puppet]# gem --version 2.0.14 [root@hostname puppet]# ls /usr/bin | grep ruby ruby ruby1.8 ruby2.0 [root@hostname puppet]# ls /usr/bin | grep gem gem gem2.0
有人遇到同样的问题? 我如何解决这个问题?
在此先感谢,并感谢您阅读所有这一切!
红帽企业Linux及其克隆软件包与Amazon Linux不兼容。 您将需要find一种不同的方式来安装Foreman,或者最好是一个不同的Linux发行版(Amazon Linux有许多问题,使它通常不适合任何事情)。
由于我最近在亚马逊上玩了很多傀儡,所以我想更新这个。
由于亚马逊linux上的puppet版本显然与默认的ruby2.0安装不兼容,所以你将不得不安装缺less的ruby1.8东西,并链接到正确的文件。 这应该做的伎俩:
准备安装:
if ! yum repolist | grep -q puppetlabs; then echo "..enabling puppet repository.." # https://tickets.puppetlabs.com/browse/PUP-2132 echo -e "[main]\nenabled = 0" > /etc/yum/pluginconf.d/priorities.conf rpm --quiet -ivh http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-10.noarch.rpm fi echo "..updating.." yum -y --quiet clean all yum -y --quiet update if readlink /etc/alternatives/ruby | grep -q "ruby2\.0" then echo "..making ruby1.8 default.." ln -sf /usr/bin/ruby1.8 /etc/alternatives/ruby fi if readlink /etc/alternatives/gem | grep -q "gem2\.0" then echo "..making gem1.8 default.." ln -sf /usr/bin/gem1.8 /etc/alternatives/gem fi
并用apache安装puppet:
PACKAGE="puppet" #PACKAGE="puppet-server" echo "..installing "$PACKAGE" and requirements.." yum -y --quiet install "$PACKAGE" rubygem18-json
最后乘客:
echo "..installing passenger and requirements.." yum -y install httpd httpd-devel mod_ssl ruby18-devel rubygems gcc gcc-c++ curl-devel openssl-devel zlib-devel gem install rack passenger passenger-install-apache2-module --auto
不要忘了做常用的东西(config.ru和vhostconfiguration为Apache),然后一切都应该工作。 我没有尝试这个工头,因为我们select不使用它,但是这可能是可能的,如果是的话,应该工作相当类似。
我能够使用安装foreman-proxy的foreman-installer在Amazon Linux上安装工头。
因为傀儡和工头默认使用ruby1.8和amazon linux使用2.0
接下来,epel for中的scl-utils包(版本20120229)没有这个文件/ usr / bin / scl_source。 你需要这个版本20120927.我在这里find它:
yum localinstall scl-utils-20120927-27.el6_6.i686.rpm
接下来你需要包ipmitool。 我在一个centos盒子上使用了yum下载器,并且安装了
之后,工头安装程序-i成功完成。
我在CentOS 6系统上有同样的错误。 事实certificate,我需要安装一个额外的存储库,如工头的安装指南中所述:
http://theforeman.org/manuals/1.5/index.html#3.3.1RPMPackages
所有RHEL及衍生产品都需要Red Hat Software Collections(RHSCL)1.0或重build,例如CentOS软件集合。 RHSCL作为单独的存储库或子通道提供给RHEL客户。 有关CentOS的软件集合的更多信息可以在这里find,科学的Linux可以在这里find。
我假设你应该在你的AWS实例中做类似的事情。