SamePage Linux (RHL) Installation for JBoss-4.0.3SP1

1. Download JBoss from below mentioned link:

2. Select jboss-4.0.3SP1.tar.gzto download.

3. Extract the zip file to <jboss_install_dir> (e.g. /data/jboss/jboss-4.0.3SP1/)

4. Unzip SamepageForJBoss.zip to a directory <jboss_install_dir>/server/default/data/ocwiki

(It is the <SamePage_home> directory)

5. Copy license file to <SamePage_home>/license (Request the licensefrom us if you do not have it already.)

6. Before proceeding further you should setup the SamePage schema in an Oracle database. The steps are given at:

For Oracle:

7. Copy the database specific driver (classes12.jar for Oracle) to

<jboss_install_dir>/server/default/lib

8. Configure database specific datasource:

(a)Copy oracle-ds.xml from <jboss_install_dir>/docs/examples/jca to <jboss_install_dir>/ server/default/deploy

Modify oracle-ds.xml file as under:

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

<datasources>

<local-tx-datasource>

<jndi-name>CMPOOL</jndi-name>

<connection-url>jdbc:oracle:thin:@localhost:1521:XE</connection-url>

<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>

<user-name>samepage</user-name>

<password>samepage</password>

<min-pool-size>5</min-pool-size>

<max-pool-size>15</max-pool-size>

<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>

<metadata>

<type-mapping>Oracle9i</type-mapping>

</metadata>

</local-tx-datasource>

</datasources>

(b)Modify the standardjbosscmp-jdbc.xml present in <jboss_install_dir>/server/default/conf

Edit <datasource> tag with entry like:

<jbosscmp-jdbc>

<defaults>

<datasource>java:/CMPOOL</datasource>

<datasource-mapping>Oracle9i</datasource-mapping>

……

……

(c)Following environment variables should be present or you can set them at the command prompt as shown below (Replace <SamePage_home>,<jdk_install_dir>)

JAVA_HOME=<jdk_install_dir> (JDK should be 1.5)

export JAVA_HOME

JBOSS_HOME=<jboss_install_dir>

export JBOSS_HOME

LD_LIBRARY_PATH=/lib:<SamePage_home>/bin/cvs/linux:<SamePage_home>/bin/license/linux:$LD_LIBRARY_PATH

export LD_LIBRARY_PATH

PATH=<SamePage_home>/bin/cvs/linux: <SamePage_home>/bin/license/linux:<jdk_install_dir>/bin:<jdk_install_dir>/lib:$PATH

export PATH

(d) Edit run.sh file present in <jboss_install_dir>/bin

Add following entries at the java executable section:

# Execute the JVM

"$JAVA" $JAVA_OPTS \

-Djava.io.tmpdir=$JBOSS_HOME/server/default/data/ocwiki/temp \

-Djava.library.path=$JBOSS_HOME/server/default/data/ocwiki/bin/license/linux \

-Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \

-Dnet.etouch.wiki.appcontext=ocwiki \

-Dnet.etouch.license=<SamePage_home>/license/license.etouch \

-Dnet.etouch.utils.pooldatasourcename=java:/CMPOOL \

-Dfile.encoding=UTF-8 \

-classpath "$JBOSS_CLASSPATH:<SamePage_home>:<SamePage_home>/lang:<SamePage_home>/custom_theme" \

org.jboss.Main "$@"

Give the execute permissions to following files:

chmod +x <SamePage_home>/db/*.sh

chmod +x <SamePage_home>/bin/license/linux/liblicense.so
chmod +x <SamePage_home>/bin/license/linux/libsamepagelicense.so

chmod +x <SamePage_home>/bin/cvs/linux/cvs

Setting up the SamePage database schema for Oracle

1.Before proceeding you should have an oracle database server access (username/password) with dba permission.

2.Position yourself in <SamePage_home>/db

3.In this folder find a file named db.xml and open that in your favorite text editor.

a.Find the entry url="jdbc:oracle:thin:@<database_host_ip>:1521:<oracle db instance id>". Replace the :@<database_host_ip> with your oracle database host IP and <oracle db instance id> with the database intstance id.

b.Find user="username" password="password". Replace the user and password with oracle database username and password.

c.Find databasename="<oracle db instance id>" and replace <oracle db instance id> with the database instance id.

4.Go to <SamePage_home>/db directory and execute run.sh

5.It will prompt for the locale input. Type en_us and press enter

6.Note: if you want to drop the existing schema you can run rundrop.sh

7.Once the database creation is over, from the current folder (<SamePage_home>/db) open update_props.sql in your favorite editor.

Replace following place holders and save the file:

1. <ip address of the machine where server is running>

2. <port on the machine where server is running>

[If the port number is different than 8080 then make the corresponding entry in <jboss_install_dir>/server/default/deploy/jbossweb-tomcat55.sar/server.xml at line <Connector port="8080" address="${jboss.bind.address}" ……….]

3. <SamePage_home>

4. <email id of the SamePage Administrator>

5. <your mail server name/ip>

8.Run this update_props.sql on the database. (e.g. using sqlplus:

sqlplus user/pwd@<db machine name> @update_props.sql) or if sqlplus is not present on the m/c then run it from a windows m/c where sqlplus is present and make sure the modified update_props.sql is present in the same directory from where you are running sqlplus

9. Move the EAR file (ocwiki.ear) present in <SamePage_home> directory to:

<jboss_install_dir>/server/default/deploy

10. For multilingual text you need to add the following property to server.xml located at:

<jboss_install_dir>/server/default/deploy/jbossweb-tomcat55.sar

Add the highlighted property for all the <Connector> tags in server.xml

Snippet:

<Connector port="8085" URIEncoding="UTF-8" address="${jboss.bind.address}"

maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"

emptySessionPath="true"

enableLookups="false" redirectPort="8443" acceptCount="100"

connectionTimeout="20000" disableUploadTimeout="true"/>

11. Clear the contents of work folder (as applicable)

12. Go to command prompt <jboss_install_dir>/bin and type run.sh and press <Enter>

(give chmod +x *.sh before executing the above command)

13. Access the URL: (username: system, password: password)

14. Please update following properties also:

Go to System Administration->System Parameters

1)net.etouch.cm.path.fileLocation=/ocwiki/uploadedimages/

2)net.etouch.cm.path.imageLocation=/ocwiki/uploadedimages/

3)net.etouch.wiki.multilingualpdf=true

4)net.etouch.wiki.helpurl=/ocwiki/help/home/WYSIWYG%20Editor%20Help.html

5)net.etouch.wiki.font==<SamePage_home>/arialuni.ttf

6)net.etouch.cm.contextroot=ocwiki

7)net.etouch.cm.sso.provider=net.etouch.contmgmt.common.GESSOProvider

8)net.etouch.sso.header.attrib=sm_email

9)net.etouch.cm.ssoenabled=true

10) net.etouch.scheduler.project=/ocwiki

11)net.etouch.wiki.installdir=<SamePage_home>