Update INSTALL.md

This commit is contained in:
Keith Woodlock
2013-05-07 14:55:25 +02:00
parent a76a268560
commit 6810906feb
+134 -2
View File
@@ -2,6 +2,28 @@
This file describes how to install mifos platform for use in a production or test environment.
## Release Artifact Structure
The release artifact (.zip file) has the following structure:
```
+ mifosplatform-X.Y.Z.RELEASE ... parent folder which will have the release number on it
|
+ api-docs ... folder contains html based documentation on the platform API for this release
+ database ... folder contains database setup and upgrade scripts required for installation
+ pentahoReports ... folder contains any out-of-the-box reports provided through pentaho
|
-- CHANGELOG.MD ... file documents changelog of project up to this release
-- CONTRIBUTORS.MD ... file provides details on contributors to project
-- INSTALL.MD ... file provides details on installation instructions
-- LICENSE.MD ... file provides details on the open source license used by the project
-- mifosng-provider.war ... the platform WAR file to be dropped into Tomcat 7
-- README.MD ... initial readme file for the project
-- VERSIONING.MD ... file provides details on approach to release versioning
```
## How to Install
The two ways to get up and running with mifos platform is:
1. Use Amazon AWS and mifosplatform public AMI to spin up a new instance in the cloud
@@ -69,8 +91,118 @@ Launch instance <a target="_blank" href="https://console.aws.amazon.com/ec2/home
### 2.3 Tomcat 7 Setup
### 2.4 Release Artifacts
Assumption: You have downloaded and installed Tomcat 7 correctly for your operation system: see http://tomcat.apache.org/tomcat-7.0-doc/setup.html
#### 2.3.1 Environment Variables Check
Check that the following environment variables exist:
- JAVA_HOME ... should point to directory where a 1.6 JDK or JRE is on machine
- CATALINA_HOME ... should point to a directory where a Tomcat 7 instance is installed
Check that the following is on your path:
- %JAVA_HOME%\bin;
#### 2.3.2 Logging
- In the [TOMCAT_HOME]/logs create a file called ```mifos-platform.log```
#### 2.3.3 Libraries
Ensure the following libraries are in the [TOMCAT_HOME]/lib folder
- tomcat-jdbc.jar
- mysql-connector-java-5.1.22 (You will need to download latest MySQL Connector/J Jar file from http://dev.mysql.com/downloads/connector/j/)
#### 2.3.4 Configure for SSL
Generate a new keystore using java keytool (if you havent already done this):
- Follow docs to create keystore.(http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html#Configuration)
- Update server.xml as in docs. (Ther server.xml configuration given in the configure tomcat 7 below is what is need.)
```sudo keytool -genkey -alias mifostom -keyalg RSA -keystore /home/ubuntu/.keystore```
#### 2.3.5 Update tomcat configuration files for SSL, compression and JNDI connection to MySql
```
<?xml version='1.0' encoding='utf-8'?>
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.JasperListener" />
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<GlobalNamingResources>
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml"
/>
<Resource type="javax.sql.DataSource"
name="jdbc/mifosplatform-tenants"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/mifosplatform-tenants"
username="root"
password="[root mysql 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>
<Service name="Catalina">
<Connector protocol="org.apache.coyote.http11.Http11Protocol"
port="8443" maxThreads="200" scheme="https"
secure="true" SSLEnabled="true"
keystoreFile="/home/ubuntu/.keystore"
keystorePass="testmifos"
clientAuth="false" sslProtocol="TLS"
URIEncoding="UTF-8"
compression="force"
compressableMimeType="text/html,text/xml,text/plain,text/javascript,text/css"/>
<Engine name="Catalina" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.LockOutRealm">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
</Realm>
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".log"
pattern="%h %l %u %t &quot;%r&quot; %s %b" />
</Host>
</Engine>
</Service>
</Server>
```
#### 2.3.6 Drop application into tomcat webapps folder
Drop the following from the release artifact into the [TOMCAT_HOME]/webapps folder:
- mifosng-provider.war
Drop the following from the release artifact into [TOMCAT_HOME]/webapps/ROOT folder:
- The entire IndividualLendingGeneralJavaScript folder
- The entire api-docs folder
#### 2.3.7 Startup tomcat
Startup tomcat:
- Platform application should be available @ https://[server ip address]:8443/mifosng-provider/api/v1/offices?tenantIdentifier=default&pretty=true
- Reference application should be available @ https://[server ip address]:8443/IndividualLendingGeneralJavaScript/IndivLendHome.html?baseApiUrl=https://[server ip address]:8443/mifosng-provider/api/v1/
- API docs should be available @ https://[server ip address]:8443/api-docs/apiLive.htm