How to Install Mahara on Ubuntu Server Latest

Mahara is an open source ePortfolio platform, which allows users to create digital portfolios or learning logs. In this tutorial, you will learn how to install Mahara on Ubuntu Server Latest.

Prerequisites

Before you start, you will need the following:

Step 1 – Install Apache Web Server

The Mahara application requires Apache web server to run. To install Apache, run the following command in your terminal:

sudo apt update
sudo apt install apache2

Once Apache is installed, open a web browser and navigate to http://localhost/. If you see the Apache2 Ubuntu Default Page, this means that Apache is working correctly.

Step 2 – Install PostgreSQL Database

Mahara uses PostgreSQL as its database server. To install PostgreSQL, run the following command in your terminal:

sudo apt install postgresql

By default, PostgreSQL creates a user named “postgres” with its own authentication method.

Step 3 – Create a User and Database for Mahara

To create a new PostgreSQL user and database specific to Mahara, run the following command in your terminal:

sudo su - postgres
createuser maharauser -P
createdb -O maharauser maharadb
exit

In this command, “maharauser” is the name of the new user that will be created, and “maharadb” is the name of the new database that will be created.

Step 4 – Install PHP and Required Modules

Mahara is a PHP application that requires several PHP modules. To install these required modules, run the following command in your terminal:

sudo apt update
sudo apt install php libapache2-mod-php php-xml php-mbstring php-gd php-pgsql php-curl unzip

Once PHP and its modules are installed, restart the Apache web server so that the changes take effect:

sudo systemctl restart apache2

Step 5 – Download Mahara

Download the latest version of Mahara from https://mahara.org/ and extract it to the /var/www/html directory:

sudo wget https://launchpad.net/mahara/20.10/20.10.0/+download/mahara-20.10.0.zip
sudo unzip mahara-20.10.0.zip -d /var/www/html/
sudo mv /var/www/html/mahara-20.10.0 /var/www/html/mahara

Step 6 – Configure Mahara

Configure Mahara by editing the /var/www/html/mahara/config.php file:

sudo nano /var/www/html/mahara/config.php

Make the following changes:

$cfg->dbtype   = 'pgsql';
$cfg->dbhost   = 'localhost';
$cfg->dbname   = 'maharadb';
$cfg->dbuser   = 'maharauser';
$cfg->dbpass   = 'password';
$cfg->wwwroot  = 'http://localhost/mahara';

Save and exit the file.

Ensure the /var/www/html/mahara directory is writable by the Apache web server, to allow for uploading files:

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

Step 7 – Finish Installation

Open a web browser and navigate to http://localhost/mahara. Follow the prompts to complete the Mahara installation.

Congratulations! You have successfully installed Mahara on Ubuntu Server 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!