InstallationGuide for Development

download InstallationGuide for Development

of 13

Transcript of InstallationGuide for Development

  • 7/28/2019 InstallationGuide for Development

    1/13

    ECOSOFT CO., LTD.

    BPM Hub ApplicationDevelopment Environment Installation Guide

    Submitted to BIOTECby

    Ecosoft Co., Ltd.

    This documentation will focus on explaining how to install all relevant software components

    necessary to building the BPM Hub Application within the scope of Development

    Environment.

  • 7/28/2019 InstallationGuide for Development

    2/13

    1 | P a g e

    Version History

    Version Date Editor Description of

    Change

    1.0 19/11/2012 Kitti U. Initial Document

    Overview

    This documentation will focus on explaining how to install all relevant software components

    necessary to building the BPM Hub Application within the scope of Development

    Environment.

    The BPM Hub application in this document is the first release (aka: Software Prototype) of

    BPM Hub application which will be released at the end of this project.

    This document will cover following 4 software installation stacks

    This document will guide you through the installation and basic configuration of each

    software component.

    1. Foundation StackIn other words, this stack consists of base software that will be act like run time

    environment of the system. It is the most basic foundation that all other software will be

    running on,

    1. JAVA JDK runtime environment for Activiti and Eclipse IDE

  • 7/28/2019 InstallationGuide for Development

    3/13

    2 | P a g e

    2. Apache ANT build script engine for JAVA based application. Will be used to buildActiviti on first use.

    3. XAMPP this one package consist of 3 important runtime components.a. Apache Tomcat runtime environment for web applicationb. MySQL database environment to be used in this projectc. PHP runtime environment for PHP based application like Yii framework

    Installing JAVA JDK

    Download JDK fromhttp://www.oracle.com/technetwork/java/javase/downloads/index.html

    Choose version jdk-6u32-windows-x64.exe After download is completed, simply install to path C:\Java\ Set System Variables for JAVA_HOME

    o Go to > System > Advanced System Setting > Environment Variables > SystemVariables

    o Set new System Variable, JAVA_HOME = C:\Java\jdk1.6.0_32

    For Path to System Variable, Path, adding - "%JAVA_HOME%\bin;" To test whether the java is properly installed, go to Command prompt and type

    o > javaversiono you should see current version, i.e., Java version 1.6.0_32

    Installing Apache Ant

    Download software http://ant.apache.org/bindownload.cgi

    http://www.oracle.com/technetwork/java/javase/downloads/index.htmlhttp://www.oracle.com/technetwork/java/javase/downloads/index.htmlhttp://ant.apache.org/bindownload.cgihttp://ant.apache.org/bindownload.cgihttp://www.oracle.com/technetwork/java/javase/downloads/index.html
  • 7/28/2019 InstallationGuide for Development

    4/13

    3 | P a g e

    Choose version apache-ant-1.8.4-bin.zip Step: Simply extract the zip file and place into C:\apache-ant-1.8.4 Set System Variable, ANT_HOME = C:\apache-ant-1.8.4 For Path variable, adding - "%ANT_HOME%\bin;" To test whether the ant is properly installed, go to Command prompt and type

    o > antversiono you should see current version, i.e., Apache Ant(TM) version 1.8.4

    Installing XAMPP

    Download XAMPP from http://www.apachefriends.org/en/xampp-windows.html Choose version, i.e., xampp-win32-1.8.1-VC9-installer.exe Simply install using wizard, but make sure that it is installed in C:\xampp Once installed, open XAMPP Control Panel

    Start the server, Apache and MySQL. By default, Apache will default to port 80 andMySQL to port 3306.

    Once started, you will see the PID and they will be labeled in green color. To test the Apache Tomcat go to,http://localhost/xampp To test the MySQL go to,http://localhost/phpmyadmin

    2. Framework Stack

    http://www.apachefriends.org/en/xampp-windows.htmlhttp://localhost/xampphttp://localhost/xampphttp://localhost/xampphttp://localhost/phpmyadminhttp://localhost/phpmyadminhttp://localhost/phpmyadminhttp://localhost/phpmyadminhttp://localhost/xampphttp://www.apachefriends.org/en/xampp-windows.html
  • 7/28/2019 InstallationGuide for Development

    5/13

    4 | P a g e

    As foundation stack is installed, we are now ready to setup our application. We can actually

    starting writing program in Java, PHP and using MySQL as database. But in this project, we

    will not build an application from scratch, but by the helping of Frameworks. This section

    will focus on installing necessary frameworks in order to build BPM Hub application.

    1. Yii Framework The PHP framework to help building web application with MVCpattern.

    2. Activiti BPM Engine The workflow engine that will be called by PHP webapplication, for task / queue business flow.

    3. Apache DS LDAP sever The LDAP server that will simulate the use of LDAP forauthentication (in final deliverable, we will replace this with NSTDA owned LDAP

    server).

    Installing Activiti BPM

    Download XAMPP fromhttp://activiti.org/download.html Choose version, i.e., activiti-5.10.zip Simply extract the zip file and place into c:\activiti-5.10 To build activiti for the first time, type following command,

    o > cd c:\activiti-5.10\setupo > ant demo.start

    This command will install "activiti-explorer" and "activiti-rest" and then start thetomcat server

    Note: At this point, activiti engine will be running on its own Tomcat and atemporary database called H2. We will change them to our XAMPP instance later in

    this document.

    To test Access Activiti Explorer by go to http://localhost:8080/activiti-explorer Test login using --> user: kermit, pass: kermit

    http://activiti.org/download.htmlhttp://activiti.org/download.htmlhttp://activiti.org/download.htmlhttp://localhost:8080/activiti-explorerhttp://localhost:8080/activiti-explorerhttp://activiti.org/download.html
  • 7/28/2019 InstallationGuide for Development

    6/13

    5 | P a g e

    Installing ApacheDS (LDAP Server)

    Download ApacheDS fromhttp://directory.apache.org/apacheds/2.0/download/download-windows.html

    Choose version, i.e., Software: apacheds-2.0.0-M8.exe Simply install using wizard This will install server as service, you can check that it is running as "Apache DS -

    default" in windows' Service.

    As of now, we have setup LDAP Server. In previous step, you notice that we have user login

    kermit as example user in the system. We now want to move those users into LDAP Server

    instead, so that future authentication will be done against LDAP instead of against a

    database.

    In the following step, we want to install optional ApacheDS Studio, so that we have way to

    communicate with our LDAP server, and to create new groups and users there.

    Installing ApacheDS Studio (IDE)

    Download ApacheDS Studio fromhttp://directory.apache.org/studio/2.0/download/ Depend on your client machine, choose to download your package, i.e., for windows:

    ApacheDirectoryStudio-win32-x86_64-2.0.0.v20120224.exe

    Simply install using wizard. To connect to the DS Server, do the following

    http://directory.apache.org/apacheds/2.0/download/download-windows.htmlhttp://directory.apache.org/apacheds/2.0/download/download-windows.htmlhttp://directory.apache.org/studio/2.0/download/http://directory.apache.org/studio/2.0/download/http://directory.apache.org/studio/2.0/download/http://mirrors.issp.co.th/apache/directory/studio/stable/2.0.0.v20120224/ApacheDirectoryStudio-win32-x86_64-2.0.0.v20120224.exehttp://mirrors.issp.co.th/apache/directory/studio/stable/2.0.0.v20120224/ApacheDirectoryStudio-win32-x86_64-2.0.0.v20120224.exehttp://directory.apache.org/studio/2.0/download/http://directory.apache.org/apacheds/2.0/download/download-windows.html
  • 7/28/2019 InstallationGuide for Development

    7/13

    6 | P a g e

    o Open ApacheDS Studio, and create new connection using default setting,excepts

    o Connection name: LocalLDAPo Port: 10389o Hostname: localhosto Bind DN or user: uid=admin,ou=systemo Bind password: secret

    We are now connected to our ApacheDS server.

    Using the ApacheDS Studio to create example groups/users as following,o management

    kermit

    fozzieo manager

    kermito sales

    fozzie Note: all user's password is "password"

    InstallingYii Framework

    Here comes the most important component for our application, the Yii Framework. This is

    the framework that we will be programming most, the rest are mostly services to be called.

  • 7/28/2019 InstallationGuide for Development

    8/13

    7 | P a g e

    The framework are nothing than the prebuilt PHP libraries and PHP pages, packaged to be

    used to build MVC styled web application.

    Installation of Yii mainly involves easy steps:

    Download Yii Framework fromhttp://www.yiiframework.com Choose version, i.e., yii-1.1.12.b600af.tar.gz Just Simply unzip the file as yii-1.1.12.b600af.tar.gz, rename it to "yii" and move it to

    Web Accessible folder, i.e., C:\xampp\htdoc\yii

    Any application will refer to this "yii" framework from its /bpmhub/index.php

    http://www.yiiframework.com/http://www.yiiframework.com/http://www.yiiframework.com/http://www.yiiframework.com/
  • 7/28/2019 InstallationGuide for Development

    9/13

    8 | P a g e

    3. Development StackIn this stack we will be installing the development tools to be used within this project.

    Although come from different technology, all of them are using Eclipse as development

    environment. So, we will be installing eclipse first, then install required plugins.

    Download Eclipse fromhttp://www.eclipse.org/downloads/ Choose Eclipse IDE for Java Developer with latest version, i.e., eclipse-java-juno-SR1-

    win32-x86_64.zip

    To install, simply extract the zip file and place it to C:\eclipse To start program, double click on eclipse.exe, the program will start. Select a workspace or create new once, i.e., C:\eclipse\workspace

    Next steps are to installed the required plugins. Install Activiti Designer component

    o From menu, go to Help -> Install New Software.o In the following panel, click on Add button and fill in the following fields:o Name: Activiti BPMN 2.0 designero Location:http://activiti.org/designer/update/o Make sure the "Contact all updates sites.." checkbox is checked, because all

    the necessary plugins will then be downloaded by Eclipse.

    o Click Next button, and accept the license to install.

    http://www.eclipse.org/downloads/http://www.eclipse.org/downloads/http://www.eclipse.org/downloads/http://activiti.org/designer/update/http://activiti.org/designer/update/http://activiti.org/designer/update/http://activiti.org/designer/update/http://www.eclipse.org/downloads/
  • 7/28/2019 InstallationGuide for Development

    10/13

    9 | P a g e

    Install PHP componento Open Help -> Install New Software.o Select the Indigo update site.o When the list of existing features is populated - select 'PHP Development

    Tools'.

    o Make sure 'Contact all update sites...' is checked.o Note: http://wiki.eclipse.org/PDT/Installation#Eclipse_3.7_.2F_Indigo_.2F_P

    DT_3.0

    Install Mercurial HG component (for Source Code Repository)o Note: We need this component because after this, we will download our

    BPM Hub Project from repository

    o Go to Help -> Install New Software. In the following panel, click on Addbutton and fill in the following fields:

    o Name: Mercurial HGo Location: HG - http://cbes.javaforge.com/updateo When install, select MercurialEclipse and all sub-components.o Click Next button, and accept the license to install.

    4. Application Stack

    http://wiki.eclipse.org/PDT/Installation#Eclipse_3.7_.2F_Indigo_.2F_PDT_3.0http://wiki.eclipse.org/PDT/Installation#Eclipse_3.7_.2F_Indigo_.2F_PDT_3.0http://cbes.javaforge.com/updatehttp://cbes.javaforge.com/updatehttp://wiki.eclipse.org/PDT/Installation#Eclipse_3.7_.2F_Indigo_.2F_PDT_3.0http://wiki.eclipse.org/PDT/Installation#Eclipse_3.7_.2F_Indigo_.2F_PDT_3.0
  • 7/28/2019 InstallationGuide for Development

    11/13

    10 | P a g e

    In this step, we will be deploying the version 1 of BPM Hub application. The step here will be

    a little bit more confused comparing to the previous components. All the code and libraries

    being deployed will not be explained yet as the intention of this document is merely to

    make the demo application working on the newly setup environment.

    Installing BPM Hub Application (version 1)

    There are 2 projects that will consist of bpmhub. The main one is bpmhub (Yii/PHP).The second one, which is the bpmhub_activiti (Activiti/Java).

    Setup 2 Eclipse project for Development Clone 2 projects,

    o Yii's bpmhub --> hgclonehttp://[email protected]/kittiu/bpmhub(clone toC:\xampp\htdoc\bpmhub, as it needs to run in Apache)

    o Acitviti's bpmhub_activiti --> hgclonehttp://[email protected]/kittiu/bpmhub_activiti(clone to currentworkspace)

    Enable LDAP Support

    By default, our software component, i.e., Activit and Yii do not yet support LDAP. This

    section, we will enable the support for LDAP.

    LDAP Support for Activiti Provide necessary JARs for Activiti to support LDAP authentication via REST call, From Eclipse's bpmhub_activiti project, copy all jars from "lib" folder,

    o commons-collections-3.2.1.jaro customldap.jaro ldap-client-api-0.1.jaro mina-core-2.0.0-RC1.jaro shared-asn1-0.9.18.jaro shared-cursor-0.9.18.jar

    http://[email protected]/kittiu/bpmhubhttp://[email protected]/kittiu/bpmhubhttp://[email protected]/kittiu/bpmhubhttp://[email protected]/kittiu/bpmhub_activitihttp://[email protected]/kittiu/bpmhub_activitihttp://[email protected]/kittiu/bpmhub_activitihttp://[email protected]/kittiu/bpmhub_activitihttp://[email protected]/kittiu/bpmhub
  • 7/28/2019 InstallationGuide for Development

    12/13

    11 | P a g e

    o shared-i18n-0.9.18.jaro shared-ldap-constants-0.9.18.jaro shared-ldap-schema-0.9.18.jaro shared-ldap-schema-loader-0.9.18.jaro shared-ldap-schema-manager-0.9.18.jaro shared-ldif-0.9.18.jaro shared-i18n-0.9.18.jar

    Copy these jars into lib folder of Activit REST application C:\activiti-5.10\apps\apache-tomcat-6.0.32\webapps\activiti-rest\WEB-INF\lib

    Configure application-context.xml, so that this application (activiti-rest) will beusing the new LDAP Authentication. Please note the LDAP part of this file asfollowing,

    ........

    .......

    Restart Activiti Server. Now, Activiti should understand LDAP authenticationnder LDAP Support for Activiti Edit file C:\xampp\php\php.ini Comment out line --> extension=php_ldap.dll In case of error about libsasl.dll, copy this file from C:\xampp\php\ and place to

    C:\windows\system

    Restart Apache

  • 7/28/2019 InstallationGuide for Development

    13/13

    12 | P a g e

    Enable REST Support for PHP

    Edit file C:\xampp\php\php.ini Comment out line --> extension=php_curl.dll Restart Apache

    ENDS.