Skip to content

Instantly share code, notes, and snippets.

@linuxfemale
Created November 18, 2019 14:46
Show Gist options
  • Save linuxfemale/216610cf2f95b3e8d38d0ae60f4b6e63 to your computer and use it in GitHub Desktop.
Save linuxfemale/216610cf2f95b3e8d38d0ae60f4b6e63 to your computer and use it in GitHub Desktop.
Forma Learning Management System (LMS) On Ubuntu 18.04
Step 1: Install Apache2 HTTP Server
sudo apt update
sudo apt install apache2
sudo systemctl stop apache2.service
sudo systemctl start apache2.service
sudo systemctl enable apache2.service
http://localhost
Step 2: Install MariaDB Database Server
sudo apt-get install mariadb-server mariadb-client
sudo systemctl stop mariadb.service
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service
sudo mysql_secure_installation
When prompted, answer the questions below by following the guide.
Enter current password for root (enter for none): Just press the Enter
Set root password? [Y/n]: Y
New password: Enter password
Re-enter new password: Repeat password
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y
sudo mysql -u root -p
Step 3: Install PHP 7.0 and Related Modules
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.0 libapache2-mod-php7.0 php7.0-common php7.0-mysql php7.0-gmp php7.0-ldap php7.0-curl php7.0-intl php7.0-mbstring php7.0-xmlrpc php7.0-gd php7.0-bcmath php7.0-xml php7.0-cli php7.0-zip
sudo nano /etc/php/7.0/apache2/php.ini
file_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = America/Chicago
sudo systemctl restart apache2.service
sudo nano /var/www/html/phpinfo.php
<?php phpinfo( ); ?>
http://localhost/phpinfo.php
Step 4: Create Forma Database
sudo mysql -u root -p
#Then create a database called forma
CREATE DATABASE forma CHARACTER SET utf8 COLLATE utf8_general_ci;
#Create a database user called formauser with a new password
CREATE USER 'formauser'@'localhost' IDENTIFIED BY 'new_password_here';
#Then grant the user full access to the database.
GRANT ALL ON forma.* TO 'formauser'@'localhost' IDENTIFIED BY 'user_password_here' WITH GRANT OPTION;
#Finally, save your changes and exit.
FLUSH PRIVILEGES;
EXIT;
Step 5: Download Forma Latest Release
cd /tmp
wget -c "https://sourceforge.net/projects/forma/files/latest/download?source=files" -O formalms-v2.0.zip
sudo unzip -d /var/www/html/forma /tmp/formalms-v2.0.zip
sudo chown -R www-data:www-data /var/www/html/forma/
sudo chmod -R 755 /var/www/html/forma/
Step 6: Configure Apache2
sudo nano /etc/apache2/sites-available/forma.conf
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/forma/formalms
ServerName example.com
ServerAlias www.example.com
<Directory /var/www/html/forma/formalms/>
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html/forma/formalms/>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) index.php [PT,L]
</Directory>
</VirtualHost>
sudo a2ensite forma.conf
sudo a2enmod rewrite
sudo systemctl restart apache2.service
http://localhost/
After that Forma LMS should be installed and ready to use…
You will be prompted to download the config.php file and save in Forma root directory…
sudo cp ~/Download/config.php /var/www/html/forma/formalms/
Finally, delete the install folder.
sudo rm -rf /var/www/html/forma/formalms/install
Congratulation! You have successfully installed Forma LMS on Ubuntu 18.04 and 18.10.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment