Mahara is an open-source ePortfolio and social networking platform. In this tutorial, we will discuss how to install Mahara on the latest version of EndeavourOS. EndeavourOS is an Arch-based Linux distribution that provides a user-friendly system installer and aims to be a minimal distro.
Before we start the installation process, make sure that you have the following prerequisites:
Before we start the installation process, it is always a good practice to update the system to the latest version. You can do this by running the following command in the terminal:
sudo pacman -Syu
This command will update all the installed packages to the latest version.
Mahara requires an Apache web server to run. To install Apache, run the following command in the terminal:
sudo pacman -S apache
After the installation is complete, start the Apache server and enable it to start automatically at boot time by running the following commands:
sudo systemctl start httpd
sudo systemctl enable httpd
To verify that the Apache server is running, open your web browser and enter the following URL:
http://localhost
If everything is working correctly, you should see the Apache default page.
Mahara is a PHP-based application, so we need to install PHP on our system. To install PHP, run the following command in the terminal:
sudo pacman -S php php-apache
After the installation is complete, we need to enable the PHP module in Apache by editing the httpd.conf
file. Open the httpd.conf
file with your preferred text editor:
sudo nano /etc/httpd/conf/httpd.conf
Uncomment the following line by removing the #
symbol:
LoadModule php_module modules/libphp.so
Save and close the file.
Restart the Apache server to apply the changes:
sudo systemctl restart httpd
To test if PHP is working correctly, create a new PHP file named info.php
with the following content:
<?php phpinfo(); ?>
Save the file in the webroot of Apache:
sudo nano /srv/http/info.php
Open your web browser and enter the following URL:
http://localhost/info.php
If everything is working correctly, you should see the PHP information page.
After verifying that PHP is working correctly, remove the info.php
file as it may contain sensitive information:
sudo rm /srv/http/info.php
Mahara requires a database to store its data, and we will use MariaDB as our database server. To install MariaDB, run the following command in the terminal:
sudo pacman -S mariadb
After the installation is complete, start the MariaDB service and enable it to start automatically at boot time:
sudo systemctl start mysqld
sudo systemctl enable mysqld
Next, run the MySQL secure installation script to set the root password and other security-related settings:
sudo mysql_secure_installation
Answer the questions as follows:
After installing MariaDB, we need to create a new database and user for Mahara. To create a new database, log in to the MySQL shell:
sudo mysql -u root -p
Enter the root password when prompted.
Create a new database named mahara
:
CREATE DATABASE mahara;
Create a new user named maharauser
with the password password123
:
CREATE USER 'maharauser'@'localhost' IDENTIFIED BY 'password123';
Grant all privileges on the mahara
database to the maharauser
:
GRANT ALL PRIVILEGES ON mahara.* TO 'maharauser'@'localhost';
Flush the privileges and exit the MySQL shell:
FLUSH PRIVILEGES;
EXIT;
Now that we have installed all the required dependencies and set up the database, we can proceed with the installation of Mahara. To download the latest version of Mahara, run the following command:
wget https://launchpad.net/mahara/21.04/21.04.0/+download/mahara-21.04.0.tar.gz
Extract the archive file:
tar -xzvf mahara-21.04.0.tar.gz
Move the extracted files to the Apache root directory:
sudo mv mahara-21.04.0 /srv/http/mahara
Set the ownership and permissions of the Mahara installation directory:
sudo chown -R http:http /srv/http/mahara/
sudo chmod -R 755 /srv/http/mahara/
Before accessing the Mahara installation page, we need to configure some settings in the config.php
file. Copy the sample configuration file to the htdocs
directory:
sudo cp /srv/http/mahara/htdocs/config-dist.php /srv/http/mahara/htdocs/config.php
Edit the config.php
file with your preferred text editor:
sudo nano /srv/http/mahara/htdocs/config.php
Update the following settings:
$cfg->dbhost = 'localhost';
$cfg->dbname = 'mahara';
$cfg->dbuser = 'maharauser';
$cfg->dbpass = 'password123';
$cfg->wwwroot = 'http://localhost/mahara';
$cfg->sessioncookie = 'mahara';
Save and close the file.
After configuring the config.php
file, open your web browser and enter the following URL:
http://localhost/mahara
The Mahara installation page will appear. Follow the on-screen instructions to complete the installation process.
In this tutorial, we have discussed how to install Mahara on the latest version of EndeavourOS. We have covered the installation of Apache, PHP, and MariaDB, and configuring and installing Mahara. With Mahara, you can create and manage your ePortfolios and social network. Happy Learning!
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!