Mahara is an open-source ePortfolio and social networking web application. It is widely used in educational institutions to help students manage their learning and showcase their achievements. In this tutorial, we will guide you on how to install Mahara on MXLinux Latest.
Before we begin, make sure that your server meets the following requirements:
Update your system to ensure that you have the latest software packages and security updates by running the following commands:
sudo apt update
sudo apt upgrade
Install Apache and PHP by running the following command:
sudo apt install apache2 libapache2-mod-php php
After installing Apache and PHP, verify that Apache is running:
sudo systemctl status apache2
You should see the following output if Apache is running:
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2021-10-04 15:02:07 UTC; 17s ago
...
Install MariaDB, which is a drop-in replacement for MySQL, by running the following command:
sudo apt install mariadb-server
After installing MariaDB, run the following command to secure your installation:
sudo mysql_secure_installation
This command will prompt you to set a root password and remove anonymous users and test databases.
Log in to the MariaDB shell as the root user:
sudo mysql -u root -p
Create a new database for Mahara:
CREATE DATABASE mahara;
Create a new user for Mahara:
CREATE USER 'maharauser'@'localhost' IDENTIFIED BY 'your_secure_password';
Grant privileges on the Mahara database to the new user:
GRANT ALL PRIVILEGES ON mahara.* TO 'maharauser'@'localhost';
Flush the privileges:
FLUSH PRIVILEGES;
Exit the MariaDB shell by running exit
.
Download the latest version of Mahara from the official Mahara website:
wget https://launchpad.net/mahara/21.04/21.04.3/+download/mahara-21.04.3.tar.gz
Extract the downloaded file:
tar -xvzf mahara-21.04.3.tar.gz
Move the extracted directory to the web server document root:
sudo mv mahara-21.04.3 /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
Create a new Apache virtual host configuration file for Mahara:
sudo nano /etc/apache2/sites-available/mahara.conf
Add the following configuration:
<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /var/www/html/mahara
<Directory /var/www/html/mahara>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/mahara-error.log
CustomLog ${APACHE_LOG_DIR}/mahara-access.log combined
</VirtualHost>
Replace yourdomain.com
with your server domain name or IP address.
Enable the virtual host configuration by running the following command:
sudo a2ensite mahara.conf
Reload the Apache service to apply the changes:
sudo systemctl reload apache2
In your web browser, navigate to http://yourdomain.com/install.php
. Replace yourdomain.com
with your server domain name or IP address.
Follow the prompts and enter the database information and admin user details that you created in Step 4.
After completing the installation, remove the install.php
file:
sudo rm /var/www/html/mahara/install.php
That’s it! You have successfully installed Mahara on MXLinux latest. You can now start using Mahara to manage your learning and showcase your achievements.
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!