How To Install And Configure Cherokee Web Server With PHP 5 And MySQL 5 Support On Ubuntu 8.10 Server (Intrepid Ibex)

Want to support HowtoForge? Become a subscriber!
Submitted by Leszek (Contact Author) (Forums) on Thu, 2008-11-27 18:06. :: Ubuntu | Cherokee

How To Install And Configure Cherokee Web Server With PHP 5 And MySQL 5 Support On Ubuntu 8.10 Server (Intrepid Ibex)

"Cherokee is a very fast, flexible and easy to configure Web Server. It supports the widespread technologies nowadays: FastCGI, SCGI, PHP, CGI, TLS and SSL encrypted connections, Virtual hosts, Authentication, on the fly encoding, Load balancing, Apache compatible log files, and much more."

This tutorial shows how to install Cherokee from source with PHP and MySQL support on a Ubuntu 8.10 server machine. The reason for compiling from source instead of using apt to install binary packages is that there are older versions in the repositories than the ones available on Cherokee's homepage. The main goal is to install the webserver so I didn't bother compiling everything else. That way you won't spend to much time on doing things I didn't want to describe. I do not issue any guarantee that this will work for you!


1) Preliminary note

I'm using a Ubuntu 8.10 server system installed according to steps 1-3, 5, 7 and 8 described in that howto: I also use the expression "serveripaddress" for server's ip address. You should replace it with your own. You should take every step of this howto logged in as root.


2) Install MySQL

You need a database server to run PHP scripts that use MySQL to manage data stored in user's databases. You can install it (and the client) by entering:

apt-get install mysql-server-5.0 mysql-client


3) Set MySQL's root user password

Before using MySQL a password should be set for the root user. You will be prompted for it after the server gets installed.

Remember that without setting root's password everyone can access every database on your MySQL server.


4) Install PHP

PHP is a scripting language used to run scripts that can do lots of different things on the server side. You can install it like this:

apt-get install php5-cgi

PHP has an interface to MySQL server that can be installed by entering the following:

apt-get install php5-mysql


5) Install some needed packages

We will compile Cherokee from sources so we'll need a C++ compiler and some other usefull packages:

apt-get install cpp gcc g++ make


6) Download, compile and install Cherokee web server

Download Cherokee to /tmp:

cd /tmp

When I wrote this text Cherokee 0.11.0b2449 was the latest snapshot version which means it's in beta state so there still might be some errors. You could download and use a stable version from instead as well.

Unpack the downloaded archive:

tar -zxvf cherokee-latest-svn.tar.gz

and enter the new directory:

cd cherokee-0.11.0b2449

Now it has to be configured the way we need. This is the recommended way:

./configure --localstatedir=/var \
--prefix=/usr \
--sysconfdir=/etc \

Compile Cherokee:


and install it:

make install

An error like "configure:error:no acceptable c compiler found in $path" most likely means that there is no C compiler installed or it's not in the system path. You should then make sure to install everything described in step 5 and everything will work fine.

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by georgz (not registered) on Thu, 2008-12-04 13:08.

Why don't you use the PPA? Don't need to compile yourself.

Submitted by Anonymous (not registered) on Fri, 2008-11-28 01:02.

You don't need to compile from source. There are up-to-date precompiled Cherokee packages for Ubuntu in:

Submitted by Leszek (registered user) on Fri, 2008-11-28 10:43.
There is always a choice. The sources are always the most current.