How to Install Mahara on Linux Mint

Mahara is an open-source e-portfolio platform that helps users create, share, and manage their digital content. In this tutorial, we will show you how to install Mahara on Linux Mint 20, which is the latest version of the Mint operating system.

Prerequisites

Before we start with the installation, make sure that the following requirements are met:

Step 1: Download Mahara

The first step is to download the latest version of Mahara from their official website. You can download it using the following command:

wget https://github.com/MaharaProject/mahara/archive/master.zip

Once the download is complete, unzip the archive to the /var/www/html directory:

sudo unzip master.zip -d /var/www/html/

Next, rename the extracted directory to "mahara":

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

Change the ownership of the "mahara" directory to the Apache user:

sudo chown -R www-data:www-data /var/www/html/mahara

Step 2: Create a Database

Next, you need to create a database for Mahara to store its data. Log in to your MySQL/MariaDB shell with the following command:

sudo mysql -u root

Once you are inside the MySQL/MariaDB shell, create a new database and user:

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

Replace "password" with a strong password for the user.

Step 3: Install Mahara Dependencies

Mahara requires several PHP extensions to function correctly. You can install them using the following command:

sudo apt install -y php7.4 php7.4-curl php7.4-gd php7.4-mbstring php7.4-mysql php7.4-xml

Step 4: Configure Apache for Mahara

Create a new VirtualHost configuration file for Mahara in the /etc/apache2/sites-available directory:

sudo nano /etc/apache2/sites-available/mahara.conf

Paste the following configuration into the file:

<VirtualHost *:80>
    ServerName example.com # Replace with your domain name

    DocumentRoot /var/www/html/mahara/

    <Directory /var/www/html/mahara/>
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/mahara_error.log
    CustomLog ${APACHE_LOG_DIR}/mahara_access.log combined
</VirtualHost>

Save and close the file.

Enable the new VirtualHost and Apache modules:

sudo a2ensite mahara.conf
sudo a2enmod rewrite

Finally, restart the Apache service:

sudo systemctl restart apache2

Step 5: Install Mahara

Open your web browser and navigate to your server's IP address or domain name. You should see the Mahara installer page.

Follow the on-screen instructions to install Mahara. When prompted, enter the database details that you created in Step 2.

After the installation is complete, delete the install.php file from the /var/www/html/mahara directory:

sudo rm /var/www/html/mahara/install.php

Conclusion

Congratulations, you have successfully installed Mahara on Linux Mint. You can now log in to your Mahara site and start creating your e-portfolio.

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!