How to Install Mahara on Elementary OS Latest

Mahara is a free and open-source ePortfolio and social networking web application. It is designed for students, educators, and professionals who want to create and share digital portfolios. In this tutorial, we will explain how to install Mahara on the latest version of Elementary OS.

Prerequisites

Before starting the installation process, make sure that the following prerequisites are met:

Step 1: Update and Upgrade

The first step is to update and upgrade your system to the latest version. Open a terminal and run the following command:

sudo apt update && sudo apt upgrade -y 

This command will update the system package list and upgrade all the packages to the latest version.

Step 2: Install LAMP stack

Mahara is a web-based application, so we need to install a web server, database, and PHP. We will use the LAMP stack for this purpose. Run the following command to install the LAMP stack:

sudo apt install lamp-server^ -y

This command will install Apache as a web server, MySQL as a database server, and PHP as a server-side scripting language.

Step 3: Configure MySQL Database

Before we install Mahara, we need to create a MySQL database and user for Mahara. Run the following command to login to the MySQL shell:

sudo mysql -u root -p

Enter your MySQL root password when prompted. Once you're logged in, run the following commands to create a database, user, and grant privileges to the user:

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

Replace the password with a strong password of your choice.

Step 4: Download Mahara

Now, we need to download Mahara. Go to the Mahara website and download the latest version of Mahara. You can also use the following command to download Mahara directly through the terminal:

cd /tmp
wget https://launchpad.net/mahara/21.04/21.04.0/+download/mahara-21.04.0.tar.gz

Step 5: Extract Mahara

After downloading Mahara, extract it using the following command:

tar -xvzf mahara-21.04.0.tar.gz

This command will extract the Mahara files into a new directory named mahara-21.04.0.

Step 6: Copy Mahara Files to Apache Web Directory

Now, we need to copy the Mahara files to the Apache web directory. Run the following command to copy the Mahara files to the web directory:

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

Step 7: Set Permissions

We need to set the correct permissions for the Mahara files and directories. Run the following command to set the permissions:

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

Step 8: Configure PHP

We need to configure PHP for Mahara. Open the php.ini file using the following command:

sudo nano /etc/php/7.4/apache2/php.ini 

Find the following lines and uncomment them by removing the semicolon (;):

;extension=mysqli
;extension=gd2

Save and close the file.

Step 9: Restart Apache

After making changes to the Apache configuration and PHP, we need to restart the Apache service. Run the following command to restart Apache:

sudo service apache2 restart

Step 10: Access Mahara

Open your web browser and go to http://localhost/mahara/. You will see the Mahara installation page. Follow the steps to install Mahara. Provide the MySQL database details that we created earlier.

Once the installation is complete, you will be redirected to the Mahara login page. Login with your credentials and start using Mahara.

Conclusion

In this tutorial, we have explained how to install Mahara on the latest version of Elementary OS. Mahara is a powerful tool that allows students, educators, and professionals to create and share digital portfolios. We hope this tutorial helps you install Mahara on your system.

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!