Skip to content

Ubuntu Dev

Socheat KHAUV edited this page May 20, 2020 · 10 revisions

Welcome to the FinTech wiki!

Apache Fineract Installation for Development

Apache ActiveMQ

:/>wget http://www-us.apache.org/dist//activemq/5.15.3/apache-activemq-5.15.3-bin.tar.gz
:/>tar -zxvf apache-activemq-5.15.3-bin.tar.gz
:/>mv apache-activemq-5.15.3 /opt/activemq-5.15.3
:/>cd /opt/activemq-5.15.3
:/>./bin/activemq console

Docker MySQL

:/>mkdir -p /opt/docker/mysql
:/>docker run --name mysql -v /opt/docker/mysql:/var/lib/mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -d mysql:5.5
:/>sudo apt-get install mysql-client

MySQL Configuration

:/>sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
[mysqld]
sql_mode = ''

:/>sudo nano /etc/mysql/conf.d/mysql.cnf
[mysql]
protocol=tcp

Apache Tomcat Configuration

:/>wget http://www-us.apache.org/dist/tomcat/tomcat-9/v9.0.7/bin/apache-tomcat-9.0.7.tar.gz
:/>tar -zxvf apache-tomcat-9.0.7.tar.gz
:/>mv apache-tomcat-9.0.7 /opt/tomcat-9.0.7
:/>cd /opt/tomcat-9.0.7
:/>nano conf/server.xml
<GlobalNamingResources>
     <Resource type="javax.sql.DataSource"
               name="jdbc/mifosplatform-tenants"
               factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
               driverClassName="org.drizzle.jdbc.DrizzleDriver"
               url="jdbc:mysql:thin://localhost:3306/mifosplatform-tenants"
               username="root"
               password="password"
               initialSize="3"
               maxActive="10"
               maxIdle="6"
               minIdle="3"
               validationQuery="SELECT 1"
               testOnBorrow="true"
               testOnReturn="true"
               testWhileIdle="true"
               timeBetweenEvictionRunsMillis="30000"
               minEvictableIdleTimeMillis="60000"
               logAbandoned="true"
               suspectTimeout="60" />
</GlobalNamingResources>
:/>wget -O lib/drizzle-jdbc-1.4.jar https://repo1.maven.org/maven2/org/drizzle/jdbc/drizzle-jdbc/1.4/drizzle-jdbc-1.4.jar

Compile Apache Fineract

:/>git clone https://github.com/apache/fineract.git
:/>cd fineract

Update Tenants (default)

:/>nano fineract-provider/src/main/resources/sql/migrations/list_db/V1__mifos-platform-shared-tenants.sql
-- Add to the last line
update tenant_server_connections set schema_server = 'localhost', schema_username = 'root', schema_password = 'password';

MySQL Create Default Tenants DB

:/>mysql -u root -pmysql
mysql>create database `mifostenant-default`;
mysql>create database `mifosplatform-tenants`;

Gradle Build

:/>nano fineract-provider/build.gradle
# Replace
mifostenant-default to mifostenant_default

ActiveMQ Connection

:/>nano fineract-provider/src/main/java/org/apache/fineract/notification/config/MessagingConfiguration.java

Packaging war file

:/>./gradlew war
:/>cp build/libs/fineract-provider.war /opt/tomcat-9.0.7/webapps

Compile Community App

:/>sudo apt-get install nodejs npm
:/>git clone https://github.com/openMF/community-app.git
:/>cd community-app
:/>gradle war
:/>cp build/libs/community-app.war /opt/tomcat-9.0.7/webapps

Start Tomcat

:/>cd /opt/tomcat-9.0.7
:/>bin/catalina.sh run

Should Be Good GO

https://localhost:8443/community-app/app/?baseApiUrl=https://localhost:8443&tenantIdentifier=default

Clone this wiki locally