Mahara is an open-source e-portfolio system. It can also be used as a social networking platform. Mahara is written in PHP and uses either PostgreSQL or MySQL database server to store its data.

Step1. Install packages

yum install httpd mariadb mariadb-server   

Step2. Start services

systemctl start httpd
systemctl enable httpd
systemctl status httpd
systemctl start mariadb
systemctl enable mariadb
systemctl status mariadb

Step3. Enable HTTP port on the firewall

firewall-cmd --zone=public --permanent --add-service=httpĂ‚ 
firewall-cmd --reload

Step4. Setup database


Step5. Create a database and user

mysql -u root -p
show databases;
Create database mahadb;
CREATE USER 'mahauser'@'%' IDENTIFIED BY 'redhat@123';
GRANT ALL PRIVILEGES ON mahadb.* TO 'mahauser'@'%';
select Host,User,Password from user;

Step6. Install/configure PHP repository

yum install
yum install yum-utils
yum-config-manager --enable remi-php72

Step7. Install PHP packages

yum install php-mysql php-gd php-ldap php-xml php-xmlrpc php-mbstring php-mcrypt curl zlib libtool-ltdl php-pdo

Step8. Download the Mahara software

yum install wget unzip

Step9. Unzip the file and move the file in HTML folder

mv /var/www/html

Step10. Create a duplicate file config.php in the location ” /var/www/html/mahara/htdocs/”for mahara.

cd /var/www/html/mahara/htdocs/
cp config-dist.php config.php

Step11. Configure config.php file

vi  config.php

$cfg-> dbtype   = ' mysql'  
$cfg-> dbhost   = ' localhost'  
$cfg-> dbport   = null 
$cfg-> dbname   = ' mahadb'  
$cfg-> dbuser   = ' mahauser'  
$cfg-> dbpass   = ' redhat@123'  
$cfg-> dataroot = ' /var/www/html/mahara/upload/'

Step10. Set permission

chown -R apache.apache /var/www/html/mahara
chmod -R 777 /var/www/html/mahara

Step11. Create a virtual host file

vi /etc/httpd/conf.d/mahara.conf 

<VirtualHost *:80>
     ServerAdmin localhost
     DocumentRoot "/var/www/html/mahara/"
     ErrorLog "/var/log/httpd/mahara-error_log"
     CustomLog "/var/log/httpd/mahara-access_log" combined

     <Directory "/var/www/html/mahara/">
         DirectoryIndex index.html index.php install.php
         Options FollowSymLinks
         AllowOverride All
         Require all granted

Step12. Start the service

systemctl start httpd 

Step13. Open the web browser

http://<server ip>/mahara


Please enter your comment!
Please enter your name here