Howto install Chamilo with lighttpd on Ubuntu 10.04 Lucid Lynx

Let's say you want to install Chamilo on your netbook for a demo... Because Apache uses a lot of memory (and so does MySQL), it is generally considered a good practice to try and use something a bit lighter for your web server This procedure might also work, with a few minor alterations, for OLPC's XO laptops. The operating system of these little marvels are RedHat based, so you will have to use yum instead of apt, but the rest remains relatively similar. An important source of information for the first part of this article is Martin Drake's blog article about how to install and configure lighttpd on Ubuntu 10.04. So if you want details, go to Martin's blog. I'm going to head straight to the point and make a résumé of the commands you need to launch...
  • sudo aptitude update
  • sudo aptitude install lighttpd php5-cgi mysql-server mysql-client php5-gd mercurial php5-mysql
  • cd /var/www
  • sudo mkdir chamilo
  • sudo chmod -r 0777 chamilo
The following command might take a very long time (usually above 10 minutes to download), so maybe you want to use CTRL+SHIFT+T to launch it in a separate terminal.
  • hg clone https://classic.chamilo.googlecode.com/hg/ chamilo
  • sudo /etc/init.d/lighttpd force-reload
  • lighttpd-enable-mod simple-vhost
  • cd /etc/lighttpd/
  • sudo vim lighttpd.conf
copy paste this at the end:
$HTTP["host"] != "my.chamilo.mob" {
  server.document-root = "/var/www/"
  server.errorlog = "/var/log/lighttpd/error.log"
  accesslog.filename = "/var/log/lighttpd/access.log",
  server.error-handler-404 = "/index.php"
}
$HTTP["host"] == "my.chamilo.mob" {
  server.document-root = "/var/www/chamilo/"
  server.errorlog = "/var/log/lighttpd/my.chamilo.mob.error.log"
  accesslog.filename = "/var/log/lighttpd/my.chamilo.mob.access.log",
  server.error-handler-404 = "/index.php"
}
  • sudo /etc/init.d/lighttpd force-reload
  • sudo vim /etc/hosts
copy-paste this:
127.0.0.1 my.chamilo.mob
Load http://my.chamilo.mob in your web browser and follow the normal installation procedure of Chamilo. That's it, you're running Chamilo on lighttpd now! Congrats.