# Compiling and Installing

This section shows how to install Cherokee in a Unix environment. At this moment, there is an effort of porting the server to a native Windows program, but it is under heavy development and it will need more time and work to be ready to be used.

## Requirements

The following requirements exist for building Cherokee:

- Building tools: Cherokee is built on the top of the autoconf and automake tools, hence your systems has to have some basic system programs like a sh shell, make and a ANSI C compiler. We have compiled Cherokee in various platforms with different compilers, so it shouldn't be a problem.
- Optional
  - Python: Cherokee includes a number of Quality Assurances tests written in Python language. If you are planning to contribute code into the project, or you just want to test everything is working in the server, you will need a Python interpreter installed on your system.
  - TLS libraries: Cherokee support two different SSL/TLS libraries: OpenSSL and GNUTLS. If you want to compile Cherokee with secure connections support, you need to have one of that libraries with its development files.

## Download

Cherokee can be downloaded from the Cherokee Web Server download site or any of its mirrors. Some users of Cherokee on unix-like systems will be better off downloading and compiling a source version. The build process (described below) is easy, and it allows you to customize your server to suit your needs. Anyway, we provide binary packages for some operating systems and GNU/Linux distributions: Cherokee binary packages

If you know the URL of the cherokee sources that you would like to download, for example, cherokee-x.y.z.tar.gz, you can just use the follow command:

    wget http://www.cherokee-project.com/download/x.y/x.y.z/cherokee-x.y.z.tar.gz -O - | gzip -dc - | tar xfv -

## Secure connections: TLS / SSL

In order to activate the secure connections support you has to ensure you have one of GNUTLS or OpenSSL libraries installed on your system. The configuration script will detect if there is a suitable installation of that libraries. If it finds one of them, it will compile the server with SSL/TLS support. Anyway you can specify who do you want to compile the it:

To disable the the SSL/TLS support just add the follow parameter to configure:

    --disable-tls

To force to compile using the GNU TLS library:

    --enable-tls=gnutls

To force to compile using the OpenSSL:

    --enable-tls=openssl

## IPv6 support

Cherokee supports IPv6. If your building system supports it, the server will be built with this feature enabled. If it isn't supported or enabled on your system, the binary simply won't be able to work with a IPv6 stack. If Cherokee is compiled with IPv6 support it will work with both stacks: IPv4 and IPv6 at same time. Anyway there is a configuration option that will allow you to disable the IPv6 support on run time.

To disable the IPv6 support:

    --disable-ipv6

## Compilation

There are a few very important configure parameters: prefix, sysconfdir and with-wwwroot. Usually it is a good idea to use these three parameters. A very common configure script call is:

    ./configure --prefix=/usr --sysconfdir=/etc --with-wwwroot=/var/www

After this, the sources will be ready to get compiled. This should be enough

    make

but you can also add compilation parameters. For example, if you are using gcc and you want to compile the Cherokee with debug information just execute make like this

    make CFLAGS="-O0 -g"

## Installation

Oposite to other programs, it is mandatory to install Cherokee. It uses libraries and extension modules that will not work if you try to execute it from the installation directory. In order to install everything, just execute

    make install

If you are making a system wide installation you will need to become root first.

If you wish auto start cherokee at boot (through init's runlevel) you can find a start/stop script into the contrib source directory:

    cp contrib/cherokee /etc/init.d/

additionaly you need to create symlinks at the correct runlevels rc directories, this can can be done by many ways and distributions offer its own tools to do it.