Menu

Installation guide

Pablo

This guide explains how to install OpenMDMS on a Debian based system.

Install JDK 1.5

First you will have to install JDK 1.5. You can download it from here:
http://www.oracle.com/technetwork/java/javase/downloads/index-jdk5-jsp-142662.html

You will download a .bin file, then you have to ensure that execute permissions are set by running this command:

chmod +x jdk-1_5_0_<version>-linux-i586.bin</version>

Then change directory to the location where you would like the files to be installed, typically /usr/lib/jvm/

Run the self-extracting binary:

./jdk-1_5_0_<version>-linux-i586.bin</version>

Then type these commands:

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.5.0_22/jre/bin/java 3

sudo update-alternatives --config java

You will have to choose the jdk 1.5 from the list.

sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.5.0_22/bin/javac 3

sudo update-alternatives --config javac

You will have to choose the jdk 1.5 from the list.

Install JBoss

Get JBoss Application Server 4.2.2 zip file from http://www.jboss.org/jbossas/downloads.
Unzip it and run the server:

cd JBOSS_PATH/bin

./run.sh -b 0.0.0.0

Browse the homepage at http://your_IP_address:8080/ to test the server

Install MySQL

Run:

apt-get install mysql-server-5.1

Install MySQL Connector/J

Get Connector/J from http://dev.mysql.com/downloads/connector/j/5.1.html

Extract and put mysql-connector-java-5.1.xx-bin.jar into JBOSS_PATH/server/default/lib/

Compile and deploy OpenMDMS

Install Apache Ant:

apt-get install ant

Get OpenMDMS:

svn checkout svn://svn.code.sf.net/p/openmdms/code/trunk FOLDER

Edit build.properties located in FOLDER/ and set the right path to jboss
(jboss=JBOSS_PATH/server/default)

Edit the web.xml file located in FOLDER/acs-war/web/WEB-INF/ and set the right path to the firmware directory
(org.openacs.fwbase context-param):

<context-param>
    <description>Path for firmware images</description>
    <param-name>org.openacs.fwbase</param-name>
    <param-value>/firmware/</param-value>
</context-param>

Create the firmware directory:

mkdir /firmware

Run ant to build OpenMDMS:

ant -f b.xml

Copy FOLDER/dist/acs.ear to JBOSS_PATH/server/default/deploy

Create openacs-ds.xml in JBOSS_PATH/server/default/deploy/:

   <?xml version="1.0" encoding="UTF-8"?>
   <datasources>
     <local-tx-datasource>
       <jndi-name>ACS</jndi-name>
       <connection-url>jdbc:mysql://localhost/ACS</connection-url>
       <driver-class>com.mysql.jdbc.Driver</driver-class>
       <user-name>openacs</user-name>
       <password>openacs</password>
       <min-pool-size>5</min-pool-size>
       <max-pool-size>20</max-pool-size>
       <idle-timeout-minutes>5</idle-timeout-minutes>
     </local-tx-datasource>
  </datasources>

Create openacs-service.xml in JBOSS_PATH/server/default/deploy/jms

 <?xml version="1.0" encoding="UTF-8"?>
 <server>
   <mbean code="org.jboss.mq.server.jmx.Queue" name="jboss.mq.destination:service=Queue,name=acsQueue">
     <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
   </mbean>
 </server>

Create ACS database and openacs user on MySQL, as in openacs-ds.xml:

mysql

 >CREATE DATABASE ACS;
 >GRANT ALL ON ACS.* TO openacs IDENTIFIED BY 'openacs';

Run the server:

cd JBOSS_PATH/bin

./run.sh -b 0.0.0.0

Browse the OpenMDMS web interface at http://your_IP_address:8080/openacs/

References:
http://www.oracle.com/technetwork/java/javase/install-linux-141396.html
http://pierky.wordpress.com/2009/02/07/installing-tr-069-openacs-on-a-fresh-debian-setup/