Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Some formatting changes, expanded on some sections with helpful tips. No major amendments to page's advice.
Table of Contents
outlinetrue

...

Introduction

This is an abbreviated guide for Ubuntu-based developers who want to build Mifos from source. See Ubuntu WAR Install if you wish to install Mifos using a pre-built war file instead.

...

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

...

Install Ubuntu

Download and install.

Install prerequisites

Java-6 JDK

...

No Format
sudo apt-get install sun-java6-jdk git-core mysql-server

Notes:

  • running Running this command more than once has no effect
  • If you want to list which Java versions are already installed, execute the following:
    sudo update-java-alternatives -l
  • You can make sun-java6-jdk the default for your applications by executing the following:
    sudo update-java-alternatives -s java-6-sun

Jetty 7

  • Mifos currently requires Jetty 7.

...

  • 3.x - download the relevant Jetty tarball from http://download.eclipse.org/jetty/ and unpack it. 
  • In the instructions that follow, we'll assume you unpacked Jetty to $HOME/jetty7. If you've put it somewhere else, adjust accordingly.
  • If using extended characters, be sure server configuration includes URIEncoding="}}UTF-

...

  • 8  {{" in the Connector definition.

Maven

  • Download Maven and install following

...

  • the binary instructions. The version of Maven we currently recommend is found on Developer Setup.
  • The "mvn" command must be on your path.

...

  • You can verify that it is correctly installed by executing the following:
    mvn --version

Notes:

  • If you run into 'java.lang.OutOfMemoryError: Java heap space' during mvn's e.g. javac invocation, an "export MAVEN_OPTS=-Xmx512m" helps, best appended to your ~/.profile file.

Set up the database

OPTIONAL: create a file named mifos.cnf in /etc/mysql/conf.d/ and put in it:

...

Restart the database for the new settings to take effect .with:

No Format
sudo service mysql restart

Then

...

create mifos and mifostest databases

...

with:

  • No Format
    ~$ mysql -u root -p
    mysql> CREATE DATABASE mifos;
    mysql> CREATE DATABASE mifostest;
    mysql> show databases;
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    | mifos              |
    | mifostest          |
    | mysql              |
    +--------------------+
    
  • Grant permissions to user 'mifos' (doing these grants more than once has no effect). If you want to choose a different user name and password, adjust these instructions accordingly:
    No Format
    mysql> GRANT ALL on mifos.* to 'mifos'@'localhost' identified by 'mifos';
    mysql> GRANT ALL on mifostest.* to 'mifos'@'localhost' identified by 'mifos';
    mysql> FLUSH PRIVILEGES;
    
  • test Test the database connection as user 'mifos' with:
    No Format
    mysql -u mifos -pmifos mifos
    ...repeat for other databases
    

...

Use 32-bit Java. While Using a 64-bit Java VM appears to increase Mifos memory requirements. On Ubuntu, a 32-bit Sun JRE is pre-built (the ia32-sun-java6-bin package), and a JDK can be built if needed.

Memory errors?

If you've correctly set your environment variables for Maven (MAVEN_OPTS) and Java (JAVA_OPTIONS), as above, but you're still seeing memory issues when using Mifos, you may need to increase the size of your swap file / partition.

What

...

next?

Install some Development Tools and start fixing some bugs!