TurnKey Linux Virtual Appliance Library

Mahara TKLPatch

Update: The Mahara patch of the 11.0 RC of both he LAPP stack and the LAPP stack are attached below. Any feedback or suggestions are certainly encouraged. This is our first contact with Postgresql.

Mahara is an eportfolio and resume and resume-building web-based application with social networking features. It's built to integrate well with Moodle. ISO and VM for VMware and VirtualBox are up, or rather are being uploaded as I write this, to http://9while9.com.

Although Mahara prefers Postgresql, we thought it might be good form to post a patch for the LAMP stack as well. We should have that done within the week, unless someone suggests the LAPP stack is enough.

Credentials

Ubuntu

Username: root

Password: set on first boot

PostgreSQL

Root user: Postgres

Root password: set on first boot

Database Name: mahara

Mahara User: mahara

Mahara User Password:  mahara

 

MySQL

Root user: root

Root Password: Set on install

Database: mahara

Database user: mahara

The original plan:

A Mahara TKLPatch is just around the corner (hopefully that's not hubris speaking). Working on this project are the following Chelsea School students: Jerel Moses, Steven Robinson, and Maurice Quarles. The plan: 1) Built Mahara virtual appliances for LAPP and LAMP 2) Revise and post build notes 3) Build TKLPatches for LAPP and LAMP Lucid RCs.

Build Notes and Virtual Appliances

OK build notes are ready for the LAMP appliance. VMware appliances based on LAPP and LAMP stacks are available at http://9while9.com.

Mahara with TKL's LAMP (Lucid RC) for VMware

To get started, we downloaded and installed TurkKey Linux's LAMP stack (Lucid RC). When prompted for passwords, we used root for the Ubuntu root user and for the MySQL root user. On restart, login as root through ssh (via Putty, for example), or through the web shell (address and port appear on the services page on startup).

One caveat: to build the appliance, we had to install elinks or lynx to be able to authenticate and get through our proxy. We don't include the step here, but one or both are installed on the appliance we're providing for download.

Set Hostname

	HOSTNAME=mahara (dunno why this line is indenting)
echo "$HOSTNAME" > /etc/hostname
sed -i "s|127.0.1.1 \(.*\)|127.0.1.1 $HOSTNAME|" /etc/hosts

Ennable InnoDB

If you install Mahara without this step, it'll let you know that there's a problem with InnoDB tables. This problem is documented here. So we used the recommended work-around.

/etc/init.d/mysql stop
mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bak
mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bak
/etc/init.d/mysql start

Configure Database

We used PHPMySQL to handle this; in preparation for the patch, however, we should have done it from the command line. Had we done it from the command line as we should have, it would have gone something like this:

mysql -u root -e "CREATE DATABASE mahara"
mysql -u root -e "CREATE USER 'mahara'@'localhost' IDENTIFIED BY 'mahara'"
mysql -u root -e "GRANT ALL on mahara.* to 'mahara'@'localhost' IDENTIFIED by 'mahara'"

Install Mahara

apt-get update
apt-get install mahara-apache2

Ennable Mahara Alias

Open /etc/apache2/conf.d/mahara with your favorite available text editor.

Uncomment the line defining the alias to Mahara (line 4, according to our notes).

/etc/init.d/apache2/restart

Edit the Confconsole Text

Use your favorite text editor to edit services.txt:

nano /etc/confconsole/services.txt

Add a line for Mahara. Use spaces rather than tabs, then enter http://$ipaddr/mahara.

 

Mahara with TKL's LAPP (Lucid RC) for VMware

Set Hostname

	HOSTNAME=mahara
echo "$HOSTNAME" > /etc/hostname
sed -i "s|127.0.1.1 \(.*\)|127.0.1.1 $HOSTNAME|" /etc/hosts

Configure Postgres DB

We used phppgsql to add a user attached to database "mahara" with password "mahara".

In the script we will build, we will use these lines from the Mahara Wiki:

# Run these commands while su'd to the 'postgres' user
# If you need to create a database user:
createuser -SRDP (username)
# Actual database creation
createdb -O (username who will be connecting) -EUTF8 (databasename)

Install Mahara

apt-get update
apt-get install mahara-apache2

Ennable Mahara Alias

Open /etc/apache2/conf.d/mahara with your favorite available text editor.

Uncomment the line defining the alias to Mahara (line 4, according to our notes).

/etc/init.d/apache2/restart

Edit the Confconsole Text

Use your favorite text editor to edit services.txt:

nano /etc/confconsole/services.txt

Add a line for Mahara. Use spaces rather than tabs, then enter http://$ipaddr/mahara.


Mahara for LAPP and LAMP: question about postgres

UPDATE: The patch for LAPP is done. We'll attach it to the parent post asap.

Old update: I think I've got it figured out. su -c - postgres appears to work. Will update with confirmation.

I think we've got the LAMP patch nailed, but since Mahara recommends postgres, we thought we'd try our hand at that as well.

We can't get user root to execute as postgres. One iteration of the conf script looks like this:

#!/bin/bash -ex

# Set Hostname
HOSTNAME=mahara
echo "$HOSTNAME" > /etc/hostname
sed -i "s|127.0.1.1 \(.*\)|127.0.1.1 $HOSTNAME|" /etc/hosts

# start postgres daemon
/etc/init.d/postgresql-8.4 start
su - postgres
createuser -SRD mahara
createdb -O mahara -EUTF8 mahara
psql -d mahara -f /usr/share/mahara/sql/changepass.sql
exit
/etc/init.d/postgresql-8.4 stop

# install mahara-apache2
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get -y \
    -o DPkg::Options::=--force-confdef \
    -o DPkg::Options::=--force-confold \
    install mahara-apache2

# post package install - configure apache2 and shutdown daemon
ln -s /etc/apache2/conf.d/mahara /etc/mahara/apache.conf
sed -i 's/#Alias\ \/mahara/Alias/' /etc/apache2/conf.d/mahara
/etc/init.d/apache2 stop

However, the su - postgres takes us to interactive land, which we don't want.

So at the recommendation of a helpful denizen of #postgresql, we added this to pg_hba.conf:

local all  all  trust

as the first uncommented line.

then we tried this:

#!/bin/bash -ex

# Set Hostname
HOSTNAME=mahara
echo "$HOSTNAME" > /etc/hostname
sed -i "s|127.0.1.1 \(.*\)|127.0.1.1 $HOSTNAME|" /etc/hosts

# start postgres daemon
/etc/init.d/postgresql-8.4 start
#su - postgres
createuser -SRD mahara
createdb -O mahara -EUTF8 mahara
psql -d mahara -f /usr/share/mahara/sql/changepass.sql
#exit
/etc/init.d/postgresql-8.4 stop

# install mahara-apache2
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get -y \
    -o DPkg::Options::=--force-confdef \
    -o DPkg::Options::=--force-confold \
    install mahara-apache2

# post package install - configure apache2 and shutdown daemon
ln -s /etc/apache2/conf.d/mahara /etc/mahara/apache.conf
sed -i 's/#Alias\ \/mahara/Alias/' /etc/apache2/conf.d/mahara
/etc/init.d/apache2 stop

only to be told that "role root does not exist". (Fatal). Any suggestions from the postgres wizards?


Jeremy's picture

Awesome work!

You guys are getting good at this! :)

Community Support was incredible

Thanks Jedmeister! Sure hope it works :)

Working with Postgres, we found ourselves in terra incognita. Although there was a helpful soul at #mahara, there wasn't much from #postgresql; #mahara was quiet for the most part. Ultimately, we couldn't have done this without the support of the gentlemen at #ampache. Chris Slamar, and then later ascheel and uncon were especially helpful in overcoming some of the hurdles. Once again, we have that tremendous community to sincerely thank.


Jeremy's picture

I have never played with PostgreSQL

So I have no idea about it at all really. In fact in all honesty I don't really know a lot about SQL full stop, although I have played a little with MySQL and have been recently forced (through work) to become a little aquainted with MS SQLserver (but that's a whole other story...).

Anyway I think it's a great idea offering up the 2 separate patches. I'm sure it would be an interesting exercies for the students to compare and contrast the 2 DB engines. Also it gives the devs options when it comes time to add them to the appliance range.

Liraz Siri's picture

Great documentation Rik!

Detailed documentation like this certainly makes our life easier when we get to evaluating this for part 2 of the upcoming release. I hadn't previously heard of Mahara (or even aware that ePortfolio was a software category) but I've been taking a look at their demo site just now and it seems to be an interesting concept. Sort of like a content management system geared at individuals.

How did you guys came across Mahara? What are you using it for? (just curious)

Thank you Liraz - plus more on Mahara

We have the Mahara appliance up and running in our vSphere world, but it hasn't been demonstrated to faculty or administration, for want of time and demo content. I see three use scenarios for Mahara in our institution:

  1. Transition Goals and Careers Class: Every student in our population has individual transition goals for making the leap to whatever post-secondary path they choose to take. Resume building, portfolio assembly, gathering letters of recommendation, keeping track of college and university applications and application essays are all part of the transition program. I've spoken to the two people most involved in transition programming, and they were quite postive about learning more regarding using Mahara's features to at the very least facilitate - quite possibly revolutionize how all of this can be systematically organized and executed. The resume-building feature is particularly helpful for our population, many of whom have difficulty organizing and sequencing text.
  2. Professional Development: I feel Mahara can be very helpful in the professional-development and faculty-assessment processes. It could supplement a rubric-based approach to take into account the kinds of things considered by promotion and tenure committees: community service, research and publications, continuing education, conference papers, etc. I haven't had the opportunity to discuss this with - first other faculty members and then, ultimately, administrators.
  3. Student portfolios: Every student in our population must have a portfolio that demonstrates growth across the curriculum for the entirety of their enrollement. Currently this is paper-based: representative work is collected by academic advisors from the content-area teachers, and then sequenced, organized, and inserted into a binder. Mahara's eportfolio features make adopting this technology a no-brainer.

Of course there's always restrictions to how much time can be dedicated by the faculty to adopting and then developing effective strategies for using new technology. And despite the boon its been, from my curriculum and student progress, to administrative tasks like IEP management, I sense some reticence about open-source technology - I definitely feel perceived as an open-source or free software evangelist. I use vSphere infrastructure, darn it. That should be all the evidence they need.

As for how we discovered Mahara, the credit goes to Alon. Alon brought Ubuntu's School Server in a Box initiative to my attention - Mahara is one of the technologies included in the blueprint [1]. Now that I've worked with Mahara, its role in schools, especially high schools, is clear to me.

[1] https://wiki.ubuntu.com/Education/EdubuntuServer


http://9while9.com

Hello, I am verys interested in giving the TKL Mahara install a try, but I am finding that http://9while9.com

is no longer available. Can any direct me to a current download location?

 

I am preparing to install Drupal, Moodle, Koha and Mahara for our school next year. The Mahara piece I am having difficulties with and could really use the help of TK!

Thanks for your help!

Jeremy's picture

You could install the patch

It's attached to the OP. Read the docs on how to apply a patch.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)