You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
203 lines
11 KiB
203 lines
11 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Installation guide for Chamilo 2</title>
|
|
<link rel="stylesheet" href="../build/legacy_app.css" />
|
|
<link rel="stylesheet" href="../build/app.css" />
|
|
<link rel="stylesheet" href="../build/vue.css" />
|
|
<style>
|
|
body {width:90%; margin-left: 5%; margin-right: 5%;}
|
|
h1 {font-size: xxx-large; margin-top: 1em; margin-bottom: 1em;}
|
|
h2 {font-size: xx-large; margin-top: 1em; margin-bottom: 1em;}
|
|
h3 {margin-top: 1em; margin-bottom: 1em;}
|
|
p {margin-bottom: 0.5em; margin-top: 0.5em;}
|
|
ul {list-style-type: circle; margin-left: 1em; margin-top: 0.5em; margin-bottom: 0.8em;}
|
|
table {margin: 1em;}
|
|
pre {border: 1px solid #333; background-color: #bbb; padding: 0.8em; margin: 0.5em;}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>Chamilo 2 installation guide</h1>
|
|
<p>
|
|
This is the official Chamilo installation guide for version 2+.
|
|
</p>
|
|
<h2>Requirements</h2>
|
|
This version of Chamilo requires the following software stack.
|
|
It might be installed in other contexts as PHP is very portable, but the following has been thoroughly tested for production environments.
|
|
<ul>
|
|
<li>Apache 2.4+ (with mod-rewrite enabled)</li>
|
|
<li>MariaDB 10+ or MySQL 5+</li>
|
|
<li>PHP 8.2+</li>
|
|
<li>A local Redis server (optional)</li>
|
|
</ul>
|
|
Within PHP, Chamilo requires or benefits from the following modules, which might already be included in PHP on your system:<br/>
|
|
<ul>
|
|
<li>bcmath</li>
|
|
<li>curl</li>
|
|
<li>exif</li>
|
|
<li>gd</li>
|
|
<li>iconv</li>
|
|
<li>intl</li>
|
|
<li>json</li>
|
|
<li>mbstring</li>
|
|
<li>mysql</li>
|
|
<li>opcache</li>
|
|
<li>pcre</li>
|
|
<li>session (php-session, usually shipped with PHP)</li>
|
|
<li>soap</li>
|
|
<li>xml</li>
|
|
<li>zip</li>
|
|
<li>zlib</li>
|
|
<li>ldap (optional)</li>
|
|
<li>redis (optional)</li>
|
|
<li>xapian (optional)</li>
|
|
</ul>
|
|
<h2>Web-panel installation</h2>
|
|
<h3>Database</h3>
|
|
Make sure you have a database available with full permissions.
|
|
Do not share that database with another application as Chamilo might need to create
|
|
a table that has the same name as a table in the other application.
|
|
<h3>Virtual host</h3>
|
|
Define a new virtual host/subdomain name you will use for Chamilo (Chamilo 2 does *not* work as a sub-folder of an existing website, you need a subdomain like "elearning.yourdomain.com").<br>
|
|
Upload and/or unzip your Chamilo files inside your web folder (usually inside a folder called "public_html/").<br>
|
|
Configure a virtual host pointing at the "public" directory inside your Chamilo directory. For example, this could be "/home/elearning.yourdomain.com/public_html/chamilo2/public/".<br>
|
|
<h3>Files permissions</h3>
|
|
Make sure the following files and folders are writeable by the web server. Set permissions to 0770 for example:
|
|
<ul>
|
|
<li>var/</li>
|
|
<li>.env</li>
|
|
</ul>
|
|
The .env is the *file* where Chamilo will write the data collected during the installation.<br>
|
|
You can create an empty file called ".env" at the root of your Chamilo folder
|
|
("/home/elearning.yourdomain.com/public_html/chamilo2/.env" in the example above),
|
|
or temporarily give write permissions to the web server on the entire Chamilo folder
|
|
("/home/elearning.yourdomain.com/public_html/chamilo2/"). If you do the whole folder,
|
|
don't forget to write down the permissions it had initially, and return it to its original
|
|
permissions when the installation is over.
|
|
<h3>PHP settings</h3>
|
|
Some PHP settings are recommended, but the default values should be enough to get you started.<br>
|
|
If you prefer to set them previously, here are the settings to change:
|
|
<ul>
|
|
<li><a href="https://php.net/manual/ref.errorfunc.php#ini.display-errors">display_errors</a> off</li>
|
|
<li><a href="https://php.net/manual/ini.core.php#ini.file-uploads">file_uploads</a> on</li>
|
|
<li><a href="https://php.net/manual/ref.session.php#ini.session.auto-start">session.auto_start</a> off</li>
|
|
<li><a href="https://php.net/manual/ini.core.php#ini.short-open-tag">short_open_tag</a> off</li>
|
|
<li><a href="https://www.php.net/manual/en/session.configuration.php#ini.session.cookie-httponly">session.cookie_httponly</a> on</li>
|
|
<li><a href="https://php.net/manual/ini.core.php#ini.upload-max-filesize">upload_max_filesize</a> >100M</li>
|
|
<li><a href="https://php.net/manual/ini.core.php#ini.post-max-size">post_max_size</a> >100M</li>
|
|
<li><a href="https://www.php.net/manual/en/ini.core.php#ini.memory-limit">memory_limit</a> >128M</li>
|
|
</ul>
|
|
<h3>Installation wizard</h3>
|
|
You are ready to go. Open your browser on your subdomain (elearning.yourdomain.com in the example above), keep your database credentials at hand, and let the Chamilo installer guide you.
|
|
|
|
<h3>Sessions and Redis</h3>
|
|
In this alpha version, there are known issues with sessions not getting updated fast enough, which can be solved (temporarily) by using a Redis server. Check the command line instructions for more about this. This is a temporary situation that we expect to fix before the stable release.
|
|
|
|
<h2>Command line installation</h2>
|
|
|
|
<h3>Software stack</h3>
|
|
|
|
<p>Assuming you are using a dedicated Ubuntu 24.04 LTS, these commands should help you have the software stack installed in a breeze. Otherwise, please review the requirements above and make sure they are met before moving on to the next section.</p>
|
|
<pre>
|
|
sudo -s
|
|
apt update && apt -y upgrade
|
|
apt -y install apache2 libapache2-mod-php8.3 mariadb-client mariadb-server redis-server php8.3-{bcmath,curl,exif,gd,iconv,intl,mbstring,mysql,opcache,soap,xml,zip,redis}
|
|
a2enmod rewrite
|
|
cd /var/www/
|
|
mkdir chamilo
|
|
wget https://github.com/chamilo/chamilo-lms/releases/download/v2.0.0-alpha.1/chamilo2.0.0-alpha.1.tar.gz
|
|
# about 400MB
|
|
tar zxf chamilo2.0.0-alpha.1.tar.gz
|
|
rm chamilo2.0.0-alpha.1.tar.gz
|
|
cd chamilo
|
|
touch .env
|
|
chown -R www-data: var .env
|
|
mysql -u root -e "GRANT ALL PRIVILEGES ON chamilo.* TO chamilo@localhost IDENTIFIED BY '[choose a password here]'";
|
|
mysql -u root -e "FLUSH PRIVILEGES;"
|
|
mysql_secure_installation
|
|
# give a MariaDB root password twice and answer the default "Y" to anything else. The root password is *not* the one you gave above here.
|
|
</pre>
|
|
|
|
<h3>Database</h3>
|
|
|
|
<p>You will need a database user with privilege to fully use (and optionally create) a database.<br>
|
|
Although progress has been made to support multiple database management systems, Chamilo
|
|
currently only supports MariaDB and MySQL.<br>
|
|
Setup a new user in your database system either through visual tools or directly in the terminal. If you have followed the command lines above, you can skip this.<br>
|
|
</p>
|
|
<pre>
|
|
mysql> GRANT ALL PRIVILEGES ON [db-name].* TO [db-user]@[db-host] IDENTIFIED BY '[db-password]';
|
|
mysql> FLUSH PRIVILEGES;
|
|
mysql> exit;</pre>
|
|
where:
|
|
<ul>
|
|
<li>[db-name] is the name of your database</li>
|
|
<li>[db-user] is the user that will have permissions to access this database</li>
|
|
<li>[db-host] is the name of the database server (use <em>localhost</em> when using the same machine for web server and database server - if you use a hosted service, your hosting provider will usually give you this name somewhere)</li>
|
|
<li>[db-password] is the password this user will use to connect to this database on this host. Use common sense to not make it too easy to guess (use special characters, lowercase and uppercase, numbers, and a length of *at least* 8 characters)</li>
|
|
</ul>
|
|
<h3>Web server</h3>
|
|
Chamilo 2+ only requires a working web server setup to work. You can run it on localhost with the default installation of any web server, provided you configure your DocumentRoot as the path pointing to Chamilo's <em>public/</em> subfolder.<br>
|
|
Here is an example Apache vhost configuration file for an installation on the http://my.chamilo.local/ URL (replace all values between brackets, including the brackets, to your custom values).<br>
|
|
It includes PHP settings which will only affect this vhost. If you prefer to set those PHP settings in php.ini, you are welcome to do so.<br>
|
|
We also assume you will be using a default Redis installation to manage sessions (see notes in the web panel install section).<br>
|
|
<pre>
|
|
cd /etc/apache2/sites-available
|
|
vim [my.chamilo.local].conf
|
|
<VirtualHost *:80>
|
|
ServerAdmin [your-email]
|
|
ServerName [my.chamilo.local]
|
|
DocumentRoot [/var/www/chamilo]/public/
|
|
# The following might not even be required
|
|
ErrorLog /var/log/apache2/[my.chamilo.local]-error.log
|
|
CustomLog /var/log/apache2/[my.chamilo.local]-access.log combined
|
|
DirectoryIndex index.php index.html
|
|
Options Indexes FollowSymLinks
|
|
<Directory [/var/www/chamilo/public]>
|
|
AllowOverride all
|
|
</Directory>
|
|
php_value display_errors Off
|
|
php_value file_uploads On
|
|
php_value session.auto_start Off
|
|
php_value short_open_tag Off
|
|
php_value session.cookie_httponly On
|
|
php_value upload_max_filesize 100M
|
|
php_value post_max_size 100M
|
|
php_value memory_limit 128M
|
|
php_value session.save_handler "redis"
|
|
php_value session.save_path "tcp://127.0.0.1:6379"
|
|
</VirtualHost></pre>
|
|
After setting up this virtual host, don't forget to enable it (example here on Debian/Ubuntu's command line):
|
|
<pre>
|
|
a2ensite [my.chamilo.local]
|
|
systemctl restart apache2</pre>
|
|
<h3>Files permissions</h3>
|
|
Make sure the following files and folders are writeable by the web server. Set permissions to 0770 for example:
|
|
<ul>
|
|
<li>var/</li>
|
|
<li>.env</li>
|
|
</ul>
|
|
Assuming your web server user is <em>www-data</em>, you can do that quickly with the following from inside the Chamilo root directory (already done in first example commands list for Ubuntu):
|
|
<pre>
|
|
sudo touch .env
|
|
sudo chown -R www-data:www-data var/ .env</pre>
|
|
<h3>PHP settings</h3>
|
|
Some PHP settings are recommended, but the default values should be enough to get you started.<br>
|
|
See vhost config's "php_value" section above for details.
|
|
|
|
<h3>Installation wizard</h3>
|
|
You should now be able to direct your browser to your URL (e.g. <em>[http://my.chamilo.local]</em>).<br>
|
|
Chamilo will pick it up from there and offer the installation wizard to help guide you through the rest of the process.
|
|
|
|
<h2>Help available</h2>
|
|
If you are struggling with this guide, don't hesitate to ask for help on <a href="https://github.com/chamilo/chamilo-lms/discussions">our community forum.</a><br>
|
|
If you have reasons to seek professional assistance and warranties, please contact <a href="https://chamilo.org/providers">one of our official providers</a>. They contribute heavily to the project and will be able to help you out quickly and efficiently, for configurations from 10 to 1M users.<br>
|
|
<hr />
|
|
Last updated: 2024-07-18
|
|
<a href="http://validator.w3.org/check?uri=referer"><img src="//www.w3.org/Icons/valid-xhtml10-blue" alt="Valid XHTML 1.0 Transitional" style="margin: 1em; float: right;" height="31" width="88" /></a>
|
|
<a href="http://jigsaw.w3.org/css-validator/">
|
|
<img src="//jigsaw.w3.org/css-validator/images/vcss-blue" style="margin: 1em; float: right;" alt="Valid CSS" />
|
|
</a>
|
|
</body>
|
|
</html>
|
|
|