Installing Mahara on Clear Linux

In this tutorial, we will be installing Mahara ePortfolio system on Clear Linux Latest. Mahara is an open-source e-portfolio and social networking web application that can be used to create and share digital content such as documents, images, and videos.

Prerequisites

Before we begin, we must have the following requirements in place:

Step 1 - Install Required Packages

First, we need to install the packages required for Mahara. Open a terminal and run the following command:

sudo swupd bundle-add lamp-stack

This command will install the LAMP stack (Linux, Apache, MariaDB, and PHP), which is the required infrastructure for Mahara.

Step 2 - Create a New Database for Mahara

Mahara requires a database to store data. We will create a new database and user for Mahara. Login to your MariaDB server and run the following commands:

CREATE DATABASE mahara;
GRANT ALL PRIVILEGES ON mahara.* TO 'maharauser'@'localhost' IDENTIFIED BY 'maharapass';
FLUSH PRIVILEGES;

In the above commands, we created a database named 'mahara' and a user named 'maharauser' with a password 'maharapass'. It is recommended to change the password for increased security.

Step 3 - Download Mahara

Download the latest Mahara package using the following command:

wget https://launchpad.net/mahara/21.04/21.04.1/+download/mahara-21.04.1.tar.gz

Once the download is complete, extract the package using the following command:

tar xvf mahara-21.04.1.tar.gz

Step 4 - Move Mahara Files to Document Root

Move the extracted Mahara files to Apache's document root directory using the following command:

sudo mv mahara-21.04.1 /var/www/html/mahara

Step 5 - Set Permissions

Set the correct permissions for the Mahara files using the following commands:

sudo chown -R apache:apache /var/www/html/mahara
sudo chmod -R 775 /var/www/html/mahara

Step 6 - Configure Mahara

Navigate to the Mahara directory using the following command:

cd /var/www/html/mahara/

Rename the 'config-dist.php' file to 'config.php' using the following command:

sudo mv htdocs/config-dist.php htdocs/config.php

Open the 'config.php' file using a text editor:

sudo nano htdocs/config.php

Update the 'database' section with the following configuration:

  $cfg->dbtype   = 'mysqli';
  $cfg->dbhost   = 'localhost';
  $cfg->dbname   = 'mahara';
  $cfg->dbuser   = 'maharauser';
  $cfg->dbpass   = 'maharapass';
  $cfg->dbprefix = 'usr_';

Save and close the file.

Step 7 - Configure Apache

Create a new Apache configuration file for Mahara using the following command:

sudo nano /etc/httpd/conf.d/mahara.conf

Add the following configuration to the file:

<VirtualHost *:80>
  ServerName example.com
  ServerAlias www.example.com
  DocumentRoot /var/www/html/mahara/htdocs

  <Directory /var/www/html/mahara/htdocs>
    Options FollowSymLinks
    AllowOverride All
  </Directory>

  ErrorLog /var/log/httpd/mahara-error.log
  CustomLog /var/log/httpd/mahara-access.log combined
</VirtualHost>

Save and close the file.

Step 8 - Restart Apache

Restart Apache to apply the changes using the following command:

sudo systemctl restart httpd

Step 9 - Access Mahara

Open a web browser and go to 'http:///mahara' to access the Mahara installation wizard.

Follow the instructions on the screen to complete the installation process.

Once the installation is complete, you can log in to your Mahara system using the administrator account.

Congratulations! You have successfully installed Mahara on Clear Linux Latest.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!