Mahara: Difference between revisions

From Alpine Linux
mNo edit summary
(replace /etc/init.d with rc-service)
 
(2 intermediate revisions by 2 users not shown)
Line 11: Line 11:
== Installing and configuring  Mahara ==
== Installing and configuring  Mahara ==


'''Install Mahara'''
Create the {{Path|webapps}} folder


Make webapps folder
{{Cmd|mkdir -p /usr/share/webapps/}}


{{Cmd|mkdir /usr/share/webapps/ -p}}
Download the source code archive
 
Download  


{{Cmd|cd /usr/share/webapps/
{{Cmd|cd /usr/share/webapps/
wget http://gitorious.org/mahara/mahara/archive-tarball/1.5_STABLE}}
wget http://gitorious.org/mahara/mahara/archive-tarball/1.5_STABLE}}


Unpack  
Unpack the archive and delete it afterwards


{{Cmd|tar -xzvf tar zxvf 1.5_STABLE  
{{Cmd|tar -xzvf tar zxvf 1.5_STABLE  
rm 1.5_STABLE }}
rm 1.5_STABLE }}


Make symlinks to Mahara
Crate a symlink to the Mahara folder


{{Cmd|mv /var/www/localhost/htdocs/ /var/www/localhost/htdocs.old
{{Cmd|mv /var/www/localhost/htdocs/ /var/www/localhost/htdocs.old
Line 65: Line 63:
Restart lighttpd
Restart lighttpd


{{Cmd| /etc/init.d/lighttpd restart
{{Cmd|rc-service lighttpd restart}}
}}


== Config and start MySql ==
== Config and start MySql ==


{{Cmd|<nowiki>/usr/bin/mysql_install_db --user=mysql
{{Cmd|<nowiki>/usr/bin/mysql_install_db --user=mysql
/etc/init.d/mysql start && rc-update add mysql default
rc-service mysql start && rc-update add mysql default
/usr/bin/mysqladmin -u root password 'password'</nowiki>}}
/usr/bin/mysqladmin -u root password 'password'</nowiki>}}


Line 85: Line 82:
== Config your Mahara ==
== Config your Mahara ==


Browse to: http://WEBSERVER_IP_ADDRESS/ and click in '''Install Mahara'''
Browse to: <nowiki>http://WEBSERVER_IP_ADDRESS/</nowiki> and click in '''Install Mahara'''




Line 95: Line 92:
:* Your E-mail
:* Your E-mail


You have Mahara working, to access go to http://WEBSERVER_IP_ADDRESS/ and enjoy!
You have Mahara working, to access go to <nowiki>http://WEBSERVER_IP_ADDRESS/</nowiki> and enjoy!


[[Category:Server | PHP | SQL | Social Network]]
[[Category:Server | PHP | SQL | Social Network]]

Latest revision as of 09:49, 17 November 2023

At the simplest level, Mahara is two things: an e-portfolio and a social networking system combined. An e-portfolio is a system in which students can record "evidences of lifelong learning" - such as essays, artwork or other such things they produce that can be stored digitally. Such things are known as artefacts in Mahara. Social networking systems need little introduction - think Myspace, Facebook or Bebo. Basically, they give a way for people to interact with their friends and create their own online communities.

But Mahara is much more than just a place to store files. Mahara also includes blogging, a resumé builder, Moodle integration and the standout views framework.

Install lighttpd, PHP, and MySql

Basic Installation

For installing the additional packages first activate community packages and update the package index

Install the required packages:

# apk add lighttpd php82 fcgi php82-cgi

Configure Lighttpd

Edit lighttpd.conf (/etc/lighttpd/lighttpd.conf) and uncomment the line:

Contents of /etc/lighttpd/lighttpd.conf

... include "mod_fastcgi.conf" ...

Edit mod_fastcgi.conf (/etc/lighttpd/mod_fastcgi.conf), find and change /usr/bin/php-cgi to /usr/bin/php-cgi82.

Contents of /etc/lighttpd/mod_fastcgi.conf

... "bin-path" => "/usr/bin/php-cgi82" # php-cgi ...

Start lighttpd service and add it to default runlevel

# rc-service lighttpd start # rc-update add lighttpd default

Install extra packages:

apk add php-mysql mysql mysql-client

Installing and configuring Mahara

Create the webapps folder

mkdir -p /usr/share/webapps/

Download the source code archive

cd /usr/share/webapps/ wget http://gitorious.org/mahara/mahara/archive-tarball/1.5_STABLE

Unpack the archive and delete it afterwards

tar -xzvf tar zxvf 1.5_STABLE rm 1.5_STABLE

Crate a symlink to the Mahara folder

mv /var/www/localhost/htdocs/ /var/www/localhost/htdocs.old ln -s /usr/share/webapps/mahara-mahara/htdocs/ /var/www/localhost/htdocs

Edit the config file

cp mahara-mahara/htdocs/config-dist.php mahara-mahara/htdocs/config.php vi mahara-mahara/htdocs/config.php

Change

  • Set:
// database connection details
// valid values for dbtype are 'postgres8' and 'mysql5'
$cfg->dbtype   = 'mysql5';
$cfg->dbhost   = 'localhost';
$cfg->dbport   = null;
$cfg->dbname   = 'mahara';
$cfg->dbuser   = 'root';
$cfg->dbpass   = 'password';
$cfg->dataroot = '/tmp/';


Edit the php.ini

vi /etc/php/php.ini

  • Set:
session.entropy_length = 16
post_max_size = 50M

Restart lighttpd

rc-service lighttpd restart

Config and start MySql

/usr/bin/mysql_install_db --user=mysql rc-service mysql start && rc-update add mysql default /usr/bin/mysqladmin -u root password 'password'

Create the Mahara database

mysql -u root -p

CREATE DATABASE mahara; GRANT ALL PRIVILEGES ON mahara.* TO 'mahara'@'localhost' IDENTIFIED BY 'mahara password'; FLUSH PRIVILEGES; EXIT

Config your Mahara

Browse to: http://WEBSERVER_IP_ADDRESS/ and click in Install Mahara


After the Successfully installed Mahara. click Continue

  • Enter Information needed
  • Password, twice
  • Your E-mail

You have Mahara working, to access go to http://WEBSERVER_IP_ADDRESS/ and enjoy!