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

From http://www.cherokee-project.com/:
"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: https://www.howtoforge.com/perfect-server-ubuntu-8.10. 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
wget http://www.cherokee-project.com/download/trunk/cherokee-latest-svn.tar.gz

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 http://www.cherokee-project.com/download/ 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 \
--with-wwwroot=/var/www

Compile Cherokee:

make

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.

Share this page:

3 Comment(s)