This is a sample chef repository and installation steps document for CentOS6.
At this repository you don't use chef-server.
You only use chef-solo and git command in the custom bash script chef-host
.
Following will build your CentOS sever environment in a few steps.
-
Modify your host name.
# vi /etc/sysconfig/network
You need to edit like following.
NETWORKING=yes HOSTNAME=web
-
Reboot system to use modified hostname.
# reboot
-
Install chef using Omnibus. You only run below command.
# curl -L https://www.opscode.com/chef/install.sh | bash
note) Omunibus is a installer of chef packaging. If you want to get more infomations, see
http://www.opscode.com/blog/2012/06/29/omnibus-chef-packaging/
. -
Install git
# yum install -y git
-
Clone this git repository
# git clone https://github.com/kohkimakimoto/chef-for-centos.git /var/chef
-
Run chef-solo using following command
# sh /var/chef/bin/chef-host
You will get environments of Apache(httpd), MySQL, PHP and 3rd party yum repositories(remi and epel).
The following page is my blog post about it written in Japanese.