Starting point: a clean Ubuntu Server 20.04 installation
Run apt update
and apt dist-upgrade
to check if your Ubuntu installation is
up-2-date.
Restart your server when updates are installed.
sudo apt install ...
sudo nano /etc/mysql/conf.d/disable_strict_mode.cnf
[mysqld] sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Follow the installation instructions above (server preparation), so all PHP packages are installed and MySQL is running without strict mode.
Go to the folder /var/www and run the following command to get the latest Cosnics code:
git clone https://github.com/cosnics/cosnics.git
Now, go into the folder /var/www/cosnics and run the following command to get all dependencies:
composer install
Extract the ZIP file into the folder /var/www
DocumentRoot /var/www/cosnics/web
Set proper permissions to the /var/www/cosnics folder, the default Apache user in Ubuntu is www-data:
chown -R www-data:www-data /var/www/cosnics
Install Cosnics by going to your server URL.
After a successful installation, run the following commands on the terminal once:
cd /var/www/cosnics
sudo -u www-data php console chamilo:rights:structure:synchronize_locations