Howto install Mahara

@john_sutten asked about an NS7 process for Mahara here and @robb mentioned it for education part here so here is a quick install howto…

I used nethserver-postgresql and nethserver-rh-php56-php-fpm for providing database and PHP56.
If you plan to use this in a production environment, please change the passwords SECRET, URLSECRET and the password salt “G4qSMj5UnoR8i9zj7MWu”.

# Install required packages
yum -y install nethserver-postgresql nethserver-rh-php56-php-fpm rh-php56-php-gd rh-php56-php-pgsql rh-php56-php-xmlrpc sclo-php56-php-mcrypt sclo-php56-php-pecl-imagick rh-php56-php-mbstring
# Get Mahara
wget https://launchpad.net/mahara/17.10/17.10.3/+download/mahara-17.10.3.tar.gz
tar -xf mahara-17.10.3.tar.gz
mv mahara-17.10.3/htdocs /var/www/html/mahara
mkdir -p /var/lib/nethserver/maharadata
chown -R apache:apache /var/www/html/mahara /var/lib/nethserver/maharadata
# Create postgres DB and user
su - postgres -c "createuser -SRD mahara;createdb -O mahara -T template0 -EUTF8 mahara"
su - postgres -c "psql -c \"alter user mahara with encrypted password 'SECRET';\""
# Create and edit config.php
cp /var/www/html/mahara/config-dist.php /var/www/html/mahara/config.php
sed -i "s/$cfg->dbname   = ''/$cfg->dbname   = 'mahara'/" /var/www/html/mahara/config.php
sed -i "s/$cfg->dbuser   = ''/$cfg->dbuser   = 'mahara'/" /var/www/html/mahara/config.php
sed -i "s/$cfg->dbpass   = ''/$cfg->dbpass   = 'SECRET'/" /var/www/html/mahara/config.php
sed -i "s#$cfg->dataroot = '/path/to/uploaddir'#$cfg->dataroot = '/var/lib/nethserver/maharadata'#" /var/www/html/mahara/config.php
sed -i "s#// \$cfg->urlsecret = 'mysupersecret'#\$cfg->urlsecret = 'URLSECRET'#" /var/www/html/mahara/config.php
sed -i "s#// \$cfg->passwordsaltmain = 'some long random string here with lots of characters'#\$cfg->passwordsaltmain = 'G4qSMj5UnoR8i9zj7MWu'#" /var/www/html/mahara/config.php
# Create httpd config
cat << EOF > /etc/httpd/conf.d/mahara.conf
<Directory /var/www/html/mahara>
  Require all granted
  <FilesMatch \.php$>
        SetHandler "proxy:fcgi://127.0.0.1:9000"
  </FilesMatch>
  SetEnv PHP_VALUE "post_max_size = 16M"
</Directory>
EOF
# Restart services
systemctl restart rh-php56-php-fpm
systemctl restart httpd

Browse to https://NETHSERVER/mahara and “Install Mahara”:

After installation click “continue”.

grafik

Enter your admin credentials and you’re ready:

5 Likes

Thnx @mrmarkuz Great to see this in NS…

Never heard about Mahara so far, thanks for sharing that :slight_smile:

Just to explain 'Why Mahara’
Mahara is a webapplication to build a portfolio. You can see a portfolio like an extended resume. It is a list with achievements, but also a list of goals and dreams: What can someone do now and what are the ambitions.
Especially for schools, an ePortfolio is a powerful tool to let a student develop his or her future.
more info on the mahara website: https://mahara.org/

2 Likes