Windows Install Guide
If you are interested in learning what the full deployment process is for a microfinance organization, see our Knowledge Center.
- 1 Steps to Build and Install Mifos
- 2 Download and Install the Required Software
- 2.5 Install Version Control Software: Git
- 2.6 Install Build Software: Maven
- 2.7 Install Eclipse
- 2.8 Install Firefox
- 3 Setup And Build
Building and Installing Mifos
Please see INSTALL in the code source repository for additional information on software pre-requisites and installation instructions. These notes are supplemental.
These instructions are designed for developers, but they may be clear enough for anyone to try setting up Mifos on a machine. A page is forthcoming that describes how to install Mifos without building from source code.
Building Mifos
Building Mifos requires that you get the source code and set up several additional programs.
You will need the following packages to build and install:
- Java 2 Standard Edition Development Kit (JDK) 6 version 1.6.0_18
- My SQL Version 5.1
- Tomcat 6
- Git 1.7.x or later
- Maven 2.0.9 or higher
- Eclipse JEE 3.5 or higher
Running Mifos
This page has instruction for installing and running Mifos based on the same tools used to build Mifos. If you just want to see Mifos working, try the Test Server or Demo Server.
Steps to Build and Install Mifos
If you wish to build Mifos from source code, follow these steps.
- Get the source code
- Download and install Java SDK
- Install version control software: Git
- Install web server and databse software: Tomcat and MySQL
- Set Up Environment Variables
- Build the Application
- Run the Application
Download and Install the Required Software
Install Java SDK
Get the Java SDK installed.
- Before you do install a Java SDK, check to see if you have any previous versions of Java installed and uninstall them (unless you need them for something else)–-either the JVM (Java Virtual Machine) or the JDK (Developers Kit).
- If you you have Java installed and you don’t need that particular version, it is recommended that you uninstall it via Start menu->Control Panel->Add/Remove Programs. (ex: I had to remove java 1.4.2.)
- Download the Java SE JDK installer (JDK 6.0).
- Keep in mind that newer release *could* cause changes, so be mindful if something is very new.
- Install the Java 2 Standard Edition Development Kit (JDK) 6.0 version 1.6.0_18.
- We recommend using all default options during the install.
Install Tomcat Application Server
Install MySQL
Download mySQL 5.1
- Download mySQL 5.1
- Run MySQL setup.exe (Typical Installation)
- Instance Configuration Wizard - Click Next> Detailed config select
- Click Next> keep the selection Developer Machine
- Click Next> Multifunctional DB
- Click Next> InnoDB Tablespace settings c: Installation Path
- Click DSS/OLAP
- Click Enable TCP/IP Networking Port # 3306, check Enable Strict Mode
- Click Best support for Multilingualism
- Set up your DB password.
- Grant permissions to user 'mifos' (doing these grants more than once has no effect). If you choose a different user name and password, adjust these instructions accordingly:
mysql> GRANT ALL on mifos.* to 'mifos'@'localhost' identified by 'mifos';
mysql> FLUSH PRIVILEGES; - Test database connection as user 'mifos'
> mysql -u mifos -pmifos mifos
* Make certain you note what you set for your admin user/password *
**If you need to go back and check or reconfigure these settings, use the MySQL Server Instance Config Wizard, accessible via the Start menu under MySQL Administrator 5.1.
Optional: Install MySQL GUI Tools
You may find the MySQL 5.1 GUI tools to be helpful.
Install Version Control Software: Git
Git is required for downloading Mifos source code.
Install Build Software: Maven
Maven is another tool used to build .war files from source and execute automated acceptance tests.
- This step is only necessary if you want to build Mifos from source code. Maven is not necessary to run Mifos.
- You can download Maven from apache.org. Install Maven 2.0.9 by unpacking/unzipping and copy to a directory. Additional maven installation instructions.
In a section below, you will be instructed on how to set up your Environment Variables.
Install Eclipse
Eclipse is the primary integrated development environment (IDE) we use for developing Mifos.
- Download and install the current Eclipse JEE Ganymede version http://www.eclipse.org/downloads/
- Install Eclipse plugins via Software Updates:
- Install Maven M2Eclipse Plugin (required) http://m2eclipse.sonatype.org/update/
- EGit - Git eclipse plugin http://www.eclipse.org/egit/
- Install TestNG Eclipse Plugin (optional) http://beust.com/eclipse
- Install Freemarker IDE plugin (via JBoss Tools download site) (optional) http://download.jboss.org/jbosstools/updates/stable
- Install the PMD plugin (optional) http://pmd.sourceforge.net/eclipse
- Install the FindBugs plugin (optional) http://findbugs.cs.umd.edu/eclipse/
Install Firefox
Firefox web browser is required for executing the automated acceptance tests. Firefox 3.0 or newer is supported for these Selenium tests.
- Download and install Firefox http://www.mozilla.com/firefox
Setup and Build
Add Required Environment Variables
These Windows environment variables must be set:
- JAVA_HOME should be set to your Java SDK directory (ex: C:\Program Files\Java\jdk1.6.0_10)
- CATALINA_HOME should be set to your Tomcat directory (ex: C:\Program Files\Apache Software Foundation\Tomcat 6.0)
- M2 should be set to your Maven bin directory, (ex: C:\Program Files\Apache Software Foundation\apache-maven-2.0.9\bin)
- M2_HOME should be set to your Maven install directory, (ex: C:\Program Files\Apache Software Foundation\apache-maven-2.0.9)
In addition, these options are recommended to be set as environment variables:
- CATALINA_OPTS should be set to "-Xms1024M -Xmx1024M -XX:MaxPermSize=256m"
- MAVEN_OPTS should be set to "-Xms512M -Xmx512M"
To Verify Path and Environment Variables
- Open a new command prompt
- run echo %Path% and make sure the path looks correct (including semi-colons). Notice that MySQL is also in the Path:
C:\Documents and Settings\auser>echo %Path%
output:
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\QuickT
me\QTSystem\;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\Java\
dk1.5.0_12\bin;C:\apache-maven-2.0.9\bin;c:\apache-tomcat-6.0.14\bin
c. run echo %[ENVIRONMENT VARIABLE]% for each environment variable and make certain each one is correct. e.g.:
C:\Documents and Settings\auser>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.6.0_10
Build the Application
The build process for Gazelle (Mifos trunk project) is transitioning from Ant to Maven. Maven will build and execute the acceptance tests, while ant tasks are still required to execute unit tests.
1) Prepare your database settings local.properties file
Defaults can be used for MySQL database connections. Different properties are used for main usage, acceptance testing, and integration testing. The default name and passwords can be found in the mainDatabase.properties, acceptanceDatabase.properties, and intergrationDatabase.properties files. To use different settings, create a local.properties file in directory {user.home}\.mifos in that contains the following lines, uncomment the appropriate lines, and enter the database name, user name, and password for the accounts you created when you set up the Mifos database:
# settings used at build time and by a running/deployed Mifos instance # (defaults are in mainDatabase.properties)
#main.database=mifos
#main.database.user=root
#main.database.password=mysql# settings used during acceptance tests
# (defaults are in acceptanceDatabase.properties)
#acceptance.database=mifos_gazelle_acceptance
#acceptance.database.user=root
#acceptance.database.password=mysql# settings used during integration tests # (defaults are in integrationDatabase.properties)
#integration.database=test
#integration.database.user=root
#integration.database.password=mysql
User home is typically the user profile directory location that gets created under "Documents and Settings" and matches the login name of the user. For example, "c:\Documents and Settings\jdoe\.mifos".
2) Get a local copy of the Mifos source code
3) Build Mifos using Maven
- Execute the following command to build the gazelle project from [local mifos Gazelle src directory]:
- mvn clean install
- Verify build is successful and all acceptance tests pass.
To run unit tests:
From the root Gazelle project directory , run mvn clean test
To run only acceptance tests:
From the [root Gazelle project directory]\acceptanceTest directory , run mvn integration-test
Note that is a database does not exist, a db will be created automatically during the startup.
More information about how to build Mifos:
- More about the Maven Build.
- More about Running Acceptance Tests.
Run the Application
Mifos can be run as a deployed web application by downloading the Mifos war file and following the INSTALL instructions.
The following instructions describe how to run the application in a development environment using a locally built mifos.war.
1) Verify MySQL Services Are Running
Start up MySQL server either using the MySQL System Tray utility or by following the instructions below.
- Go to Control Panel-->Administrative Tools-->Services
- Scroll to MySQL.
- If the service is not running, start it.
2) Configure the Tomcat Installation with mifos.war
- Stop tomcat if it is running.
- Copy mifos.war from ..mifos\dist into the Tomcat /webapps/ directory.
- Start tomcat which deploys mifos.war.
- Check that tomcat is running - go to http://localhost:8080/manager/html.
3) Connect to Mifos
In a browser open:
http://localhost:8080/mifos
Username: mifos
Password: testmifos
If you are able to log into Mifos, you have correctly installed the application. If you are not able to see the login page, you need to start troubleshooting.