Howto install Cherokee web server with MySQL, PHP support on Jaunty

Sponsored Link
Cherokee is a very fast, flexible and easy to configure Web Server. It supports the widespread technologies nowadays: FastCGI, SCGI, PHP, CGI, SSI, TLS and SSL encrypted connections, Virtual hosts, Authentication, on the fly encoding, Load Balancing, Apache compatible log files, Data Base Balancing, Reverse HTTP Proxy, Traffic Shaper, Video Streaming and much more.

A user friendly interface called cherokee-admin is provided for a no-hassle configuration of the server. Check out the benchmarks and documentation to learn more, and give it a try to squeeze your hardware to the fullest!

First you need to remove apache server if you install

sudo update-rc.d -f apache remove

Install Cherokee web server in Ubuntu

If you want to install from ubuntu repositories use the following command

sudo apt-get install cherokee

If you want to install latest version use the following procedure

You need to edit /etc/apt/sources.list file

sudo vi  /etc/apt/sources.list

add the following lines

deb http://ppa.launchpad.net/cherokee-webserver/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/cherokee-webserver/ppa/ubuntu jaunty main

Save and exit

Install GPG key using the following command

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0x0ad0b667b67daa477f5ff89f51bb8e83eba7bd49

Update the source list

sudo apt-get update

Install Cherokee web server using the following command

sudo apt-get install cherokee

Start your new web server

sudo /etc/init.d/cherokee start

Cherokee web-based administration tool

one of the exciting features of the product is the web-based administration tool, cherokee-admin. Rather than fiddling around with text files which may not mean much to an administrator new to Cherokee, the server can be entirely setup from cherokee-admin.

execute the following command to launch cherokee-admin

sudo cherokee-admin

Cherokee-admin should launch and present you with both a username (admin) and one-time password. Copy the password to the clipboard and fire up http://127.0.0.1:9090/ in a web browser. When prompted with the HTTP authentication dialog merely enter those same credentials.

admin_launch

Install Mysql server support

Use the following commands to install mysql server support

sudo apt-get install mysql-server mysql-client

Install PHP support

Use the following commands to install php support

sudo apt-get install php5-cgi php5-mysql

Test you installation

If you are able to load a page in your browser then the next step is ensuring PHP parsing is functioning properly.

sudo vi /etc/www/test.php

Once in the editor, paste the following PHP code in to the file

<?php echo phpinfo(); ?>

Surf to http://domain.com/test.php and presumably a PHP information page should be displayed in the browser if everything is functioning as expected.

Howto install phpmyadmin on Cherokee

The only thing you need to do is make phpMyAdmin accessible by Cherokee and all the script files must have permissions suitable for the user running Cherokee.

Note:- I am assuming you have already installed mysql server

Ubuntu installation

sudo apt-get install php5-cgi php5-mysql phpmyadmin

sudo ln -s /usr/share/phpmyadmin/ /var/www/phpmyadmin

Since Cherokee doesn’t appear in the list of web servers provided by the package installation script, select any of them to proceed with phpMyAdmin’s configuration.

The commands above asume you are running Cherokee as root and that your web server’s document root is /var/www.

If you were to run it as www-data, simply change the script’s owner

sudo chown -R www-data:www-data /usr/share/phpmyadmin

Now point your web browser to http://localhost/phpmyadmin, and use the MySQL user information to access the databases.

Benchmarks with other web servers

check this nice guide to see benchmarks with other web servers

References

Check cherokee documentation from here

Sponsored Link

You may also like...

15 Responses

  1. jjs says:

    No joy on intrepid –

    jjs@matisyahu:~$ sudo cherokee-admin

    Login:
    User: admin
    One-time Password: in0MydCHxb8jR2lQ

    Web Interface:
    URL: http://127.0.0.1:9090/

    [03/06/2009 13:19:33.233] (error) plugin_loader.c:194 – dlopen(/usr/lib/cherokee/libplugin_server_info.so): /usr/lib/libcherokee-client.so.0: undefined symbol: cherokee_buffer_drop_endding
    [03/06/2009 13:19:33.233] (error) plugin_loader.c:363 – Can’t open “server_info” module
    main_admin.c:240 – Could not initialize the server

    The main cherokee instance won’t start either. Oh well, back to apache.

  2. jjs says:

    Disregard my last post – a cherokee update just became available, and when I installed it, it fixed the problem and cherokee is running now.

  3. Duron says:

    Well, this looks pretty cool. Thanx for this CHAMP article!

  4. Kevin says:

    To make PHP work for a certain virtual server, go to it, and under behavior, click on wizard, and under the misc category, you’d find “configure PHP wizard”, and then you’re good to go.

    Took me a while to find it, so I thought it would be worth a post 🙂

  5. hessmo says:

    thanks to kevin, I was having tons of trouble with php.

    Any idea on a good stats tracking package that works well with cherokee?

    I know my bandwidth usage thanks to bmon, but I have no idea about page loads/video views (new article idea?!?)

  6. admin says:

    Try Awstats

    Apache using the following directive

    ScriptAlias /awstats/ “/etc/awstats/wwwroot/cgi-bin/”

    To implement this in Cherokee use the following

    Directory /awstats {
    Handler cgi
    DocumentRoot /etc/awstats/wwwroot/cgi-bin/
    }

    and then add the .pl extension support

    Extension pl {
    Handler cgi
    }

    Hope this helps

  7. bob dagit says:

    where did the name come from, OH, i get it, a sure OK web server!

  8. Prasad says:

    Hi,
    The info is pretty cool but, I am new to ubuntu and for that mater new to web development, I found some issues. I installed ubuntu 9 and installed cherokee from this tutorial. But admin page shows server status as ‘not running’. when i pressed the launch button it shows an error as

    Could not launch the server

    Something happened while launching the server. The error reported by the server follows:

    server.c:630: Can’t bind() socket (port=80, UID=0, GID=0)

    even though i changed the port setting in General settings as 9090. Please advise.

    thanks in advance,
    kgv

  9. admin says:

    Most likely Cherokee is unable to start because you are not root. And you want to bind the webserver to a privileged port (80).

  10. sliksoft says:

    Well, this looks pretty cool but how to install phpmyadmin on cherokee whit ubuntu 9.04 any idea ??

  11. admin says:

    Try this

    The only thing you need to do is make phpMyAdmin accessible by Cherokee and all the script files must have permissions suitable for the user running Cherokee.

    Note:- I am assuming you have already installed mysql server

    Ubuntu installation

    sudo apt-get install php5-cgi php5-mysql phpmyadmin

    sudo ln -s /usr/share/phpmyadmin/ /var/www/phpmyadmin

    Since Cherokee doesn’t appear in the list of web servers provided by the package installation script, select any of them to proceed with phpMyAdmin’s configuration.

    The commands above asume you are running Cherokee as root and that your web server’s document root is /var/www.

    If you were to run it as www-data, simply change the script’s owner

    sudo chown -R www-data:www-data /usr/share/phpmyadmin

    Now point your web browser to http://localhost/phpmyadmin, and use the MySQL user information to access the databases.

  12. sliksoft says:

    Hi it’s working now phpmyadmin thanks !!!

  13. Pubudu says:

    I followed these instructions but, i can’t run php files in my serve, html is working fine but when i point to a directory which have index as a php (index.php) it just shows the file lis…. (Index of /wp/) what should i do to resolve this?

  14. bernie says:

    I followed instructions all working great. virtual servers work good if on c-drive. if i put on another hd they dont work. i changed path to /media/name/websitename still does not work. i mounted 2nd hd on boot and made virtual server to folder as well but nothing. virtual server only seems to work (find site) if on c-drive same as cherokee. any ideas please.

  15. BernieZ says:

    Hi I am having same trouble as Bernie. Virtual server does not seem to work on second hard drive. Any solutions on this would be appreciated.

Leave a Reply

Your email address will not be published. Required fields are marked *