CaMP Application Installation

newshumansvilleData Management

Dec 16, 2012 (4 years and 6 months ago)

443 views

CaMP Installation Guide
Table of Contents
Conventions.........................................................................................................1
Required Software Components...............................................................................1
Java Setup...........................................................................................................1
Database Setup.....................................................................................................2
Install the Application Server..................................................................................2
Download and Install Hibernate...............................................................................3
JDBC Driver Installation........................................................................................3
CaMP Application Installation.................................................................................3
Conventions
A few conventions followed in this guide should be mentioned here.
• All information that should be typed at the keyboard or code is displayed in the
following font.
• Any pieces of code that have the symbol#at the end of then line means that the following line is
a continuation and there should not be a line break between them.
Required Software Components
The following software components are required in order to use this application:
• Java SDK (Currently 1.4 is supported)
http://java.sun.com/j2se/1.4.2/download.html
• Postgresql (Although this will hopefully change to more than one type of database)
http://www.postgresql.org
• J2EE Application Server (currently the only supported server is JBoss)
http://www.jboss.org
• Hibernate 2.1
http://www.hibernate.org
• JDBC Drivers
http://jdbc.postgresql.org
Java Setup
Java is required for the JBoss installation.Follow the link above and download for your operating
system.After Java has been installed your PATH variable will need to be set.If using a unix variant
1
then a simple
export PATH=$PATH:/directory/to/the/java/binary/file
This is of course presuming that you are using a shell that is bash-like.If using a windows system
then right-click on My Computer and click on Properties.I forget what to do from here on because I
do not have a Windows systemin front of me!!
Database Setup
Currently the tables and required data to be inserted into the database must be done by the adminis-
trator.This will hopefully be incorporated into an installer in the future.All the instructions below
assume that the user has enough privileges to drop and create tables as well as being able to insert
data into those tables.
1.Change to the user that has access to the database.
2.use the command line tool psql to access the database
psql template1
3.create a database called camp
CREATE DATABASE camp;
4.Exit the command line tool and change to the directory that contains the file cre-
ate_camp.sql
5.This file contains sql statements for creating tables and adding data to the newly created data-
base.Send these sql statements to the database.
psql < create_camp.sql
This should complete the database table and data inserts.One other thing to check for is to make
sure that the database accepts TCP/IP connections.To do this make sure that there is a line in the
postgresql.conf file that reads as follows:
tcpip_socket = true
If the above line needed to change then a restart of the database systemwould be required.
/etc/rc.d/init.d/postgresql restart
Install the Application Server
If the application server to be used has already been set up the first section can be skipped.
If you have yet to install an application server then download the latest binaries from ht-
tp://www.jboss.org.These instructions assume that JBoss is being installed and used.This is be-
cause we do not have access to another type of application server.Once the binaries have been
downloaded,untar it into a directory.
For the following steps we will assume that you are using the default set up.
1.The JAAS security policy needs to be set up.Included in the CaMP distribution is a default
policy which uses the database setup above.To use this setup the following lines need to be ad-
ded to the server.policy file in the server/default/conf directory.
Camp { com.camp.jaas.RdbmsLoginModule required
CaMP Installation Guide
2
url="jdbc:postgresql://localhost/camp?user=postgres&password=po
stgres"#driver="org.postgresql.Driver";};
Download and Install Hibernate
Once the application server has been set up the hibernate classes need to be added to the server
classpath.This is done by copying a number of jar files that come in the hibernate distribution to the
servers lib directory.
1.Download the latest Hibernate distribution fromthe above link.
2.Untar the downloaded package and install the distribution.
3.Copy the following files from the distributions lib/directory to the JBoss server/de-
fault/lib directory.
cglib-full-2.0.1.jar
commons-collection-2.1.jar
commons-lang-1.0.1.jar
commons-logging-1.0.3.jar
dom4j-1.4.jar
hibernate2.jar
JDBC Driver Installation
Download the latest database JDBC drivers from the above link for the database being used.The jar
file that comes in the package needs to be placed in the application server lib directory.Currently
postgres is the only database supported.Thus,the jar package needs to contain the
org.postgresql.Drivers class.
CaMP Application Installation
1.Download the code.The code can be obtained from ht-
tp://sourceforge.net/project/showfiles.php?group_id=67700
2.Untar the tarball.
3.Copy all the jar files to the application servers deployment directory.At the moment the appli-
caion server needs to be restarted for the application to work correctly.This problem is being
worked on.
CaMP Installation Guide
3