Sei sulla pagina 1di 4

Installation notes for linux

=======================

1. Install bitronix transaction manager into your tomcat 7

- copy following libs into TOMCAT_HOME/lib

* btm-2.1.4.jar

* btm-tomcat55-lifecycle-2.1.4.jar

* h2-1.3.161.jar

* jta-1.1.jar

* slf4j-api-1.7.2.jar

* slf4j-jdk14-1.7.2.jar

* kie-tomcat-integration-6.5.0.Final.jar

* javax.security.jacc-api-1.5.jar

* geronimo-jta_1.1_spec-1.1.jar

2. Create configuration files inside TOMCAT_HOME/conf

* btm-config.properties

************************ sample btm-config.properties *************************

bitronix.tm.serverId=tomcat-btm-node0
bitronix.tm.journal.disk.logPart1Filename=../work/btm1.tlog
bitronix.tm.journal.disk.logPart2Filename=../work/btm2.tlog
bitronix.tm.resource.configuration=../conf/resources.properties

*******************************************************************************
* resources.properties

************************ sample resources.properties **************************

resource.ds1.className=bitronix.tm.resource.jdbc.lrc.LrcXADataSource
resource.ds1.uniqueName=jdbc/jbpm
resource.ds1.minPoolSize=10
resource.ds1.maxPoolSize=20
resource.ds1.driverProperties.driverClassName=org.h2.Driver
resource.ds1.driverProperties.url=jdbc:h2:file:~/DEV_TOOLS/tomcat/tomcat7/jbpm
resource.ds1.driverProperties.user=sa
resource.ds1.driverProperties.password=
resource.ds1.allowLocalTransactions=true
*******************************************************************************

NOTE: jdbc/jbpm is the JNDI name used by tomcat distribution of the application

3. Define system properties for btm.root, bitronix config file, JBoss logging provider and others.

Editor create setenv.sh file inside TOMCAT_HOME/bin and add following:

export CATALINA_OPTS="-Xmx512M -XX:MaxPermSize=512m -Dbtm.root=$CATALINA_HOME


-Dbitronix.tm.configuration=$CATALINA_HOME/conf/btm-config.properties
-Djbpm.tsr.jndi.lookup=java:comp/env/TransactionSynchronizationRegistry
-Djava.security.auth.login.config=$CATALINA_HOME/webapps/kdroolswb65/WEB-INF/classes/l
ogin.config -Dorg.jboss.logging.provider=jdk -Dorg.kie.demo=false
-Dorg.kie.example=false -Dorg.uberfire.nio.git.ssh.host=0.0.0.0"

NOTE: - -Dorg.uberfire.nio.git.ssh.host=0.0.0.0 is required to start git ssh at


0.0.0.0 default is localhost which will not work if you will try to clone to clone on
remote machine giving ip of linux workbench server.

NOTE: - -Dorg.kie.demo=false -Dorg.kie.example=false are required for linux systems to


stop workbench from cloning demo example repository not required if system is able to
connect demo github repository.

NOTE:- On Debian based systems $CATALINA_HOME needs to be replaced with $CATALINA_BASE.


($CATALINA_HOME defaults to /usr/share/tomcat7 and $CATALINA_BASE defaults to /var/lib/tomcat7/)

NOTE: this is an example for unix like systems for Windows $CATALINA_HOME needs to be replaced
with windows env variable or absolute path

NOTE: java.security.auth.login.config value includes name of the folder in which application is


deployed by default it assumes kie-drools-wb so ensure that matches real installation.

login.config file can be externalized as well meaning be placed outside of war file.
*******************************************************************************

4. Configure JEE security for kie-wb on tomcat (with default realm backed by tomcat-users.xml)

2a. Copy "kie-tomcat-integration" JAR into TOMCAT_HOME/lib (org.kie:kie-tomcat-integration)

2b. Copy "JACC" JAR into TOMCAT_HOME/lib (javax.security.jacc:artifactId=javax.security.jacc-api in


JBoss Maven Repository)

2c. Copy "slf4j-api" JAR into TOMCAT_HOME/lib (org.slf4j:artifactId=slf4j-api in JBoss Maven


Repository)

2d. Add valve configuration into TOMCAT_HOME/conf/server.xml inside Host element as last valve
definition:

<Valve className="org.kie.integration.tomcat.JACCValve" />

2e. Edit TOMCAT_HOME/conf/tomcat-users.xml to include roles and users, make sure there will be
'analyst' or 'admin' roles defined as it's required to be authorized to use kie-wb

Additional notes :

1. In tomcat.home/conf/context.xml, add this line

<Transaction factory="bitronix.tm.BitronixUserTransactionObjectFactory"/>


2. In tomcat.conf/conf/server.xml, add this line

<Listener className="bitronix.tm.integration.tomcat55.BTMLifecycleListener" />


3. Verify ports 8001 and 4918 are open these will be used by niogit

-------------------------------------------------client side

Add settings.xml in .m2 driectory

<?xml version="1.0" encoding="UTF-8"?>


<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">

<servers>
<server>
<id>guvnor-m2-repo</id>
<username>tomcat</username>
<password>tomcat</password>
<configuration>
<wagonProvider>httpclient</wagonProvider>
<httpConfiguration>
<all>
<usePreemptive>true</usePreemptive>
</all>
</httpConfiguration>
</configuration>
</server>
</servers>

</settings>

Potrebbero piacerti anche