...
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.
This guide:
- is written for Ubuntu 10.04 for the 32-bit x86 architecture, but may work on other versions
- attempts to call out steps required for different versions of Ubuntu
- applies to the current Mifos development code in the version control system in "trunk"
...
- 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
- If you see the
Package sun-java6-jdk has no installation candidate
error, add the following to your/etc/apt/sources.list
file:
deb
http://us.archive.ubuntu.com/ubuntu/
hardy multiverse
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 8 {{"
in the Connector definition.
...
- 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.
- Your JAVA_HOME path may be different than the one listed in the Maven installation instructions e.g. instead of
/usr/java/jdk1.5.0_02
it may be inuser/lib/jvm
Set up the database
OPTIONAL: create a file named mifos.cnf
in /etc/mysql/conf.d/
and put in it:
...
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 the database connection as user 'mifos' with:
No Format mysql -u mifos -pmifos mifos ...repeat for other databases
Get the source
This page shows you how.
Note:
- You can skip the Git install step, as this was installed at the start of this tutorial.
- The root of the working copy should be
$HOME/mifostrunk
which you can do with the following command:
git clone git://github.com/mifos/head.git mifostrunk
Create production tables
See "Initializing the Mifos Database" in $HOME/mifostrunk/INSTALL
, with one exception: the SQL files in your working copy are in /db/src/main/resources/sql/, not /db/sql/. INSTALL is really for war-only installs (not developers).
...