I have been working with Chef Server 11 for a while now and figured it’s time to share my setup experience with others.
Requirements
This guide is based on CentOS 6.3 64 bit. Ubuntu Server is also supported but always make sure to grab the 64 bit version for Chef Server. Chef Client supports various distributions both 32 and 64 bit.
Installing CentOS 6.3
When installing CentOS 6.3 make sure to use the minimal installation ISO. It contains all the stuff you need without adding too much overhead to your final installation. In fact there are some packages you can safely remove in the end to further reduce the system size and memory usage. You can find a list of mirrors for this at the CentOS Homepage.
One thing to keep in mind when using VirtualBox: Ensure Enable IO APIC is marked in the System tab. Otherwise the boot procedure of the installation ISO will hang at some point and not proceed. Please give the machine enough RAM! Chef Server is very easy on RAM but some processes are rather memory intensive so 1 GB should be the minimum.

Enable IO APIC in the System Tab to avoid boot issues.
Since we want to be able to connect to the machine as easy as possible via SSH and HTTPS I suggest changing your Network adapter frohm NAT to Bridged Adapter. This will allow your virtual machine to grab an IP address from your regular network instead of running on a NAT interface.
There is nothing special about the installation process. You can keep all the defaults and keep pressing OK until your system asks you to reboot. Once rebooted you can login via console for the first time and setup your network as required.
Network Setup
Usually I would say ‘each to their own’ but I would like to give a little heads up: By default network adapters in CentOS 6 are disabled during boot time. You can enable them by editing /etc/sysconfig/network-scripts/ifcfg-eth0 and setting ONBOOT to yes. Then restart your network to enable these settings: /etc/init.d/network restart
Hostname and FQDN
Chef Server needs a proper FQDN when running hostname -f which usually is not the case once you finish a regular installation. To ensure this works we will change the machines hostname and add it to the /etc/hosts file:
sed -i -e "s/HOSTNAME.*/HOSTNAME=chef-server.local/" /etc/sysconfig/network
echo "$( ifconfig eth0 | awk '/inet addr:/{ sub(/addr:/, ""); print $2}' ) chef-server.local" >> /etc/hosts
Post-installation Steps
Here are some additional steps I did to ensure I have a painless installation later on.
Optional Cleanup
Even when using the minimal installation ISO there are a few packages you can remove in a VirtualBox setup.
yum -y remove audit lldpad portmap
System Update
Also we should ensure the system is up-to-date before we proceed to install Chef Server.
yum -y update
reboot
Note: During my upgrade the kernel was updated so I had to reboot to make sure VirtualBox will find the proper development files later in the process.
VirtualBox Guest Additions
Now with our updated system we need to install a few tools that are required by the VirtualBox Guest Additions:
yum -y install gcc cpp make autoconf kernel-devel
Once installed, mount the Guest Additions ISO (Shortcut: Host+D) and install them:
mount /dev/cdrom /mnt
cd /mnt
bash VBoxLinuxAdditions.run
reboot
Depending on your guest system settings and host system hardware this may take a while. Once completed you can restart the machine again to ensure the modules are loaded. Since we are done compiling you can also remove the previously installed software again to save some space:
yum -y remove gcc cpp make autoconf kernel-devel glibc-devel perl* mfpr ppl libgomp cloog-ppl
Now we are ready to install Chef Server!
Chef Server Installation
With their Omnibus Installer it is now very easy to setup a Chef Server on a supported distribution.
Download Chef Server
Please head over to their download page and grab Chef Server 11 for Enterprise Linux 6 x86_64. Latest version as of this writing was Chef Server 11.0.6 which you can grab using curl:
curl https://opscode-omnitruck-release.s3.amazonaws.com/el/6/x86_64/chef-server-11.0.6-1.el6.x86_64.rpm -o /root/chef-server-11.0.6-1.el6.x86_64.rpm
Install Chef Server 11
Congratulations! You succesfully downloaded Chef Server 11 and are now ready to kick off the installation. This is rather simple thanks to their RPM package:
yum localinstall chef-server-11.0.6-1.el6.x86_64.rpm
That’s it. After a few seconds Chef Server should be installed and tell you what the next step is.
Chef Server 11 Configuration
This is just as easy as the installation itself. Chef Server 11 comes with a new script, chef-server-ctl, that allows you to do a couple of tasks involving all components of it. As mentioned after a successful installation of the RPM package you now run:
chef-server-ctl reconfigure
This will setup your Chef Server and takes a minute or two.
Note: I was having issues uploading cookbooks after running the auto-configuration script. Apparently Bookshelf will pass on the upload URL to the clients which is using the FQDN of the host. In order to get around this, I replaced a line in the Chef Solo attributes file to use the IP instead, then re-ran the auto-configure script:
sed -i -e "s/node\['fqdn'\]/node['ipaddress']/g" /opt/chef-server/embedded/cookbooks/chef-server/attributes/default.rb
chef-server-ctl reconfigure
User Setup
You can read an older post of mine that describes the process pretty well. The original post covers the Ubuntu way to run a Chef Server but the user setup is essentially the same.
Conclusion
As you can see it is rather easy to run Chef Server in CentOS or RedHat Enterprise Linux. Most of the installation steps outlined in my earlier post are the same but I was working with VirtualBox a lot lately and sharing my experience wouldn’t hurt. If you liked this guide or found some issues with it please feel free to leave a comment in the comment section below.