| Use RPMs The instructions on this page will work, but due to the comments below, the community has spoken and we recommend Installation on RHEL and CentOS 5 with RPMs. |
Tested with CentOS 5.2 Virtual appliance
setup yum
setup yum
install prereqs
install prereqs
update gem
update rubygems
install chef
install Chef via gem
Configuring Chef
Continue by following the general configuration directions on the Installation page.
Comments (24)
Feb 03, 2009
Scott Dodson says:
What repo does ruby-openid come from? I'm attempting this on RHEL 5 and I don't ...What repo does ruby-openid come from? I'm attempting this on RHEL 5 and I don't see any valid sources for ruby-openid. I'd also perhaps advise using EPEL rather than the CI repo as it includes rubygems 1.3 FYI, I've never used Centos so I'm not sure if things are dramatically different there with respect to repos and extra packages.
Feb 18, 2009
Nathaniel Bibler says:
ruby-openid is a gem (gem install ruby-openid) not a yum repository. I edited t...ruby-openid is a gem (gem install ruby-openid) not a yum repository. I edited the wiki entry to remove it from the yum install line. Also, when you gem install chef (or chef-server) ruby-openid will automatically be installed, as it is listed as a dependency in the gem spec. So, no explicit installation is required for it.
Feb 11, 2009
Dick Davies says:
Is the 401 related to SELinux? I seem to remember that being set to 'waste hours...Is the 401 related to SELinux? I seem to remember that being set to 'waste hours of my time' by default.
Feb 17, 2009
Adam Jacob says:
Nope - the 401 means the node is not validated. Check out Nodes for more inform...Nope - the 401 means the node is not validated. Check out Nodes for more information.
Mar 10, 2009
Edmund Haselwanter says:
so this is obvious, but shouldn't it be first "install prereqs" followed by "upd...so this is obvious, but shouldn't it be first "install prereqs" followed by "update gem" ?
Mar 10, 2009
Edmund Haselwanter says:
following the (Feb 18, 2009) g++ seems to be missing on a clean centos 5.2 basic...following the (Feb 18, 2009) g++ seems to be missing on a clean centos 5.2 basic install.
install prereqs should include gcc-c++
yum install -y ruby gcc gcc-c++ ruby-devel ruby-docs ruby-ri ruby-irb ruby-rdoc rubygems
Mar 10, 2009
Edmund Haselwanter says:
ERROR: Error installing chef-server: merb-core requires Ruby version &g...ERROR: Error installing chef-server:
merb-core requires Ruby version >= 1.8.6
add http://rubyworks.rubyforge.org/RubyWorks.repo -O /etc/yum.repos.d/RubyWorks.repo to repos to install ruby 1.8.6
Mar 11, 2009
Edmund Haselwanter says:
there is no package "couchdb" for centosthere is no package "couchdb" for centos
Mar 12, 2009
Edmund Haselwanter says:
I've forked the chef-server-solo-install to http://github.com/ehaselwanter/chef-...I've forked the chef-server-solo-install to http://github.com/ehaselwanter/chef-server-solo-install/tree/master incorporating changes to install it on a clean centos 5.2 box.
log into your box and issue:
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm;\
yum -y install git;\
touch /root/.ssh/config;\
echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config; \
git clone git@github.com:ehaselwanter/chef-server-solo-install.git /tmp/chef-solo ;\
/tmp/chef-solo/bin/install_on_centos_with_gems.sh
Mar 30, 2009
Matt Herrmann says:
Thanks Edmund, this worked great.. except for one bit, you may want to check th...Thanks Edmund, this worked great.. except for one bit, you may want to check this..
Ran it on a clean Centos 5.2 box but it failed a dependency check when attempting to install apr-util..
Looks like the repo it's installing from is Centos 4 based and the apr-util package requires an earlier
version of postgresql-libs than it can find.
I had to rebuild the apr-util package from the srpm available in the CI repo, but
everything was working fine after that.
Apr 03, 2009
Jesse Nelson says:
so this is for cent5 but you have a cent4 repo with alot of unrelated packages. ...so this is for cent5 but you have a cent4 repo with alot of unrelated packages. might be better to just provide links to the relevant rpm's here instead of repos that may pull in other things that you don't want.. or collide on dep scans.
also shouldn't anything thats requiring apr be build against the base apr provided in 5.x ? instead of some custom repo.
Ideally you would have a method here that would work with centos, redhat, oracle. To facilitate that i recommend staying as close to release packages as possible.
Apr 04, 2009
Jason Jackson says:
I've forked this off and am going to try getting something working without runit...I've forked this off and am going to try getting something working without runit. I also cleaned out all of the calls to repo's and just noted where to fetch needed packages. You can find most of the packages (couchdb, erlang,js), or src packages to grab a spec file out of here: http://download.fedora.redhat.com/pub/epel/5/x86_64/
Apr 06, 2009
Matthew Kent says:
May want to wait and collaborate on this. I've got the whole stack, some 30 rpm ...May want to wait and collaborate on this. I've got the whole stack, some 30 rpm packages, nearly ready to go (init scripts, proper dependencies etc). It installs on a vanilla CentOS install quite nicely.
Apr 07, 2009
Jason Jackson says:
Great Let me know when you have things wrapped up. We are looking to impleme...Great
Let me know when you have things wrapped up. We are looking to implement this in our company, and I'm pretty geared up to start building out the CentOS side of this. Been a little strapped on time lately, but anxious to see chef up and alive in our environment.
You have a fork on github for where you're at? Let me know if you want a second pair of eyes..
Apr 08, 2009
Matthew Kent says:
First attempt is done, take a look at http://chef.viviti.com/ github fork comi...First attempt is done, take a look at http://chef.viviti.com/
github fork coming soon.
Apr 17, 2009
Joshua Timberman says:
Matthew, The packages have conflicting dependencies. rubygem-merb-core requires...Matthew,
The packages have conflicting dependencies. rubygem-merb-core requires rubygem-json_pure and rubygem-chef-server (and -chef and -ohai) require rubygem-json. The conflict:
To resolve, I installed via rpm after yum cached the packages.
Apr 27, 2009
Matthew Kent says:
Thanks! This should be fixed.Thanks! This should be fixed.
Apr 29, 2009
Edmund Haselwanter says:
chef 0.6 has a new kind of hidden dependency to the python json module for the y...chef 0.6 has a new kind of hidden dependency to the python json module for the yum package to work : yum install python-json
Apr 30, 2009
Jason Jackson says:
I am getting missing dependency errors: Error: Missing Dependency: rubygem(rak...I am getting missing dependency errors:
Error: Missing Dependency: rubygem(rake) >= 0 is needed by package rubygem-merb-core-1.0.9-1.el5.noarch (elff)
Error: Missing Dependency: python-json is needed by package rubygem-chef-0.5.6-4.el5.noarch (elff)
Error: Missing Dependency: rubygem(rspec) >= 0 is needed by package rubygem-merb-core-1.0.9-1.el5.noarch (elff)
Error: Missing Dependency: rubygem(hoe) >= 1.3.0 is needed by package rubygem-stompserver-0.9.9-2.el5.noarch (elff)
Error: Missing Dependency: rubygem(mongrel) >= 0 is needed by package rubygem-chef-server-0.5.6-4.el5.noarch (elff)
Error: Missing Dependency: perl(Params::Validate) is needed by package rubygem-chef-0.5.6-4.el5.noarch (elff)
Error: Missing Dependency: rubygem(hoe) >= 1.1.1 is needed by package rubygem-stompserver-0.9.9-2.el5.noarch (elff)
Error: Missing Dependency: rubygem(daemons) >= 1.0.2 is needed by package rubygem-stompserver-0.9.9-2.el5.noarch (elff)
Error: Missing Dependency: rubygem(rack) >= 0 is needed by package rubygem-merb-core-1.0.9-1.el5.noarch (elff)
Error: Missing Dependency: perl(JSON::Syck) is needed by package rubygem-chef-0.5.6-4.el5.noarch (elff)
Have there been any new packages introduced which create new dependencies? I'm not seeing any references to these packages its complaining about anywhere.
Thanks!
May 09, 2009
Matthew Kent says:
Looks like you're missing the EPEL repositories based on the missing dependencie...Looks like you're missing the EPEL repositories based on the missing dependencies. If you can hold tight for a few more days I should have a better solution for chef 0.6.2 online.
Jun 08, 2009
Sebastian Wittenkamp says:
Hi Matthew, I followed your instructions but running into the following when run...Hi Matthew,
I followed your instructions but running into the following when running the bootstrap. From what I can tell the "default" cookbook is having trouble when figuring out the couchdb package. I took the steps from above to install couchdb and libxslt, but still getting the same error when re-running. Any suggetions?
Error output follows:
-bash-3.1$ sudo chef-solo -c solo.rb -j chef.json -r http://chef.viviti.com/files/others/bootstrap.tar.gz [Mon, 08 Jun 2009 10:53:38 -0700] INFO: Starting Chef Solo Run
[Mon, 08 Jun 2009 10:53:42 -0700] ERROR: package[couchdb] (/tmp/chef-solo/cookbooks/couchdb/recipes/default.rb line 20) had an error:
yum failed - #<Process::Status: pid=3035,exited(1)> - returns: Traceback (most recent call last):
File "/usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/provider/package/yum-dump.py", line 71, in ?
db = y.doPackageLists('all')
File "/usr/lib/python2.4/site-packages/yum/_init_.py", line 985, in doPackageLists
avail = self.pkgSack.returnNewestByNameArch()
AttributeError: 'NoneType' object has no attribute 'returnNewestByNameArch'
/usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/provider/package/yum.rb:79:in `load_data'/usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/provider/package/yum.rb:34:in `initialize'/usr/lib/ruby/1.8/singleton.rb:94:in `new'/usr/lib/ruby/1.8/singleton.rb:94:in `instance'/usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/provider/package/yum.rb:110:in `initialize'/usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/runner.rb:54:in `new'/usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/runner.rb:54:in `build_provider'/usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/runner.rb:86:in `converge'/usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/runner.rb:85:in `each'/usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/runner.rb:85:in `converge'/usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/resource_collection.rb:58:in `each'/usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/resource_collection.rb:57:in `each'/usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/runner.rb:63:in `converge'/usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/client.rb:348:in `converge'/usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/client.rb:96:in `run_solo'/usr/lib/ruby/gems/1.8/gems/chef-0.6.2/bin/chef-solo:118/usr/bin/chef-solo:19:in `load'/usr/bin/chef-solo:19
/usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/provider/package/yum.rb:79:in `load_data': yum failed - #<Process::Status: pid=3035,exited(1)> - returns: Traceback (most recent call last): (Chef::Exceptions::Package)
File "/usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/provider/package/yum-dump.py", line 71, in ?
db = y.doPackageLists('all')
File "/usr/lib/python2.4/site-packages/yum/_init_.py", line 985, in doPackageLists
avail = self.pkgSack.returnNewestByNameArch()
AttributeError: 'NoneType' object has no attribute 'returnNewestByNameArch'
from /usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/provider/package/yum.rb:34:in `initialize'
from /usr/lib/ruby/1.8/singleton.rb:94:in `new'
from /usr/lib/ruby/1.8/singleton.rb:94:in `instance'
from /usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/provider/package/yum.rb:110:in `initialize'
from /usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/runner.rb:54:in `new'
from /usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/runner.rb:54:in `build_provider'
from /usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/runner.rb:86:in `converge'
from /usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/runner.rb:85:in `each'
from /usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/runner.rb:85:in `converge'
from /usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/resource_collection.rb:58:in `each'
from /usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/resource_collection.rb:57:in `each'
from /usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/runner.rb:63:in `converge'
from /usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/client.rb:348:in `converge'
from /usr/lib/ruby/gems/1.8/gems/chef-0.6.2/lib/chef/client.rb:96:in `run_solo'
from /usr/lib/ruby/gems/1.8/gems/chef-0.6.2/bin/chef-solo:118
from /usr/bin/chef-solo:19:in `load'
from /usr/bin/chef-solo:19
Jun 08, 2009
Sebastian Wittenkamp says:
Forgot to add: I have the python-json module installed as well.Forgot to add: I have the python-json module installed as well.
Jun 27, 2009
Matthew Kent says:
Sorry I didn't see your comment earlier, please try the instructions on Installa...Sorry I didn't see your comment earlier, please try the instructions on Installation on RHEL and CentOS 5 with RPMs instead. This page should probably be retired.
May 11, 2009
Andrew Carter says:
I had an issue with the client boostrap working. I did the following to make it ...I had an issue with the client boostrap working. I did the following to make it add the chef group and users correctly:
sudo PATH=$PATH:/usr/sbin:/sbin chef-solo -c ./solo.rb -j ./chef.json -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz
Typical problem that occurs in RedHat distros where /sbin and /usr/sbin aren't on the path by default.