Install Mifos on an Amazon EC2 instance

This will help you prepare an EC2 instance for Mifos. To install Mifos, refer to existing documentation.

Coming SOON

Publicly-available 32-bit and 64-bit AMIs with Mifos pre-installed you can just pick-up-and-go.

Choices made

  • Ubuntu 8.04 Server LTS (Hardy Heron), 64-bit (or 32-bit) version
  • AMIs (Amazon Machine Images) from alestic.com for the chosen operating system
  • Large (or small) EC2 instance

Before we begin

  • I used Internet Explorer 8. Turn off any popup blockers, else you'll miss the private key download Amazon sends you, and you can't go any further.
  • For 64-bit operating systems, Amazon has a choice of EC2 instances starting with large. Choosing a 32-bit version will also make small instances available
  • I used the Putty ssh client from Windows XP. Steps for using ssh and your private key to connect to your instance will likely differ on other platforms

Conventions

Fixed-width text below is assumed to be entered (or viewed) using a shell or command-line.

Please give feedback on any discrepancies or needed additions or corrections to the developer mailing list

Thanks

Shrikant B. got me started with this. Thanks!

TODOs

  • Add screenshots and more description
  • Improve the markup and add hyperlinked references to things such as 'installing Mifos'

Launch an EC2 instance with Ubuntu

Choose the EC2 tab on the Amazon AWS management console, click on 'Launch instances': the 'Launch Instance Wizard' comes up.

Choose An AMI

Choose the Community AMIs tab.

Enter the name for the AMI chosen ("ami-5346a73a" for 64-bit, "ami-e546a78c" for 32-bit)into the search textbox. This brings up a single choice: the AMI we need

Don't worry that the Platform says CentOS, click on "Select"

Create Key Pair

Create and download a key pair (or re-use one you already have). Assign a name to your .pem file and save it when prompted.

Configure Firewall

Assign a name and description to a basic firewall that only allows SSH access. This is in addition to the 'default' security group that is already present. You can change your firewall configuration later.

Launch

Choose the number of instances and launch. Click on 'View your instances on the Instances page'

Connect to your EC2 instance

Convert your private key file from .pem to .ppk format

Call up PuttyGen (the Putty Key Generator) to generate a private key in the .ppk format. Click on 'Load'and choose the .pem file you saved earlier. Choose a key comment and a passphrase. Save the private key in .ppk format

CAUTION! Be sure to use a strong passphrase, and don't leave the .pem and .ppk files lying around!

Use Putty to connect to your EC2 instance

Run Pageant and add the private key you saved earlier.

Bring up Putty, and connect to your EC2 instance using the Public DNS name for your instance (find this from the AWS management console).

When prompted, login as: root

Setup Ubuntu basics

You are in! Just a few more steps and your instance is ready for installing Mifos. Read on...

Update Ubuntu, install basics and pre-requisites

Execute the following:

apt-get update
apt-get upgrade

Install basics and pre-requisites

The following ensures you can answer confirmation prompts during software package installation using just text input :

dpkg-reconfigure debconf

For 'Interface to use', select Readline

Get unzip :

apt-get install unzip

Install and configure MySQL

apt-get install mysql-server mysql-client libmysqlclient15-dev

  • Choose a MySQL root password
  • Edit /etc/mysql/my.cnf and make choices for your configuration. At the very least, you need the fix for Mifos bug 1513
  • Restart MySQL and verify your changes were picked up
  • Create a database for Mifos and a MySQL user with privileges on it

Install Java

apt-get install sun-java6-jdk

32-bit Java is recommended for lower memory consumption. If you prefer this, use the following command instead:

apt-get install ia32-sun-java6-bin

  • Verify Java is installed
    which java; java -version
    

Create a user to run Mifos

adduser mifosusr

Get Mifos and pre-requisites

Login as the user to run mifos :

su mifosusr

  • Get Tomcat and Mifos (you may need a different URL for downloads)
    wget http://download.nextag.com/apache/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz
    wget http://downloads.sourceforge.net/project/mifos/mifos/1.3.0/mifos_v1.3.0-release.zip?use_mirror=biznetnetworks
    unzip mifos_v1.3.0-release.zip
    tar zxvf apache-tomcat-6.0.20.tar.gz
    

Install Mifos

Follow the existing documentation to get Mifos up and running

Open a firewall port to Mifos

(CAUTION! Do this once you've installed Mifos and are running it)

From the Amazon AWS management console, select security groups.

To the security group that allows SSH access (tcp on port 22), add another connection. If you changed the port for Mifos, change the port number below from 8080 to your choice

Connection Method: Custom

Protocol: TCP

From Port: 8080

To Port: 8080

Source (IP/Group): 0.0.0.0/0

And Save

Point your browser to http://<public DNS>:8080/mifos and you should see the Mifos login page.

Congratulations! You are ready to kick the tyres on your new Mifos on Amazon EC2...