CofaxInstallInstructs

fortunabrontideInternet και Εφαρμογές Web

13 Νοε 2013 (πριν από 3 χρόνια και 11 μήνες)

112 εμφανίσεις




Installation Docs: Core Code
11/13/2013


Page
1

of
4

Overview:


At its heart Cofax is a collection of Java servlets, classes, and extensions. These components collectively
form the Cofax Core Code. The Core Code has been packaged into seven
jar

files

and one
war file
. This
packaging allows for easy ins
tallation, upgrading, and versioning.


Pre
-
Requisites:



The Cofax Core Code being Java based was built and designed to run in many different environments.

Cofax can run under Unix as well as Windows really any platform that supports Java can run Co
fax.

Cofax does require two components to be present on the system.


1. The system must have a standard version of Java installed. The latest version of Java can be downloaded
from Sun Microsystems at (http://java.sun.com/j2se/1.3/). The current version
is Java2 version1.3.



2. The Cofax Web application component also requires the system to have a Java servlet engine installed.
Cofax was built and tested using Jakarta’s Tomcat and these instructions will be based on that platform.
Tomcat is freely avail
able from Jakarta at (
http://jakarta.apache.org/builds/tomcat/release/v3.1/bin/
).


3. In order for the Cofax Core Code to function it also must have access to a valid database or d
atastore.
Information about setting up the database and the database schema will be covered in a separate document.


Tomcat Installation Notes:

Tomcat comes with good documentation we just include some general notes and procedures on configuring
it to wor
k with Cofax here.

To install Tomcat simply extract the files to a folder on the system ex. (usr/local/tomcat). Once the files are
extracted you should add the TOMCAT_HOME environment variable to your system. The variable should
be set to point to th
e top level of your Tomcat installation. For example if we installed it to
“usr/local/tomcat” the variable would look like (TOMCAT_HOME = usr/local/tomcat).


Tomcat comes with start and stop batch files located in the tomcat/bin directory. You can use thes
e files to
start and stop Tomcat on the system.


The webapps directory in the Tomcat home directory contains Java web applications “war files” and their
corresponding directories. Tomcat installs some web applications by default. These are the Root, Test,
Examples, and Admin applications. We recommend you delete the Examples, Admin and test web
application folders, including their War files. This is to prevent potential security holes and to avoid
conflicts. Remove references to their contexts in server.x
ml as well.


Installing Cofax Extensions (JARs):


The standard Cofax package should contain these seven “jar files”:

COFAX1.5.JAR

JAKARTA
-
ORO
-
2.0.JAR

JAXP.JAR

JTURBO.JAR

PARSER.JAR

WROXCOFAX
-
CONNECTIONPOOL
-
2.0.JAR

XERCES.JAR


These “jar files” contain c
lasses that Cofax requires to run. These eight files should be placed in the
standard Java extensions directory (JavaSoft
\
JRE
\
1.3
\
lib
\
ext). The exact location of this directory may vary
depending on your system
.
For more information on Java extensions and

where to find the directory on
your system see (
http://java.sun.com/j2se/1.3/docs/guide/extensions/extensions.html
).




Installation Docs: Core Code
11/13/2013


Page
2

of
4


These files must be placed in the extensions director
y because they must be made available to the entire
system as various components of Cofax will need to call these classes.


Installing Cofax Web Application (CONTENT.WAR):


The eighth file included in the Cofax package is the Content.war. This file sh
ould be placed in the
Webapps folder of your Tomcat directory (usr/local/tomcat/webapps). Contained in this file are the Cofax
Servlet classes as well as directories and Configuration files needed by Cofax.


Running Cofax:


Once you have placed the fi
les in the proper directories you are ready to run Cofax.

To run Cofax all you need to do is start Tomcat using the “start.bat” included with Tomcat.

The first time you start Tomcat with Cofax installed it will automatically expand the “content.war” file
.
You should see a “content” directory the “webapps” directory. This directory contains three sub
-
directories
META
-
INF,templates, and WEB
-
INF. The templates directory contains two sample default Cofax
templates. The WEB
-
INF directory contains a four con
figuration files plus the necessary libraries.


Configuring Cofax:


In the WEB
-
INF file there are two configuration files that allow you to change some Cofax settings.

After making any changes to the files listed below you must restart Tomcat.


Cofax
.XML
-


This is the main Cofax application Config file.

Following is an explanation of the Configuration settings.

<!
--

Mainly for CoFax Site Production Staff
--
>


<templatePath>templates</templatePath>

-

This sets line sets the default path for template
s. It is set to look in the templates sub
-
directory
of the webapps directory
.


<templateOverridePath></templateOverridePath>

-

Sets an override path in which to look for templates before looking in the default directory.
Example: inet/hosts/software.pjilly
.com/templtes


<searchEngineRobotsDb>WEB
-
INF/robots.db</searchEngineRobotsDb>

<admin.templatePath>WEB
-
INF/adminTemplates</admin.templatePath>


<defaultListFile>listTemplate.htm</defaultListFile>

<defaultArticleFile>articleTemplate.htm</defaultArticleFile>

<templateForSearchEngines>forSearchEngines.htm</templateForSearchEngine
s>

-

These lines define the name Cofax should use for default templates.


<!
--

Mainly for CoFax Systems Administrators
--
>


<lookInContext>1</lookInContext>

-

This sets the context in
which to look for the database properties file. 1 means to look in the
context of the Web application. 0 means to look outside the web application.



<dbProperties>WEB
-
INF/db.properties</dbProperties>

-

Defines the path of the db.properties files dependin
g on the context setting above.


<default.DataStoreName>cofax</default.DataStoreName>




Installation Docs: Core Code
11/13/2013


Page
3

of
4

-

Tells Cofax the name to use for the datastore.




<default.TemplateProcessor>org.cofax.WysiwygTemplate</default.TemplateP
rocessor>

<default.TemplateLoader>org.cofax.Fil
esTemplateLoader</default.Template
Loader>

<default.DataStore>org.cofax.SqlDataStore</default.DataStore>

-

The above lines define what classes Cofax should use for various processes.

End users should not change them. They are included only to allow changes

in future product
releases.


<cache.pages.maxTrack>10000</cache.pages.maxTrack>

<cache.pages.maxStore>500</cache.pages.maxStore>

<cache.pages.refreshInterval>10</cache.pages.refreshInterval><!
--

in
minutes
--
>

-

Sets Page cache settings. MaxTrack defines ho
w many hits to a page to track.

-

MaxStore defines how many pages to store in cache.

-

Sets how often the cache should be refreshed.


<cache.templates.maxTrack>1000</cache.templates.maxTrack>

<cache.templates.maxStore>500</cache.templates.maxStore>

<cache.te
mplates.refreshInterval>15</cache.templates.refreshInterval><!
--

in minutes
--
>

-

Sets Template cache settings. MaxTrack defines how many hits to a template to track.

-

MaxStore defines how many template to store in cache.

-

Sets how often the cache should be r
efreshed.



<cache.packageTags.maxTrack>200</cache.packageTags.maxTrack>

<cache.packageTags.maxStore>100</cache.packageTags.maxStore>

<cache.packageTags.refreshInterval>60</cache.packageTags.refreshInterva
l><!
--

in minutes
--
>

-

Sets Package Tag cache setti
ngs. MaxTrack defines how many hits to a Package Tag to
track.

-

MaxStore defines how many Package Tag to store in cache.

-

Sets how often the cache should be refreshed.


Db.properties
-

This file sets how Cofax should connect to the datastore.


drivers=com.
ashna.jturbo.driver.Driver

-

Specifies what database driver to use

logfile=/dev/null

-

Sets the file and path to use for logging database connections. Should be set to null in
production environment. Should only be set for debugging purposes.


cofax.url=jd
bc:JTurbo://s40.pni.philly.com:1433/goon/sql70=true

cofax.user=cofax_user

cofax.password=cofaxme

cofax.initconns=10

cofax.maxconns=1000

-

Sets the URL, user name, and password to use for connecting to the database.





Installation Docs: Core Code
11/13/2013


Page
4

of
4