|
These directions provide two methods of installing Chef client on a node running CentOS, RHEL, and related Operating Systems.Nodes are hosts whose configuration that you want to manage using Chef. In general, installing chef-client on a node includes:
Typically, chef-client is installed on CentOS systems using one of two possible methods:
You only need to use one of these three methods on any given node. Choose the method that makes the most sense for your environment. |
|
Install RubyChef is written in Ruby and thus requires Ruby as well as other system dependencies to run. Ruby 1.8.7+ is required to run Chef. Run the following command to install ruby and other required dependencies: On Red Hat and CentOS (Version 5)Enable AegisCo repository to get Ruby 1.8.7. If you will be installing a Chef Server on this host, you will also need to enable the RBEL repo: Install Ruby and other development tools: On Red Hat and CentOS (Version 6)Install the RBEL repo Install Ruby and other development tools:
Install RubyGems from SourceWe prefer to install RubyGems from source rather than use the OS-provided version (if any), as it is cross platform, so we know what to expect. Install RubyGems Install Chef GemTo install Chef and its dependencies, run the following code: Install Chef You will most likely want to disable selinux at this point. You can do this by editing the '/etc/sysconfig/selinux' file and editing it to be 'SELINUX=disabled'. You can also use the selinux::disabled recipe to do this when bootstrapping nodes. If you are installing Chef to use chef-client, proceed below. If you are installing Chef-solo as a means of installing Chef Server, return to Installing Chef Server using Chef Solo. If you wish to use Chef-solo as your primary Chef client, see Chef Solo. Configure chef-clientThe initial configuration of a chef-client requires a
Chef client has a number of configuration settings that do not appear above. See Chef Configuration Settings for further details. BootstrapIt is often easiest to install Chef on a node using knife-bootstrap. Bootstrapping runs a script on the target system which install Ruby. This method requires the node to be accessible over SSH. In most cases, bootstrapping a new node will be as simple as running a single command. For instance, to bootstrap a CentOS 5.6 workstation you might run the following command: You can also add
|
|
|
