Installation of Mifos X through github

Prerequisite Software's   

 Note:- Below are mandatory prerequisite softwares with mentioned versions only

  • JAVA DEVELOPMENT KIT >> VERSION 1.8.0_65 & above                                
  • MYSQL SERVER >> Version 5.5 or 5.6
  • GITHUB 

On this page:

  • Install Java 

1) Before beginning, uninstall any existing versions of Java currently on your computer. 

2) In your web browser, go to http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html, to download JAVA 1.8.

3) Oracle requires that you read the license agreement, then click the button labeled Accept License Agreement.

4) Click the link to download with respect to you system architect i.e Windows x86 for 32bit or Windows x64 for 64bit. 

5) Save the Java installation file to your computer

6) Run & install the Java file.

  • Install MySQL  

 

1) In your web browser, go to http://dev.mysql.com/downloads/mysql/5.5.html#downloads.To download MYSQL server 5.5v.

Click on download button with respect to your system architect i.e Windows x86 for 32bit or Windows x64 for 64bit.

2) You can skip this option by clicking the link at the bottom of the page that says "No thanks, just start my download".  

Click on Save file to your system.

                                                                                                                                

 3) Run the MySQL installation file. Click on Typical button and click on Next button. 

 

4) During MySQL installation, use Advanced Configuration > Show Advanced Options and set the MySQL ROOT Password to mysql. Then click on Save button.So your username will be root and password will be mysql. 

  • Create Environment Variables 

1) Open your Environment Variables:
Start Menu > Control Panel > System and Security > System > Advanced System Settings >Environment Variables.

2) Create JAVA_HOME variable:
  • Click on the New button, under the User Variables section.
  • For Variable Name, enter JAVA_HOME
  • For Variable Value,Provide the Java path for example:-C:\Program Files\Java\jdk1.8.0_66
    NOTE: 
    i - If you are running 32-bit Windows, then the path would be ex:- C:\Program Files (x86)\Java\jdk1.8.0_66
    ii - Java jdk path "jdk1.8.0_66" will be with respect to the installed version and it may not be the same as mentioned in the above example.  
  • Click the OK button.
3) Edit PATH variable:
  • In the System Variables section, scroll down to and select the Path variable.
  • Click the Edit button just below.
  • Click your mouse cursor into Variable Value box. 
    Using your keyboard's right-arrow or End key, move all the way to the far right of the current text in Variable Value.
  • Add the following text onto the end of the existing Variable Value text: 
    - For Java path example:- ;C:\Program Files\Java\jdk1.8.0_66\bin 
    - For Mysql server path example:- ;C:\Program Files\MySQL\MySQL Server 5.5\bin

    NOTE: 
    i - There must be exactly one semi-colon between whatever is already in your PATH variable, and the new C:\Program Files\Java\jdk1.8.0_66\bin – don't add a semi-colon if your previous PATH already ended with a semi-colon.
    ii - Java jdk path "jdk1.8.0_66" will be with respect to the installed version and it may not be the same as mentioned in the above example. 

  • Click the OK button  

4) Create JAVA_OPTS variable: 

  • a. Click the New... button again, under the User Variables section.
  • b. For Variable Name, enter JAVA_OPTS
  • c. For Variable Value, example -Xms512m -Xmx1024m 
    Note: Variable value example can be changed with respect to the system memory size for example: -Xms512m -Xmx1024m 

  • Download Fineract-platform

1) Create new directory ex: fineract 



2) Open git bash, through git bash  

>> Go inside the created folder(ex-fineract) then execute, this will download platform code:-   

git clone https://github.com/apache/incubator-fineract.git


Wait for download completion and move to next step once it's done.

3) Go to, incubator-fineract>>fineract-provider

then execute below command

gradle clean dist

 once successful move to next step

 4) Go to incubator-fineract\fineract-provider\build\distributions>>then unzip fineract-platform

  • Initialize MySQL data 

1) Download HEIDISQL from:- http://www.heidisql.com/download.php and save the installation file to your computer.

2) Run the Heidisql installation file & setup Heidisql: 

i) For local - Provide mysql password as mysql

ii) Click on Save button.

iii) Click on open button. 

                                                                                                                           

4) Copy the following database command and paste it into the large white box titled Query 
create database `mifosplatform-tenants`; create database `mifostenant-default`; use `mifosplatform-tenants`;



5) Click on Run button to Execute the query. . 

 

6) On heidisql, click on File>>Load SQL file..

7) Through Load SQL file window,

  • Navigate to the location where you extracted the Mifos application files.
  • Navigate to the database folder, inside that location. (Ex:- fineract>>incubator-fineract>>fineract-db)
  • Select the file mifospltaform-tenants-first-time-install.sql and click Open.

Run the first-time-install script, by clicking Run Query button and once it's successful close heidisql application.

  • Download community-app

1) Open git bash, through git bash  

>> Go inside the created folder(ex-fineract) then execute, this will download community-app:-   

git clone https://github.com/openMF/community-app.git

Wait for download completion and move to next step once it's done.

2) Go inside the created community-app folder then execute

npm install -g bower

 

bower install

npm install

grunt serve


3) Open new git bash, then go inside the folder and execute "fineract>>incubator-fineract>>fineract-provider"
    gradle clean tomcatRunwar

  • Start community-app

Once the server gets started, you could access it from Mozilla firefox - internet browser: 
2) Go to fineract folder >>community-app>>app>>and open index.html, this will run in your internet browser. 
ex:- file:///F:/fineract/community-app/app/index.html
3) Now extend below mentioned url infront of index.html line as mentioned below:- 
ex:- file:///F:/fineract/community-app/app/index.html?baseApiUrl=https://localhost:8443/fineract-provider/api/v1?tenantIdentifier=default#/home
And for other internet browser apart from firefox, you should run grunt server to access i.e:- 
Through git bash, go to fineract>>community-app
grunt serve 
This will open:- 
replace baseApiUrl like shown below: 
For second & future run:-  
Go to fineract>>incubator-fineract
To know the updates done in the latest code:- 
git fetch origin
To get the latest code into your system:- 
git rebase origin/develop 

Then, start server:- 
Go to fineract>>incubator-fineract>>fineract-provider, then execute through gitbash
gradlew clean tomcatRunwar 

Key Error Messages


Below mentioned commands are shown with examples only. 

Create new branch - test1 

git branch test1(new branch name) origin/develop 

Switching to different branch - test2
git checkout test2 
Create branch - test3 and switch to new branch -test3
git checkout -b test3 origin/develop 
To know which branch
git status
To know the information of latest branch 
git fetch upstream/develop 
To download latest code 
git rebase upstream/develop 
To delete the branch
git branch -d test1 
To see the branches available
git branch
Note - 
1) upstream or origin is called as remote, 
2) While creating branch if nothing is specified then it will create as origin. 
3) develop or master are called as branches.