This guide will take you through the process of installing Chamilo 1.9 (from Github) for testing on a fresh Digital Ocean instance.
A previous article on this blog explains how to install it using Juju Charms.
To follow this guide, you should be familiar with the notion of SSH keys and installing/configuring server software on Ubuntu.
Step 1: Get a Digital Ocean instance
- If you don’t have one, create an account on Digital Ocean
- Give a credit card account or make a payment through PayPal (you might not need it for the first few bucks you’ll need to follow this guide)
- Create a (cheap) instance of 512M RAM ($5/month) with Ubuntu 12.04 or 14.04 (I recommend choosing the 64bit option)
- Give an SSH key so that you can connect to your instance with “ssh root@[instance-ip]”
Step 2: Setup local DNS
To make it short, we’ll just define the new instance’s IP as a local name on our computer only. You can also use the IP directly, but I prefer using a name.
- edit your /etc/hosts file (on Windows, C:\Windows\System32\drivers\etc\hosts), like
- add the instance IP, a blank space, and a name you want to give it. e.g.: 220.127.116.11 cham1.beeznest.com
In my case, I have IP 18.104.22.168 and name cham1.beeznest.com, so I’ll just use these in the folllowing steps.
Step 3: Connect and install software stack
- Connect to your instance (ssh email@example.com)
- apt-get update
- apt-get upgrade
- apt-get install libapache2-mod-php5 php5-mysql mysql-server php5-intl php5-gd php5-json git vim screen
- give a MySQL root password twice (remember it)
Step 4: Pulling from Github
- cd /var/www
- mkdir chamilo
- cd chamilo
- git clone https://github.com/chamilo/chamilo-lms.git www (should take about 2 minutes to clone)
- cd www
- git checkout –track origin/1.9.x
- chmod -R 0777 home courses archive main/lang main/css main/inc/conf/ main/upload/users/ main/default_course_document/images/
Step 5: Database
- mysql -u root -p
- [give the mysql root password]
- mysql> GRANT ALL PRIVILEGES ON chamilo.* TO chamilo@localhost IDENTIFIED BY ‘chamilo’;
- mysql> FLUSH PRIVILEGES;
- mysql> exit;
Step 6: Configure Apache’s Virtual Host
- cd /etc/apache2/sites-available/
- vim default (or use another editor if you like)
- Under the ServerAdmin line, add: ServerName cham1.beeznest.com
- [change /var/www by /var/www/chamilo/www everywhere]
- Add before </VirtualHost>: php_admin_value date.timezone “Europe/London”
- exit (esc + :wq + enter)
- service apache2 reload
Step 7: Browser install of Chamilo
- Open your browser on http://cham1.beeznest.com and follow the installation process
That’s all, folks! Don’t forget this is a development-type installation, meaning that some things will not be tuned for production environments. If you need production-ready installations, the BeezNest team is always available for hiring.