This guide will take you through the process of installing Chamilo 1.10.2 (from Github packages) for testing on a fresh Digital Ocean instance.
A previous article on this blog explains how to install Chamilo 1.9 using Juju Charms.
To follow this guide, you should be familiar with the notion of SSH keys and installing/configuring server software on Ubuntu 15.10.
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 15.10 x64
- 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.: 188.8.131.52 cham1.beeznest.com
In my case, I have IP 184.108.40.206 and name cham1.beeznest.com, but in the following guide we will assume (for simplicity) that we use the IP address directly.
Step 3: Connect and install software stack
- Connect to your instance (ssh firstname.lastname@example.org)
- apt-get update
- apt-get upgrade
- apt-get install libapache2-mod-php5 php5-mysqlnd mysql-server php5-intl php5-gd php5-json php5-curl php5-mcrypt git vim screen
- give a MySQL root password twice (remember it)
This whole step takes about 2.5 minutes in total on Digital Ocean’s super fast infrastructure.
Step 4: Downloading from Github
cd /var/www mkdir chamilo cd chamilo wget https://github.com/chamilo/chamilo-lms/archive/v1.10.2.tar.gz tar zxf v1.10.2.tar.gz rm v1.10.2.tar.gz mv chamilo-lms-1.10.2 www cd www chmod -R 0777 main/lang main/default_course_document/images/ app web
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 000-default.conf (or use another editor if you like)
- Under the #ServerName line, add: ServerName 220.127.116.11 (or the IP of this virtual machine)
- [change /var/www by /var/www/chamilo/www everywhere]
- Add the following block anywhere *inside* the VirtualHost block
<Directory /var/www/chamilo/www> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory>
- Add before </VirtualHost>: php_admin_value date.timezone “Europe/London”
- exit (esc + :wq + enter)
- a2enmod rewrite
- service apache2 restart
Step 7: Browser install of Chamilo
- Open your browser on http://18.104.22.168 (the IP of this virtual machine) 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.