The simplest way to use Chef is chef-solo. It allows you to install, configure and manage the packages required by your application without the complication of any client and server configuration. We’ll start with the common scenario that you have to setup a website designer with a WordPress environment.

Install chef

$ sudo su – root

# cd ~

curl -L | bash

Check chef
chef-solo -v

So, what do we need to do to get our web server up and running?

  • Install and configure Apache
  • Install and configure MySQL
  • Install and configure PHP
  • Deploy our website code to the site

How do we do that? We write our first Chef cookbook. But before we do that we should setup a file structure that will help us organise our various Chef files. Opscode, the makers of Chef provide one. They call it simply the Chef Repository.


tar -zxf master
mv chef-chef-repo* chef-repo
rm master
cd chef-repo
Our Chef cookbook should unsurprisingly reside within the cookbooks directory. We’re going to call it “phpapp”. We can use the command knife to help us manage our cookbooks. First we should tell knife where to find our cookbooks directory.
mkdir .chef
echo “cookbook_path [ ‘/root/chef-repo/cookbooks’ ] “> .chef/knife.rb
knife cookbook create phpapp   # TO BE REPLACED BY “chef generate cookbook phpapp”


Nex page

CHEF install apache on AWS EC2 Ubuntu