Sie sind auf Seite 1von 64

INSTALLATION

IN A LINUX PRODUCTIO N ENVIRONMENT


GX W E B M A N A G E R 9

Date
October 8, 2010

Target Audience
System Administrator
Software Developer
Application Manager

Document intended for GX WebManager Version


GX WebManager 9.13.0 and higher

Document ID and version


GXD0059_en, version 2.20
INSTALLATION in a Linux Environment

SUMMARY
This document explains how to install GX WebManager on a Linux environment running an
Apache web server. After completing the tasks described in this Installation Guide, a complete
GX WebManager will be set up (including the GX search engine). This document does not
describe in a step-by-step fashion how to install or configure the other various external
software components external to GX WebManager – For information on installing/configuring
those components, please refer to the documentation provided by the manufacturer(s).

KEY
SYS If ‘SYS’ is shown in the left margin, the text denoted by this marker is meant for system
administrators.
DEV If ‘DEV’ is shown in the left margin, the text denoted by this marker is meant for software
developers.

PREREQUISITES
 Familiarity with the Linux operating system

RELATED TOPICS
 Management of directory structure for releases, updates, and deployments
 Use of the Setup tool

VERSIONING
Version Date Description
1.0 August 13, 2007 Initial version (based on Documentation 8.3 Version 1.7)
1.1 August 14, 2007 Minor modifications after review
1.2 August 21, 2007 Minor modifications after training
1.21 September 04, 2007 Extra LoadModule for Apache added to accommodate SEO
1.3 December 3, 2007 Translated to English and added small changes
1.4 January 9, 2008 Added section on how to create a deploy
1.41 January 29, 2008 Changed URL to download JDK 1.5
1.5 February 8, 2008 Added section on multiple websites
1.51 February 22, 2008 Replaced reference to Appendix with reference to the “EN – GX
WebManager 9 – Installation on Linux – commands.txt” file
1.52 February 26, 2008 Added document ID on title page
1.60 March 4, 2008 Added section on distributed setups; expanded set of setup
parameters of Tomcat (added appendix with explanations)
1.61 March 12, 2008 Fixed minor textual issues
1.62 April 21, 2008 Added JBoss installation/configuration instructions.
1.63 April 24, 2008 Minor changes in Appendix A (settings.xml)

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 3/64


INSTALLATION in a Linux Production Environment

1.64 May 8, 2008 Added remark about reducing the logging amount in Jboss
1.65 May 9, 2008 Removed the TTL parameter from the startup scripts in Tomcat
and Jboss: causes problems in production environments.
1.66 June 4, 2008 Changed the text on how to choose the ID of a cluster node
1.67 June 6, 2008 Corrected minor typos in Appendix C
1.68 June 20, 2008 Applied minor changes in the Distributed WebManager chapter
1.69 July 30, 2008 Minor changes in the Distributed WebManager chapter
1.70 September 9, 2008 Added comment on syncDelay property in distributed section
1.71 December 4, 2008 Corrected one little typo
1.72 December 11, 2008 Added the “user.language” and “user.country” parameters to
the Java startup properties to avoid Locale-issues with Oracle
1.73 December 12, 2008 Removed smart-quotes to improve copy-pasting
1.74 January 6, 2009 Changed hint about filling the my.ini of MySQL
1.75 March 4, 2009 Changed some default settings
1.76 March 13, 2009 Added “sun.net.inetaddr.ttl” to the startup parameters
1.80 April 3, 2009 Added section 4.2 on the changes to the /etc/hosts while
creating a new webinitiative in WebManager. Also added a new
setting for MySQL (if the site runs on MySQL)
1.81 May 14, 2009 Section 1.16 modified
1.90 May 18, 2009 Updated for GX WebManager version 9.8
2.00 August 14, 2009 Updated for GX WebManager version 9.9
2.01 August 18, 2009 Minor edits.
2.10 May 11, 2010 Updated for GX WebManager version 9.12
2.20 October 8, 2010 Updated for GX WebManager version 9.13

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 4/64


INSTALLATION in a Linux Environment

TABLE OF CONTENTS

1 Server Installation under Linux (one-time actions) ................................................... 7


1.1 The directory structure ................................................................................ 7
1.2 Java Development Kit .................................................................................. 8
1.3 Apache Maven ........................................................................................... 8
1.4 The database ........................................................................................... 10
1.5 The application server (Tomcat or JBoss) .......................................................... 10
1.6 Apache web server ..................................................................................... 13
1.7 Unpacking GX WebManager release .................................................................. 19
1.8 Modifying the settings.xml ....................................................................... 19
1.9 Creating the database(s) .............................................................................. 19
1.10 Installing GX WebManager release ................................................................ 20
1.11 Configuring Tomcat ................................................................................. 21
1.12 Configuring JBoss .................................................................................... 22
1.13 Placing the configuration.xml ................................................................ 27
1.14 Setting permissions correctly ...................................................................... 27
1.15 Make the hostnames resolvable .................................................................... 28
1.16 Setting up rc scripts ................................................................................. 28
1.17 Controlling the startup block mechanism ........................................................ 29

2 How to create and process a deploy ................................................................... 31


2.1 Creating the deploy .................................................................................... 31
2.2 What to deliver to the system administrator ....................................................... 31
2.3 How to process the deploy ............................................................................ 32
2.4 How to roll back a deploy ............................................................................. 32

3 Multiple websites ......................................................................................... 35


3.1 Expanding the directory structure ................................................................... 35
3.2 Make the new hostnames resolvable ................................................................ 36
3.3 Change the Apache configuration .................................................................... 36
3.4 Communicate technical details to the Software Developer ...................................... 38
3.5 Request new configuration.xml ................................................................ 38
3.6 Process the new configuration.xml ............................................................ 39
3.7 Create the new webinitiative within GX WebManager ............................................ 39

4 Distributed WebManager ................................................................................. 43


4.1 GX WebManager distributed setup in a nutshell ................................................... 44
4.2 Configure settings.xml files ...................................................................... 45
4.3 Make static content available for all servers ....................................................... 46

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 5/64


INSTALLATION in a Linux Production Environment

4.4 Change startup script of Tomcat / JBoss ........................................................... 47


4.5 Check firewall settings ............................................................................... 47
4.6 Start all nodes in the cluster ........................................................................ 47

5 Upgrading GX WebManager ............................................................................. 49


5.1 Upgrading GX WebManager on a single server ..................................................... 49
5.2 Upgrading GX WebManager in a clustered environment .......................................... 50

6 Appendix a: modifying settings.xml ............................................................... 51


6.1 Modifying the general settings ....................................................................... 51
6.2 Modifying the database settings ..................................................................... 55

7 Appendix b: Common issues ............................................................................ 59


7.1 MySQL difference between Windows and Linux ................................................... 59
7.2 GX WebManager edit environment does not respond fast ........................................ 59

8 Appendix C: explanation on the JAVA_OPTS parameters ........................................... 61


8.1 General parameters ................................................................................... 61
8.2 Garbage collector parameters ....................................................................... 62

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 6/64


INSTALLATION in a Linux Environment

1 SERVER INSTALLATION UNDER LINUX (ONE-TIME

ACTIONS)

SYS This chapter describes how to set up a GX WebManager installation in a Linux production
environment. The result is that all requests for static content (images, style sheets, etc.) are
handled through Apache. Requests for dynamic content (GX WebManager’s HTML) are forwarded
by Apache to GX WebManager which processes the requests. In this document, an environment
will be created with two host names:

External host name: www.mywebsite.com


Internal host name: edit.mywebsite.com

Note: Bold text appearing in the examples is project-specific and needs to be modified
specifically for each particular environment.

1. 1 Th e di r e ct ory str u ct ur e

SYS After installing GX WebManager, a folder structure is created. You are free to choose your own
structure, but GX recommends the following:

/vol/www/server/ Apache web server location


/vol/www/tomcat-mywebsite/deploy/appBase The Tomcat directory
/vol/www/mywebsite/configuration/ Contains the configuration.xml
/streaming/  Contains the website’s downloads
/system/  Contains system files
/web-docs/cfg/  Flash elements configuration
/toolbar/ Poll element files
/upload/ Contains page images
/upload_mm/ Media Repository/ObjectManager images
/wm/ Standard GX WebManager files
/work/cache/ Cache for WCBs and pages
/deploy/ Contains all WCBs
/edition-bundles/ Contains source files for GX
 WebManager WCBs
/formupload/ Binaries of sent forms
/jcr/ JCR-related files
/osgi/ Cache for OSGI frameworks files
/undo/ Cache for undo/redo functionality

Note: You can create all or part of this directory structure before starting the entire installation
process. Create the directories marked with  before starting the installation.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 7/64


INSTALLATION in a Linux Production Environment

1. 2 J av a D ev el o p m e nt Ki t

SYS GX WebManager uses the Java SE Development Kit (JDK) that can be downloaded from:
http://java.sun.com/javase/downloads/.

Notes:

 For versions of GX WebManager 9.13 and higher, GX highly recommends that you use Java
version 1.6.0_21. If you use Java 5.x, GX WebManager’s performance will be suboptimal.
 Use the 32-bit version of Java if possible.
 Official support for Java 5 ceased in October 2009.

Download and install JDK 6.0 Update 18 or higher for your platform Example UNIX commands for
the JDK 6.0 installation:

cd /usr
mkdir java
cd java
chmod 700 /tmp/jdk-1_6_0_18-linux-i586-rpm.bin
/tmp/jdk-1_6_0_18-linux-i586-rpm.bin
rm -f /tmp/jdk-1_6_0_18-linux-i586-rpm.bin
ln -sf /usr/java/jdk1.6.0_18 /usr/java/jdk1.6

Tip: Verify that the new JDK is being used: After typing java –version, the Java version
number is displayed. If it is not the correct version, modify the 2 PATH variable to point to the
correct version. For example:

export PATH=/usr/java/jdk1.6/bin:$PATH

1. 3 A p a c h e M av e n

SYS To install GX WebManager, use the Maven build tool. This tool can be downloaded from:
http://maven.apache.org/. Download and install version 2.0.8 or higher. For example:

cd /usr/local/
tar zxf /tmp/apache-maven-2.0.8-bin.tar.gz
rm -rf /tmp/apache-maven-2.0.8*
ln -sf apache-maven-2.0.8 maven
After the installation, Maven will still have to be recorded in the PATH variable and the M2_HOME
variable will need to be set. For example:

export PATH=/usr/local/maven/bin:$PATH
2 export
Setting M2_HOME=/usr/local/maven/
environment variables is best done in the startup script of the shell being used (e.g., “~/.profile” or
“~/.cshrc”). JAVA_HOME=/usr/java/jdk1.6/
export This adds the variable permanently so you do not have to enter the export command over and
over.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 8/64


INSTALLATION in a Linux Environment

Tip: Verify that the new version of Maven is being used. Versions older than 2.0.6 will not work
well when installing GX WebManager. After typing mvn –version, the Maven version number is
displayed. If an older version is indicated, remove the Maven version already on the system.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 9/64


INSTALLATION in a Linux Production Environment

1. 4 Th e d a t ab a s e

SYS GX WebManager 9 works with the following databases:

 Oracle
 MS SQL
 MySQL 5.0

Install one of the databases and create a user name and password for someone with permission to
create and fill a table. Example UNIX commands for MySQL in a Red Hat Enterprise Linux 4
environment:

cd /tmp
rpm -i MySQL-server-community-5.0.45-0.rhel4.i386.rpm
rpm -i MySQL-client-community-5.0.45-0.rhel4.i386.rpm
rpm -i MySQL-shared-community-5.0.45-0.rhel4.i386.rpm
/usr/bin/mysqladmin -u root password 'myDBpassword'

The default settings of MySQL need to be adjusted to make it work smoothly with GX
WebManager. Create the file “my.cnf” and place it in the directory “/etc”. The initial contents
of this document should be:

[mysqld]
max_allowed_packet=128M
innodb_buffer_pool_size=256M

[mysqldump]
max_allowed_packet=128M

Restart MySQL after you have changed the /etc/my.cnf file.

1. 5 Th e a p pl i c a ti o n s e rve r (T o m c at or J B oss )

GX WebManager runs within an application server. As of release 9.4, GX WebManager supports t wo


application servers: Tomcat and JBoss. The next sections describe how to install them.

1.5.1 Tomcat

SYS Download the latest version of Apache Tomcat 6.0 (http://tomcat.apache.org/download-60.cgi)


and unpack it in the /vol/www/ directory. Rename the created directory tomcat-mywebsite.
For example:

cd /vol/www/
tar zxf /tmp/apache-tomcat-5.5.29.tar.gz
mv apache-tomcat-5.5.29 tomcat-mywebsite
rm -f /tmp/apache-tomcat-5.5.29.tar.gz
# Also add the directories for the expanded GX WebManager files
cd tomcat-mywebsite
mkdir deploy
mkdir deploy/appBase

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 10/64


INSTALLATION in a Linux Environment

Add the following lines to /vol/www/tomcat-mywebsite/bin/catalina.sh, directly under


the first block of comment lines:

CATALINA_HOME=/vol/www/tomcat-mywebsite
JAVA_HOME=/usr/java/jdk1.6
JAVA_OPTS="${JAVA_OPTS} -Dsun.rmi.dgc.server.gcInterval=600000"
JAVA_OPTS="${JAVA_OPTS} -Dsun.rmi.dgc.client.gcInterval=600000"
JAVA_OPTS="${JAVA_OPTS} -Duser.language=en -Duser.country=US"
JAVA_OPTS="${JAVA_OPTS} -XX:+UseConcMarkSweepGC"
JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true"
JAVA_OPTS="${JAVA_OPTS} -Dwebmanager.clustering.readonly=false"
JAVA_OPTS="${JAVA_OPTS} -Dsun.net.inetaddr.ttl=300"
JAVA_OPTS="${JAVA_OPTS} -
Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xs
ltc.trax.TransformerFactoryImpl"
JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -Xms512M -XX:MaxPermSize=128m"
JAVA_OPTS="${JAVA_OPTS} -XX:-ReduceInitialCardMarks"
JAVA_OPTS="${JAVA_OPTS} -Dorg.apache.jasper.runtime.JspFactoryImpl.USE_POOL=
false"

The used settings in the above example are good defaults and need no adjusting. The only
parameter that might need another value is the Xmx parameter. The number in the Xmx
parameter determines the maximum RAM allowed for the Java process in which GX WebManager
runs. In this example, the RAM is set at 1024 MB (1 GB). The higher this number is set, the
smoother GX WebManager will run.

Note: See appendix C for more details and explanations on the JAVA_OPTS settings.

Clustering note: the above settings are fine for a standalone setup of GX WebManager and the
setup of a master node in a clustered environment. For a slave node one setting has to be
adjusted: set the property “webmanager.clustering.readonly” to true.

Avoiding clogged logfiles


With the default settings, the log file will be quickly filled with messages, (information, warning,
and error). GX recommends adjusting the logging.properties file in Tomcat to reduce the
number of messages that are logged. Proceed as follows:
 Open the /vol/www/tomcat-mywebsite/conf/logging.properties file.
 At the end of the file, add these lines:
o nl.gx.level = WARNING
o nl.gx.webmanager.startup.level = INFO
o org.apache.felix.level = WARNING
o org.apache.jackrabbit.level = WARNING
o org.quartz.level = WARNING
o org.springframework.level = WARNING

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 11/64


INSTALLATION in a Linux Production Environment

1.5.2 JBoss

SYS If you have already installed Tomcat, skip this section! Only install JBoss if you have not yet
installed Tomcat.

Download JBoss Application Server 4.2.2.GA (http://labs.jboss.com/jbossas/downloads/) and


unpack it in the /vol/www/ directory. Rename the created directory jboss-mywebsite. For
example:

cd /vol/www
unzip /tmp/jboss-4.2.2.GA.zip
mv jboss-4.2.2.GA jboss-mywebsite
rm -f /tmp/jboss-4.2.2.GA.zip

Add the following lines to /vol/www/jboss-mywebsite/bin/run.conf, directly under the


first block of commented lines:

JAVA_OPTS="${JAVA_OPTS} -Dsun.rmi.dgc.server.gcInterval=600000"
JAVA_OPTS="${JAVA_OPTS} -Dsun.rmi.dgc.client.gcInterval=600000"
JAVA_OPTS="${JAVA_OPTS} -Duser.language=en -Duser.country=US"
JAVA_OPTS="${JAVA_OPTS} -XX:+UseConcMarkSweepGC"
JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true"
JAVA_OPTS="${JAVA_OPTS} -Dwebmanager.clustering.readonly=false"
JAVA_OPTS="${JAVA_OPTS} -Dsun.net.inetaddr.ttl=300"
JAVA_OPTS="${JAVA_OPTS} -
Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xs
ltc.trax.TransformerFactoryImpl"
JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -Xms512M -XX:MaxPermSize=128m"
JAVA_OPTS="${JAVA_OPTS} -XX:-ReduceInitialCardMarks"
JAVA_OPTS="${JAVA_OPTS} -
Dorg.apache.jasper.runtime.JspFactoryImpl.USE_POOL=false"

By default, the settings in the above example need no further adjusting. The only parameter that
you might have to change is the Xmx parameter (highlighted in red above). The value of the Xmx
parameter determines the maximum amount of RAM allowed for the Java process in which GX
WebManager runs. In the above example, the maximum amount of RAM is set to 1024 MB (1 GB).
The higher this number is set, the better the performance you will get running GX WebManager.

Note: See appendix C for more information about the JAVA_OPTS settings.

Clustering note: the above settings are ok for a standalone setup of GX WebManager and the
setup of a master node in a clustered environment. For a slave node one setting has to be
adjusted: set the property “webmanager.clustering.readonly” to true.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 12/64


INSTALLATION in a Linux Environment

By default JBoss comes with three example server configurations: ‘all’, ‘default’ and ‘minimal’.
In order to run GX WebManager, a new configuration (called ‘webmanager’) will have to be
created that is based on the minimal example extended with the JBoss-web module and several
libraries. The creation of a server configuration involves copying the desired components from the
example server configurations. For example:

cd /vol/www/jboss-mywebsite/server
cp -a minimal webmanager
cp -a default/deploy/jboss-web.deployer webmanager/deploy
cp default/lib/el-api.jar webmanager/lib
cp default/lib/jboss-ejb3x.jar webmanager/lib
cp default/lib/jboss-j2ee.jar webmanager/lib
cp default/lib/jboss.jar webmanager/lib
cp default/lib/jboss-jaxws.jar webmanager/lib
cp default/lib/jbosssx.jar webmanager/lib
cp default/lib/jbossws-common.jar webmanager/lib
cp default/lib/jbossws-framework.jar webmanager/lib
cp default/lib/jbossws-spi.jar webmanager/lib
cp default/lib/jsp-api.jar webmanager/lib
cp default/lib/servlet-api.jar webmanager/lib

Avoiding clogged logfiles


With the default settings, the log file will be quickly filled with messages , (information, warning,
and error). To reduce the number of messages that are logged, adjust the logging.properties
file of Java. Proceed as follows:
 Open the /usr/java/jdk1.6/jre/lib/logging.properties file.
 At the end of the file, add these lines:
o nl nl.gx.level = WARNING
o nl.gx.webmanager.startup.level = INFO
o org.apache.felix.level = WARNING
o org.apache.jackrabbit.level = WARNING
o org.quartz.level = WARNING
o org.springframework.level = WARNING

1. 6 A p a c h e w e b s er v er

SYS Download the latest version of the Apache web server (http://httpd.apache.org/download.cgi)
and install it. There are a few configuration differences between Apache versions 2.0 and 2.2.
Each is explained separately in the following paragraphs.

How to compile Apache is shown in the examples below. It is also possible to use the Apache
included in the package. Because of the Apache package updates, it is recommended that you
configure Apache as far as possible according to the package standards, for example, by including
configuration files instead of modifying the httpd.conf itself.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 13/64


INSTALLATION in a Linux Production Environment

1.6.1 Apache 2.0

Installation of httpd

For example:

cd /tmp
tar -zvxf httpd-2.0.63.tar.gz
cd httpd-2.0.63
./configure -prefix=/vol/www/server --enable-mods-shared="mime-magic
rewrite proxy cache disk-cache headers expires info" --enable-so
make
make install
cd ..
rm -rf httpd-2.0.63*

Installation of mod_jk

The mod_jk module is necessary to connect Apache and Tomcat or JBoss. Download the source
from http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/ and compile it:

cd /tmp
tar -zvxf tomcat-connectors-1.2.25-src.tar.gz
cd tomcat-connectors-1.2.25-src/native
./buildconf.sh
./configure --with-apxs=/vol/www/server/bin/apxs
make
make install
cd ../..
rm -rf tomcat-connectors-1.2.25-src*

Configuration of httpd.conf

SYS In the /vol/www/server/conf/httpd.conf, several settings need to be entered. Add the


following lines (e.g., preceding the line starting with ### Section 3: Virtual Hosts):

LoadModule jk_module modules/mod_jk.so

<IfModule mod_jk.c>
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel info
</IfModule>

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 14/64


INSTALLATION in a Linux Environment

Uncomment the following line:

NameVirtualHost *:80

At a minimum, the following modules should be activated:

LoadModule proxy_module modules/mod_proxy.so


LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule headers_module modules/mod_headers.so
LoadModule expires_module modules/mod_expires.so

Minimal setup of the VirtualHost for the external environment of GX WebManager:

<VirtualHost *:80>
ServerName www.mywebsite.com
DocumentRoot "/vol/www/mywebsite/web-docs/"
ErrorLog logs/www.mywebsite.com_error.log
CustomLog logs/www.mywebsite.com_custom.log common
<Directory "/vol/www/mywebsite/web-docs/">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule mod_jk.c>
JkMount /web/* mywebsite
</Ifmodule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/web/
RewriteRule ^/(.*)\.htm$ /web/$1.htm [P,L]
</IfModule>
</VirtualHost>

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 15/64


INSTALLATION in a Linux Production Environment

Minimal setup of the VirtualHost for the internal edit environment of GX WebManager:

<VirtualHost *:80>
ServerName edit.mywebsite.com
DocumentRoot "/vol/www/mywebsite/web-docs/"
ErrorLog logs/edit.mywebsite.com_error.log
CustomLog logs/edit.mywebsite.com_custom.log common
<Directory "/vol/www/mywebsite/web-docs/">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory "/vol/www/mywebsite/web-docs/wm/b/">
ExpiresActive ON
ExpiresDefault "now plus 10 minutes"
Header set Cache-Control "max-age=600"
</Directory>
<IfModule mod_jk.c>
JkMount /web/* mywebsite
</Ifmodule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/web/
RewriteRule ^/(.*)\.htm$ /web/$1.htm [P,L]
</IfModule>
</VirtualHost>

The workers.properties

SYS In the Apache /vol/www/server/conf directory, there should be a file named


workers.properties. This file takes care of the mod_jk configuration and ensures that the
web server knows how requests for dynamic pages should be delivered to Tomcat. The file should
contain the following:

worker.list=mywebsite

worker.mywebsite.port=8009
worker.mywebsite.host=localhost
worker.mywebsite.type=ajp13
worker.mywebsite.connection_pool_timeout=600

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 16/64


INSTALLATION in a Linux Environment

1.6.2 Apache 2.2

Note: Install Apache 2.2 only if no web server has been installed. Skip this section if you have
already installed Apache 2.0 from the previous section (Section 1.6.1).

Installation of httpd

For example:

cd /tmp
tar -zvxf httpd.2.2.15.tar.gz
cd httpd.2.2.15
./configure -prefix=/vol/www/server --enable-mods-shared="mime-magic
rewrite proxy proxy-ajp cache disk-cache headers expires info" --enable-
so
make
make install
cd ..6
rm -rf httpd.2.2.15*

In Apache 2.2, the configuration is clearer because the AJP connector comes standard with it - in
Apache 2.0, the mod_jk module has to be installed separately. The GX WebManager configuration
for Apache 2.2 depends on two files: httpd.conf and httpd-vhosts.conf.

Configuration of httpd.conf

The file httpd.conf is located in /vol/www/server/conf. At a minimum, the following


modules should be activated:

LoadModule proxy_module modules/mod_proxy.so


LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule headers_module modules/mod_headers.so
LoadModule expires_module modules/mod_expires.so

The httpd-vhosts.conf file also needs to be read. Search in the httpd.conf for vhosts and
delete the # at the beginning of the line:

Include conf/extra/httpd-vhosts.conf

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 17/64


INSTALLATION in a Linux Production Environment

Configuration of httpd-vhosts.conf

SYS The httpd-vhosts.conf file is located in the /vol/www/server/conf/extra directory of


Apache. The configurations for VirtualHosts of the front end and back-end are located here.

Minimal setup of the VirtualHost for the external environment of GX WebManager:

<VirtualHost *:80>
ServerName www.mywebsite.com
DocumentRoot "/vol/www/mywebsite/web-docs/"
ErrorLog logs/www.mywebsite.com_error.log
CustomLog logs/www.mywebsite.com_custom.log common
<Directory "/vol/www/mywebsite/web-docs/">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ProxyPass /web/ ajp://localhost:8009/web/
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/web/
RewriteRule ^/(.*)\.htm$ /web/$1.htm [P,L]
</IfModule>
</VirtualHost>

Minimal setup of the VirtualHost for the internal environment of GX WebManager:

<VirtualHost *:80>
ServerName edit.mywebsite.com
DocumentRoot "/vol/www/mywebsite/web-docs/"
ErrorLog logs/edit.mywebsite.com_error.log
CustomLog logs/edit.mywebsite.com_custom.log common
<Directory "/vol/www/mywebsite/web-docs/">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory "/vol/www/mywebsite/web-docs/wm/b/">
ExpiresActive ON
ExpiresDefault "now plus 10 minutes"
Header set Cache-Control "max-age=600"
</Directory>
ProxyPass /web/ ajp://localhost:8009/web/
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/web/
RewriteRule ^/(.*)\.htm$ /web/$1.htm [P,L]
</IfModule>
</VirtualHost>

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 18/64


INSTALLATION in a Linux Environment

1. 7 U n p ac ki n g GX W e b M a n a g er r el e as e

Before GX WebManager can be configured, the release has to be unpacked. To unpack the GX
WebManager release, proceed as follows:

cd /vol/www/
mkdir webmanager-mywebsite
cd webmanager-mywebsite
unzip /tmp/GX_WebManager_9.12.0_SDK.zip

1. 8 M o di fyi n g t h e set t ings .xm l

The GX WebManager configuration is set in settings.xml. This file is located in the root of the
unpacked GX WebManager release (/vol/www/webmanager-mywebsite/). Appendix A gives
additional information about the most important properties that need to be modified in the
settings.xml.

1. 9 C re a ti n g t h e d at a b as e (s )

SYS GX WebManager data is stored in a relational database (MS SQL, MySQL, or Oracle). Create the
databases desired for this installation. A complete GX WebManager installation requi res only one
database. In certain cases (performance/security), it is possible to save specific items in separate
databases. A separate database can be created for the following components:
 GX WebManager core (JCR repository storage)
 GX WebManager other (‘externaldb’)

This manual describes a configuration that saves both components in one database
(“wm9mywebsite”). The database for MySQL and MS SQL can be created with one single command
and filled with the necessary tables. To create databases and the standard tables for Oracle, it is
required that you use the standard Oracle tools (SQL Plus can be used, for instance). The initial
scripts for all databases are: /vol/www/webmanager-mywebsite/webmanager-sqlscripts/.

1.9.1 Actions for MySQL

cd /vol/www/webmanager-mywebsite
mvn -s settings.xml -P create-mysql-db
# If the content of JCR should be stored in another DB, then run:
# mysqladmin create wm9mywebsite_jcr -u root -p

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 19/64


INSTALLATION in a Linux Production Environment

1.9.2 Actions for MS SQL

cd /vol/www/webmanager-mywebsite
mvn -s settings.xml -P create-mssql-db
# If the content of JCR should be stored in another DB, then
# create the DB using the Enterprise Manager

1.9.3 Actions for Oracle

Use SQL Plus, for example, to create the database(s). Run the webmanager-oracle-
scripts.sql script, located in the /vol/www/webmanager-mywebsite/webmanager-
sqlscripts/ directory.

1. 1 0 I nst al l i n g GX W e b M a n a g er r el e as e

SYS The basic server setup is now complete. In this section, the GX WebManager release is installed.
To install the release, proceed as follows:

cd /vol/www/webmanager-mywebsite
mvn -s settings.xml -P configure-jcr-repository
mvn -s settings.xml -P build-project
cd /vol/www/mywebsite/
mkdir web-docs
cd web-docs

unzip /vol/www/webmanager-mywebsite/webmanager-webapps/\
webmanager-static-webapp/target/\
webmanager-static-webapp-1.0-SNAPSHOT.war

# For JBoss use:


# cd /vol/www/jboss-mywebsite/server/webmanager/deploy
cd /vol/www/tomcat-mywebsite/deploy

cp /vol/www/webmanager-mywebsite/webmanager-webapps/\
webmanager-backend-webapp/target/\
webmanager-backend-webapp-1.0-SNAPSHOT.war .

cd /vol/www/mywebsite/work/edition-bundles
cp /vol/www/webmanager-mywebsite/edition-bundles/*.jar .

cd /vol/www/mywebsite/system/
cp /vol/www/webmanager-mywebsite/settings.xml .

cp /vol/www/webmanager-mywebsite/webmanager-cleansite/target/\
webmanager-cleansite-1.0-SNAPSHOT.jar .

# Install GX Search Engine (see Chapter 2)


rm /tmp/GX_WebManager_9.9.0_SDK.zip

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 20/64


INSTALLATION in a Linux Environment

1. 1 1 C o n fi g uri n g T om c a t

SYS For Tomcat, two files still need to be created. Place these files in the /vol/www/tomcat-
mywebsite/conf directory.

1.11.1 The conf/server.xml

<Server port="8005" shutdown="SHUTDOWN">


<GlobalNamingResources>
<!-- Userdatabase is used to secure admin pages! Make sure path
is ok otherwise the admin jsps will not work -->
<Resource name="WMUserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="GX WebManager user database"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="/vol/www/tomcat-mywebsite/deploy/admin-users.xml" />
</GlobalNamingResources>

<Service name="WebManager">
<Connector port="8009" enableLookups="false" redirectPort="8443"
debug="1" protocol="AJP/1.3" URIEncoding="UTF-8"
emptySessionPath="true" connectionTimeout="600000"/>
<Engine name="WebManager" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="WMUserDatabase"/>
<Host name="localhost" unpackWARs="true" autoDeploy="false"
deployOnStartup="true"
appBase="/vol/www/tomcat-mywebsite/deploy/appBase">
<Valve className="org.apache.catalina.authenticator.SingleSignOn"
/>
<Context path="/web"
docBase="/vol/www/tomcat-mywebsite/deploy/webmanager-
backend-webapp-1.0-SNAPSHOT.war">
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="webmanager." suffix=".log"
timestamp="true"/>
</Context>
</Host>
</Engine>
</Service>
</Server>

1.11.2 The conf/admin-users.xml

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 21/64


INSTALLATION in a Linux Production Environment

1.11.3 Controlling the startup block mechanism

By default, GX WebManager blocks login requests from the front-end and back-end while it is
starting up. When you try to log in from the front-end or back end while GX WebManager is still in
the startup phase, the following message displays:

If for troubleshooting purposes you want to turn off the blocking mechanism, follow these steps:

 Add the following ‘JAVA_OPTS’ property to the beginning of the GX WebManager block:

-Dwebmanager.startupblock.skip=true

For example:

set JAVA_OPTS=%JAVA_OPTS% -Dwebmanager.startupblock.skip=true -


Djava.awt.headless=true -Dwebmanager.jcr.filemirror=true -
Dwebmanager.clustering.readonly=false -Xms512m -Xmx512m -
XX:MaxPermSize=256m -Xdebug -
Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000

When blocking is turned off, requests from the front-end will return a cached version of
the requested page or a white page with no content when GX WebManager has not
finished the startup process; requests from the backend will show the GX WebManager
login screen, however you will not be able to log in.

 To turn blocking back on, change the ‘true’ declaration to ‘false’. For example:

-Dwebmanager.startupblock.skip=false

1. 1 2 C o n fi g uri n g JB os s

For JBoss, some configuration is required in the servlet container.

1.12.1 jboss-service.xml of the Servlet Container

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 22/64


INSTALLATION in a Linux Environment

<?xml version='1.0' encoding='utf-8'?>


<tomcat-users>
<role rolename="wmadmin"/>
<user username="wmadmin_user" password="MyPassword" roles="wmadmin"/>
</tomcat-users>

First, the server configuration itself needs to be modified. Open the file /vol/www/jboss-
mywebsite/server/webmanager/deploy/jboss-web.deployer/META-INF/jboss-
service.xml and locate the following line:

<attribute name="DefaultSecurityDomain">java:/jaas/other</attribute>

Change it to:

<attribute name="DefaultSecurityDomain">java:/jaas/myweb</attribute>

Now locate for the following snippet at the bottom of the same file:

<depends>jboss:service=TransactionManager</depends>

<!-- Only needed if the


org.jboss.web.tomcat.service.jca.CachedConnectionValve
is enabled in the tomcat server.xml file.
-->
<depends>jboss.jca:service=CachedConnectionManager</depends>

Remove or comment out these lines.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 23/64


INSTALLATION in a Linux Production Environment

1.12.2 server.xml

Open the file /vol/www/jboss-mywebsite/server/webmanager/deploy/jboss-


web.deployer/server.xml. Replace the contents of this file with the following:

<Server>
<Listener className="org.apache.catalina.core.JasperListener" />
<Service name="jboss.web">
<Connector port="8009" address="${jboss.bind.address}"
protocol="AJP/1.3"
emptySessionPath="true" enableLookups="false" redirectPort="8443" />
<Engine name="jboss.web" defaultHost="${jboss.bind.address}">
<Realm className="org.jboss.web.tomcat.security.JBossSecurityMgrRealm"
certificatePrincipal="org.jboss.security.auth.certs.SubjectDNMapping"
allRolesMode="authOnly"
/>
<Host name="${jboss.bind.address}"
autoDeploy="true" deployOnStartup="true" deployXML="true"
configClass="org.jboss.web.tomcat.security.config.JBossContextConfig">
<Alias>www.mywebsite.com</Alias>
<Alias>edit.mywebsite.com</Alias>
</Host>
</Engine>
</Service>
</Server>

Replace the <Alias/> tags with the hostnames of your website. There is no limit on the number
of aliases you can add.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 24/64


INSTALLATION in a Linux Environment

1.12.3 Administrator Login Configuration

The last part of the configuration of JBoss involves configuring the users that have login
permissions for diagnostic purposes. First, open the file /vol/www/jboss-
mywebsite/server/webmanager/conf/jboss-service.xml and add the following snippet
just before the </server> tag at the bottom of the file:

<mbean code="org.jboss.security.plugins.JaasSecurityManagerService"
name="jboss.security:service=JaasSecurityManager">
<attribute name="ServerMode">true</attribute>
<attribute name="SecurityManagerClassName">
org.jboss.security.plugins.JaasSecurityManager</attribute>
<attribute name="DefaultUnauthenticatedPrincipal">
anonymous</attribute>
<attribute name="DefaultCacheTimeout">1800</attribute>
<attribute name="DefaultCacheResolution">60</attribute>
<attribute name="DeepCopySubjectMode">false</attribute>
</mbean>

<mbean code="org.jboss.security.auth.login.XMLLoginConfig"
name="jboss.security:service=XMLLoginConfig">
<attribute name="ConfigResource">login-config.xml</attribute>
</mbean>

<mbean code="org.jboss.security.plugins.SecurityConfig"
name="jboss.security:name=SecurityConfig">
<attribute name="LoginConfig">jboss.security:service=XMLLoginConfig
</attribute>
</mbean>

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 25/64


INSTALLATION in a Linux Production Environment

Next, create the following file:


/vol/www/jboss-mywebsite/server/webmanager/conf/login-config.xml:

<?xml version='1.0'?>
<!DOCTYPE policy PUBLIC
"-//JBoss//DTD JBOSS Security Config 3.0//EN"
"http://www.jboss.org/j2ee/dtd/security_config.dtd">

<policy>
<application-policy name = "client-login">
<authentication>
<login-module code = "org.jboss.security.ClientLoginModule"
flag = "required">
</login-module>
</authentication>
</application-policy>

<application-policy name = "myweb">


<authentication>
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag = "required">
<module-option name="hashAlgorithm">MD5</module-option>
<module-option name="hashEncoding">rfc2617</module-option>
<module-option name="hashUserPassword">false</module-option>
<module-option name="hashStorePassword">true</module-option>
<module-option name="passwordIsA1Hash">true</module-option>
<module-option name="storeDigestCallback">
org.jboss.security.auth.spi.RFC2617Digest </module-option>
</login-module>
</authentication>
</application-policy>
</policy>

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 26/64


INSTALLATION in a Linux Environment

Create a password for the wmadmin user by running the following command:

java -cp /vol/www/jboss-mywebsite/server/webmanager/lib/jbosssx.jar


org.jboss.security.auth.spi.RFC2617Digest wmadmin "GX WebManager"
<password>

Where <password> is the password of your choosing.

Make a note of the resulting hash code. Now create a file called
/vol/www/jboss-mywebsite/server/webmanager/conf/users.properties

wmadmin=<hash code>

Where <hash code> is the hash code you generated in the previous step.

The last step is to create a file called


/vol/www/jboss-mywebsite/server/webmanager/conf/roles.properties
Fill it with the following content:

wmadmin=wmadmin

More users may be created by running the RFC2617Digest tool and adding the users to the
users.properties and roles.properties file as described above.

1. 1 3 Pl ac i n g t h e co nf ig urat ion .xm l

Place configuration.xml in the /vol/www/mywebsite/configuration/ directory. The


configuration is provided by the software developer. The “NL - GX WebManager 9 - Installation
Linux - commands.txt” file contains a configuration.xml for the host names
www.mywebsite.com and edit.mywebsite.com.

1. 1 4 Se tti n g p er mi s si on s c o rr e ctly

SYS During installation, the root account is used. After installation, it is recommended that you attach
permissions to certain directories, for example:

Tomcat runs under the user/group: tomcat/www


Apache runs under the user/group: apache/www

New users can be created with the ‘adduser’ command. New groups can be creat ed with the
‘groupadd’ command.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 27/64


INSTALLATION in a Linux Production Environment

Assuming the above directory structure, users, and groups, the following UNIX commands can be
used:

# Change the permissions for the Tomcat directory


cd /vol/www/tomcat-mywebsite
chown -R tomcat:www deploy logs work temp
chmod -R guo+r .

# Modify the webdirectory’s settings


cd /vol/www/mywebsite
chown -R tomcat:www .
chmod -R guo+r .

1. 1 5 M a k e t h e h os t na m es r es olv a bl e

SYS The server on which GX WebManager is installed needs to be able to resolve the hostnames that
are used for the edit environment and the external environment of GX WebManager. In the
example the hostnames are “www.mywebsite.com” and “edit.mywebsite.com”. Add the used
hostnames to the file /etc/hosts if the used hostnames don’t resolve to the right IP address on
the server.

1. 1 6 Se tti n g u p r c s cri p ts

SYS All files are now ready and configured correctly: the Application server (Tomcat or JBoss) and
Apache can be started. Make sure that the GX search engine (if necessary), database, Application
server, and Apache automatically start after a system reboot. Make sure that in the rc scripts for
the Application server the directories are being removed that are temporary for the Application
server, before GX WebManager is started.

In case of Tomcat, these directories are:

 Tomcat’s work directory


 The deploy/appBase directory
 Tomcat’s temp directory

For JBoss, empty the next folder before each start:


 The /vol/www/mywebsite/work/osgi directory

An example of rc scripts for Tomcat and the Httpd for Redhat Enterprise Server 4 are included in
the “GXD0060_en - GX WebManager 9 - Installation Linux – commands - yyyymmdd.txt” file.

Starting JBoss can be triggered by issuing the next command:


 /vol/www/jboss-mywebsite/bin/run.sh –b edit.mywebsite.com –c webmanager

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 28/64


INSTALLATION in a Linux Environment

1. 1 7 C o nt r ol l i n g t h e s t a rt up bl oc k m e c h a n ism

By default, GX WebManager blocks login requests from the front-end and back-end while it is
starting up. When you try to log in from the front-end or back end while GX WebManager is still in
the startup phase, the following message displays:

Note: If GX WebManager receives a request for a page from either the front-end and backend
during the startup sequence between the time that the log messages Server startup in <x>
ms and GX WebManager started successfully in <x> ms appear, the following message
will appear in the browser:

 Add the following ‘JAVA_OPTS’ property to the beginning of the GX WebManager block:

-Dwebmanager.startupblock.skip=true

For example:

set JAVA_OPTS=%JAVA_OPTS% -Dwebmanager.startupblock.skip=true -


Djava.awt.headless=true -Dwebmanager.jcr.filemirror=true -
Dwebmanager.clustering.readonly=false -Xms512m -Xmx512m -
XX:MaxPermSize=256m -Xdebug -
Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000

When blocking is turned off, requests from the front-end will return a cached version of
the requested page or a white page with no content when GX WebManager has not
finished the startup process; requests from the backend will show the GX WebManager
login screen, however you will not be able to log in.

 To turn blocking back on, change the ‘true’ declaration to ‘false’. For example:

-Dwebmanager.startupblock.skip=false

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 29/64


INSTALLATION in a Linux Production Environment

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 30/64


INSTALLATION in a Linux Environment

2 HOW TO CREATE AND PR OCESS A DEPLOY

This section explains how to create and process deploys. This is done in the following order:
 Engineer: How to create a deploy;
 Engineer: What items of the deploy should be sent to the system administrator;
 System administrator: How to process the delivered files;
 System administrator: How to perform a rollback if necessary.

2. 1 C re a ti n g t h e d e pl o y

DEV Creating the deploy is accomplished in two steps.

2.1.1 Create a specific settings.xml for the target environment

A deploy is always created with a specific target environment in mind. So, for example, a deploy
can specifically be created for a test environment. For each target environment you need a
separate settings.xml. For a test environment, copy the settings.xml to settings-
test.xml and then adjust the properties in the settings-test.xml file. The typical
properties you should check to ensure they are correct are:
 Pathnames
 Hostnames
 Database properties
 Usernames/passwords

2.1.2 Build the deploy using Maven

After the properties have been set in the target environment, execute the following command in
a DOS shell:

mvn -s settings-test.xml -P build-deploy clean package assembly:assembly

A new folder with the name ‘target’ is created which will contain two folders and one ZIP -file.

2. 2 W h at t o d el i v er t o th e syst e m a d mi ni str at or

DEV After the deploy has been built, a ZIP-file is present in the ‘target’ folder. The default name of
the ZIP-file is “webmanager-webmanager-1.0-SNAPSHOT.zip”. Send the next three files to the
system administrator of the target environment:
1. webmanager-backend-webapp-1.0-SNAPSHOT.war (present in the root of the ZIP-file);
2. webmanager-static-webapp-1.0-SNAPSHOT.war (present in the root of the ZIP-file);
3. Gather all WCBs into one new ZIP-file.
4. All WCBs present in the edition-bundles directory of the unzipped archive.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 31/64


INSTALLATION in a Linux Production Environment

2. 3 H o w t o pr o c es s t h e d e pl oy

SYS After receiving the files from the developer, the system engineer has to take the following steps
to process those files:
 Stop Tomcat.
 To support a rollback, backup the following folders and files:
o /vol/www/tomcat-mywebsite/deploy/webmanager-backend-webapp-1.0-
SNAPSHOT.war
o /vol/www/mywebsite/web-docs/static/
o /vol/www/mywebsite/web-docs/wm/
o /vol/www/mywebsite/web-docs/toolbar/
o /vol/www/mywebsite/work/edition-bundles/
o Also create a backup from your relational database
 Copy webmanager-backend-webapp-1.0-SNAPSHOT.war to /vol/www/tomcat-
mywebsite/deploy
 Unzip the webmanager-static-webapp-1.0-SNAPSHOT.war to
/vol/www/mywebsite/web-docs/ (‘y’ to overwrite ALL)
 Unzip the WCB zip-file to /vol/www/mywebsite/work/deploy (‘y’ to overwrite ALL)
 Remove the WCBs present in the edition-bundles directory.
 Recopy the WCBs that were backed up in the second step above into the
/vol/www/mywebsite/work/edition-bundles/ directory. Use the files in the
edition-bundles directory that were delivered by the engineer.
 Remove the content of the following folders:
o vol/www/mywebsite/work/osgi/*
o vol/www/tomcat-mywebsite/deploy/appBase/*
o Tomcat 5.5/work/*
o Tomcat 5.5/temp/*
o vol/www/tomcat-mywebsite/deploy/appBase
 Start Tomcat.

2. 4 H o w t o r o l l b ac k a d e pl oy

SYS It is possible that GX WebManager will not start correctly after installing a new deploy. Usually
this is caused by incorrect configuration settings. To immediately switch back to the last known
good configuration, perform these steps:
 Stop Tomcat
 Restore the files from the backup:
o Copy webmanager-backend-webapp-1.0-SNAPSHOT.war back to
/vol/www/tomcat-mywebsite/deploy/.
o Copy the ‘static’, ‘toolbar’ and ‘wm’ folder back to
/vol/www/mywebsite/web-docs/.
o Remove all files in the /vol/www/mywebsite/work/deploy/ folder.
o Copy the WCBs back to /vol/www/mywebsite/work/deploy.
 Start Tomcat.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 32/64


INSTALLATION in a Linux Environment

Note: If GX WebManager receives a request for a page from either the front -end and backend
during the startup sequence between the time that the log messages Server startup in <x>
ms and GX WebManager started successfully in <x> ms appear, the following message
will appear in the browser:

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 33/64


INSTALLATION in a Linux Production Environment

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 34/64


INSTALLATION in a Linux Environment

3 MULTIPLE WEBSITES

This chapter describes how to add a new website (also called a ‘webinitiative’ in GX WebManager)
to an existing installation.

3. 1 Ex p a n di n g th e di r e ct or y st r u ct ur e

SYS For each new webinitiative, the directory structure needs to be expanded so the files from the
new webinitiative will have their own place in the total directory structure.

In the directory structure below the new directories are depicted in bold.

/vol/www/tomcat-mywebsite/deploy/appBase
/vol/www/mywebsite/configuration/
/streaming/
/system/
/web-docs/
/work/
/mysecondsite/web-docs/cfg/
/upload/
/upload_mm/
/static/ -> ../../web-docs/static
/wm/ -> ../../web-docs/wm

The Unix commands to create this new structure:

cd /vol/www/mywebsite/
mkdir mysecondsite
mkdir mysecondsite/web-docs
mkdir mysecondsite/web-docs/cfg
mkdir mysecondsite/web-docs/upload
mkdir mysecondsite/web-docs/upload_mm

cd mysecondsite/web-docs
ln –s ../../web-docs/static static
ln –s ../../web-docs/wm wm

cd /vol/www/mywebsite/
chown –R tomcat.www .
chmod –R a+rX .

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 35/64


INSTALLATION in a Linux Production Environment

3. 2 M a k e t h e n e w h os t n a me s r es ol va bl e

SYS The server on which GX WebManager is installed needs to be able to resolve the hostnames that
are used for the edit environment and the external environment of GX WebManager. In the
example the hostnames are “www.mysecondsite.com” and “edit.mysecondsite.com”. Add the
used hostnames to the file /etc/hosts if the used hostnames don’t resolve to the right IP
address on the server.

3. 3 C h a n g e t h e A p a c h e c o n fi g ur ati o n

SYS When adding a new webinitiative to GX WebManager, the configuration of the Apache webserver
also needs to be changed. In the configuration files the new URLs for the website and its edit
environment need to be present. The change is explained for both Apache version 2.0 and version
2.2.

3.3.1 Changes in httpd.conf (Apache 2.0)

For the new webinitiative two new VirtualHost entries need to be added to the httpd.conf
file. For the external environment of the website consider the following:

<VirtualHost *:80>
ServerName www.mysecondsite.com
DocumentRoot "/vol/www/mywebsite/mysecondsite/web-docs/"
ErrorLog logs/www.mysecondsite.com_error.log
CustomLog logs/www.mysecondsite.com_custom.log common
<Directory "/vol/www/mywebsite/mysecondsite/web-docs/">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule mod_jk.c>
JkMount /web/* mywebsite
</Ifmodule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/web/
RewriteRule ^/(.*)\.htm$ /web/$1.htm [P,L]
</IfModule>
</VirtualHost>

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 36/64


INSTALLATION in a Linux Environment

The internal edit environment of the new webinitiative also requires the following additions:

<VirtualHost *:80>
ServerName edit.mysecondsite.com
DocumentRoot "/vol/www/mywebsite/mysecondsite/web-docs/"
ErrorLog logs/edit.mysecondsite.com_error.log
CustomLog logs/edit.mysecondsite.com_custom.log common
<Directory "/vol/www/mywebsite/mysecondsite/web-docs/">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory "/vol/www/mywebsite/mysecondsite/web-docs/wm/b/">
ExpiresActive ON
ExpiresDefault "now plus 10 minutes"
Header set Cache-Control "max-age=600"
</Directory>
<IfModule mod_jk.c>
JkMount /web/* mywebsite
</Ifmodule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/web/
RewriteRule ^/(.*)\.htm$ /web/$1.htm [P,L]
</IfModule>
</VirtualHost>

3.3.2 Changes in httpd-vhosts.conf (Apache 2.2)

SYS For each new webinitiative in GX WebManager, two new VirtualHost entries to httpd-
vhosts.conf are needed. This file is located in the /vol/www/server/conf/extra directory
of Apache. For the external environment of the website add the following:

<VirtualHost *:80>
ServerName www.mysecondsite.com
DocumentRoot "/vol/www/mywebsite/mysecondsite/web-docs/"
ErrorLog logs/www.mysecondsite.com_error.log
CustomLog logs/www.mysecondsite.com_custom.log common
<Directory "/vol/www/mywebsite/mysecondsite/web-docs/">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ProxyPass /web/ ajp://localhost:8009/web/
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/web/
RewriteRule ^/(.*)\.htm$ /web/$1.htm [P,L]
G X</IfModule>
SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 37/64

</VirtualHost>
INSTALLATION in a Linux Production Environment

Example of minimal setup of the VirtualHost for the internal environment of GX WebManager:

<VirtualHost *:80>
ServerName edit.mysecondsite.com
DocumentRoot "/vol/www/mywebsite/mysecondsite/web-docs/"
ErrorLog logs/edit.mysecondsite.com_error.log
CustomLog logs/edit.mysecondsite.com_custom.log common
<Directory "/vol/www/mywebsite/mysecondsite/web-docs/">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory "/vol/www/mywebsite/mysecondsite/web-docs/wm/b/">
ExpiresActive ON
ExpiresDefault "now plus 10 minutes"
Header set Cache-Control "max-age=600"
</Directory>
ProxyPass /web/ ajp://localhost:8009/web/
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/web/
RewriteRule ^/(.*)\.htm$ /web/$1.htm [P,L]
</IfModule>
</VirtualHost>

3. 4 C o mm u ni c a te t e c h ni c al d et ails to the S o ft w ar e
D ev el o p er

SYS The Software Developer needs the following details from the System Administrator:

 Hostname of the website and the edit environment (in the example from this document
this would be www.mysecondsite.com and edit.mysecondsite.com);
 The DocumentRoot of the new website (in the example from this document this would be
/vol/www/mywebsite/mysecondsite/web-docs/).

3. 5 R e q u est n e w co nfi gura tio n.x ml

DEV The configuration.xml contains a list of hostnames which will be supported by GX


WebManager. The new hostnames for the new webinitiative have to be present in the
configuration.xml otherwise it’s not possible to create the new webinitiative in GX
WebManager.

The Software Developer requests from GX a new configuration.xml; he or she then


communicates the new hostnames that GX WebManager has to support.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 38/64


INSTALLATION in a Linux Environment

After the Software Developer has received the new configuration.xml from GX, he or she will
send this file to the System Administrator.

3. 6 Pr o c ess th e n e w c onfi gur ati on. xm l

SYS The System Administrator saves the new configuration.xml over the old one. Based on the
directory structure in this document, the new configuration.xml has to be saved to
/vol/www/mywebsite/configuration/.

3. 7 C re a t e t h e n e w w e bi niti a ti v e wit hi n GX W e b Ma n a g er

DEV The Software Developer can now create the new Webinitiative within GX WebManager. GX
WebManager has a wizard for creating the new webinitiative. In step 2 of this wizard, technical
details are requested, therefore it’s a good idea to gather this information before starting the
wizard. The required details are:

Fieldname in step 2 How to determine the value of this field


Hostname The hostname of the website (e.g. www.mysecondsite.com)
Generator The hostname of the edit environment (e.g.
edit.mysecondsite.com)
Default e-mail address Default e-mail for sending e-mails.
Folder for uploads Folder where the uploads (e.g. images) will be placed. This is the
DocumentRoot directory plus ‘upload’. In the example from this
document this would be
/vol/www/mywebsite/mysecondsite/web-docs/upload/.
Upload URL Based on the previous foldername this would be ‘/upload/’.
Folder for multimedia Multimedia files (Files that are stored within the Media Repository)
uploads are stored in the ‘upload_mm’ folder. This is the DocumentRoot
directory plus ‘upload_mm’. In the example from this document this
would be /vol/www/mywebsite/mysecondsite/web-
docs/upload_mm/.
Multimedia Upload URL Based on the previous foldername this would be ‘/upload_mm/’.
Descriptor folders These folders contain the presentation JSPs. GX WebManager scans
these folders in search for new, changed, or deleted presentations.
The folders need to be separated with a semicolon (;). The default
value for this property is “/WEB-INF/project/;/WEB-INF/wm/jsp”. If
you want to ignore the default presentations from GX WebManager
and just use your own presentation WCB, then you can enter a value
for it, for example: “/WEB-INF/project/<classname of your
presentation WCB>”. The exact folder name of your deployed WCB
can be looked up in /vol/www/tomcat-
mywebsite/deploy/appBase/web/WEB-INF/project/.
Redirect base directory The same as the DocumentRoot from Apache. In the example from
this document this would be
/vol/www/mywebsite/mysecondsite/web-docs/.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 39/64


INSTALLATION in a Linux Production Environment

With the details from the previous table at hand, perform the following tasks in GX WebManager
to create the new webinitiative:
 Log into GX WebManager with a user that has either a Developer or Administrator role.
 Navigate to Configure > Web Initiative Configuration.
 At the top of this window there is a pulldown named ‘Select website’. Select the option
‘<New website>’ to create a new website. If this option is not available, then the license
doesn’t allow creating any more websites. Contact GX to buy the license for an
additional website and to obtain a new configuration.xml.
 After selecting the ‘<New website>’ option, a wizard appears. Follow the steps in this
wizard. Based on the example values from this document, the steps in the wizard look
like this:

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 40/64


INSTALLATION in a Linux Environment

After the successful conclusion of the wizard, a new webinitiative will be created within GX
WebManager. This webinitiative contains one page: the Homepage. Log into the new webinitiative
with the Developer or Administrator user and create new users.

In the used examples from this document, the login URL for the new webinitiative would be:

http://edit.mysecondsite.com/web/edit

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 41/64


INSTALLATION in a Linux Production Environment

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 42/64


INSTALLATION in a Linux Environment

4 DISTRIBUTED WEBMANAG ER

SYS With a standard setup of GX WebManager, the GX WebManager application will be installed on a
single server. There are many reasons to divide the GX WebManager application across more than
one server:

 Performance: the capacity of the server (which generates pages for visitors of the
website and is used by the editors) is insufficient.
 Security: from security point of view, it can be decided to put the edit environment on a
different server than the servers which generate pages for the site visitors.
 Fail-over: to prevent the website from becoming unreachable when one server gets
offline, multiple servers can be configured to ensure the website keeps running.

This section describes which actions should be taken to “remodel” standard GX WebManager setup
to distributed setup. The ultimately achieved architecture can be represented as in following
picture:

Load
balancer
HTTP HTTP

Slave 1 Slave n
(host: www01) (host: www0n)

HTTP Servers with GX WebManager


installed
Read Read

Master
(hostname: edit01)

Read +
Write

Content storage (JCR)

In the above picture all the GX WebManager installations are identical. The only difference
between the Master and the Slaves is that the Master has write permissions to the JCR and the
Slaves only have read access to the JCR. The dashed arrow between the Load balancer and the
Master server represents the choice that has to be made about the Master: will it also serve page s
to visitors of the website, or will it only be available to Editors of GX WebManager?

The next sections describe how to configure the GX WebManager servers, in order to achieve the
above mentioned architecture.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 43/64


INSTALLATION in a Linux Production Environment

4. 1 GX W e b Ma n a g er di stri b ut e d s e t up i n a n uts h ell

SYS Basically, the installation of GX WebManager on a node in a distributed setup is the same as
installing GX WebManager in a non-distributed setup. The differences are in three areas:

1. Database configuration

2. Whether the GX WebManager instance has write access to the JCR or not

3. The sharing of static content.

To setup a clustered environment, take the following steps:

 Setup the master node in the cluster just like it is a standalone setup; there are two
differences to setup a master node compared to a standalone setup:

1. Change the settings.xml to make use of the clustered behavior;

2. Setup synchronization of static files from the master to the slaves;

 The setup of each slave node is identical to setting up the master node, except for:

o The database is already in place: actions related to creating the database


shouldn’t be performed anymore.

o In the settings.xml a node-specific identifier has to be entered.

o One startup parameter of Tomcat has to change to make sure that the node only
has read access to the database.

 Check the firewall settings;

 Start the cluster.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 44/64


INSTALLATION in a Linux Environment

4. 2 C o n fi g ur e s ett ing s .xml fil e s

SYS There are three settings, which need to be changed / checked in the settings.xml file on each
server in the clustered setup: <activeProfiles>, <webmanager.clustering.id> and
<webmanager.clustering.readonly>.

4.2.1 Clustering-specific settings for the master

SYS In the settings.xml of the master server change / check the next properties:

 The <activeProfiles> database parameter must be changed from “standalone” into


“clustered”, e.g. <activeProfile>jcr-clustered-mssql</activeProfile>
instead of <activeProfile>jcr-standalone-mssql</activeProfile> if a MS-SQL
database is used. The same applies to MySQL and Oracle setups. If the profile is switched
to, for example, jcr-clustered-mssql then make sure the properties of that profile
have the correct values.
 Check the webmanager.cluster.syncDelay parameter (should be set to 500).
 Set the clustering ID of this node. Choose a unique ID compared to all other IDs in the
cluster. If each node in the cluster has its own unique hostname then this is a good ID to
use. In the example of this document this would be:
<webmanager.clustering.id>edit01</webmanager.clustering.id>
 Be sure the readonly setting is set to false (this is the default setting, but check
anyway):
<webmanager.clustering.readonly>false</webmanager.clustering.readonly>

Finish the configuration of the server like an ordinary GX WebManager server:

mvn –s settings.xml –P configure-jcr-repository

4.2.2 Clustering-specific settings for the slaves

Once the master is running properly, use the settings.xml of the master for each slave node. Two
properties in the settings.xml of the master have to be changed for each node:

 The “clustering.id”, which defines the clustering ID of this node. Choose a unique ID
compared to all other IDs in the cluster. If each node in the cluster has its own unique
hostname then this is a good ID to use. In the example of this document this would be:
<webmanager.clustering.id>www01</webmanager.clustering.id>
 Check the webmanager.cluster.syncDelay parameter (should be set to 500).
 For each slave node, set the “clustering.readonly” setting to true:
<webmanager.clustering.readonly>true</webmanager.clustering.readonly>

Finish the configuration of the server like an ordinary GX WebManager server:

mvn –s settings.xml –P configure-jcr-repository

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 45/64


INSTALLATION in a Linux Production Environment

4. 3 M a k e s t a ti c c o nt e nt a va il ab le f o r all se rv ers

SYS When an editor places an image on a page within GX WebManager, this image will initially be only
available on the master server. Some sort of mechanism has to be configured in order to make the
static content (such as images) available to all slave servers. The next directories need to be
synchronized from the master to all the slaves:

/vol/www/mywebsite/configuration
/web-docs

In general, for synchronization of the files there are two mechanisms in use: Rsync and NFS.

4.3.1 Rsync 3

The Wikipedia page of Rsync describes Rsync as follows:

‘Rsync is a free software computer program for Unix systems which synchronizes
files and directories from one location to another while minimizing data transf er
using delta encoding when appropriate’

After configuration of Rsync three things come into play:

1. All files of the master server are copied to the slave servers.
2. It may take a while before a file from the backend server can be copied to the frontend
servers; this is important for the editors, they might see a ‘broken image’ shortly on one
of the frontend servers.
3. If you call rsync regularly from a cronjob, then make sure you only start rsync if the
previous run has finished.

Read the Wikipedia pages 2 for more information about Rsync (downloads, documentation, etc).

4.3.2 NFS (Network File System) 4

The Wiki page of NFS describes NFS as follows:

‘A network file system is a file system that supports sharing of files, printers and
resources in the form of persistent storage over a network’

After configuration of NFS, the data will be available on one central place: both master and slave
servers use this data. This has the advantage, that a generated file will be available immediately
to all servers. The disadvantage of NFS is the introduction of a (new) single point of failure.

Read the Wikipedia pages 3 for more information about NFS (downloads, documentation, etc).

3
http://en.wikipedia.org/wiki/Rsync
4
http://en.wikipedia.org/wiki/Distributed_file_system

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 46/64


INSTALLATION in a Linux Environment

4. 4 C h a n g e st a rt u p s cr ipt o f T om c a t / JB oss

SYS The Tomcat on every server needs to know if it should startup as a master or slave. This can be
set in the /vol/www/tomcat-mywebsite/bin/catalina.sh. Underneath the first block of
comment lines, there are already a few lines about the JAVA_OPTS parameter (see section 1.5 in
which the lines were added). Check the line on the webmanager.clustering.readonly
property.

In case of the master set this to:

JAVA_OPTS="${JAVA_OPTS} –Dwebmanager.clustering.readonly=false"

In case of a slave set this to:

JAVA_OPTS="${JAVA_OPTS} –Dwebmanager.clustering.readonly=true"

4. 5 C h e c k fi r e w al l se t tin gs

SYS In many configurations, firewalls are placed between the servers. Below is an overview of the
necessary connections to ensure a correct working of GX WebManager:

From To Protocol Description


master + database DB Connection from the master and slave servers to
slaves protocol the database server to make queries.
master slave NFS / To publish files to the slaves, which have been
Rsync entered at the master.
Internet slave http To handle the page requests.

Intranet + master http To access the master (editor’s) server.


VPN

4. 6 St art a l l n o de s i n t h e cl ust e r

SYS Start GX WebManager on the master server. Wait until all services have started, then start the
slave servers. Although it is possible to start simultaneously, the slaves might start a bit earlier
than the master and thus generate errors in the log. Make sure the whole setup starts again after
a reboot.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 47/64


INSTALLATION in a Linux Production Environment

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 48/64


INSTALLATION in a Linux Environment

5 UPGRADING GX WEBMANA GER

This section describes how to upgrade a single GX WebManager server in a production


environment. The next section describes how to upgrade a clustered environment.

5. 1 U p gr a di n g GX We b M a n a g er o n a si n gl e s e rv er

Upgrading the website to a new version of GX WebManager is a similar process to installing a new
deploy. This section describes the steps required to upgrade your website to a new version of
GX WebManager.

5.1.1 Create a new deploy & request a new configuration.xml


DEV First, a new deploy needs to be created. This is typically done by the software developer. See
sections Creating the deploy and What to deliver to the system administrator in this document for
information on creating a deploy and what items to deliver to the system administrator.

Apart from the files as mentioned in What to deliver to the system administrator, you also have to
deliever a new configuration.xml file to the system administrator. Contact GX to receive a
new configuration.xml file.

5.1.2 Process the deploy


SYS After receiving the files from the developer, the system administrator performs the following
tasks to process the deploy and the configuration.xml:

 Make a backup copy of the configuration.xml file — The location of


configuration.xml is set by the property <webmanager.configfilename> in your
settings.xml file.
 Copy the new configuration.xml over the old one in <webmanager-
root>\configuration\.
 Perform the steps as described in section How to process the deploy.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 49/64


INSTALLATION in a Linux Production Environment

5. 2 U p gr a di n g GX We b M a n a g er i n a cl us t er e d e nvi r o nm e nt

Upgrading GX WebManager in a clustered production environment is very similar to upgrading a


standalone version of GX WebManager except that there are multiple instances of GX WebManager
that must be upgraded (master and one or more slaves) and these must be upgraded in a specific
order. To upgrade a clustered GX WebManager deployment, follow these steps:

 Stop GX WebManager on all slave machines.


 Stop GX WebManager on the master.
 Upgrade GX WebManager on the master and all slaves by following the steps in the
previous section Upgrading GX WebManager on a single server.
 Start GX WebManager on the master. Important: Be sure to wait until GX WebManager
has completely started on the master before starting the slaves. GX WebManager is
completely started when the following messages appears in the Tomcat log:
26-jan-2010 13:05:35 nl.gx.webmanager.startup.impl.Startup start
INFO: GX WebManager started successfully in x ms
 Start GX WebManager on each slave.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 50/64


INSTALLATION in a Linux Environment

6 APPENDIX A: MODIFYING SETTINGS.XML

This addendum explains how GX WebManager’s settings.xml file should be modified to fit the
GX WebManager installation. The modifications are divided into three parts:

 General settings

 Database settings

The settings.xml file is located in the root of the GX WebManager installation


(/vol/www/webmanager-mywebsite) and can be modified with a text editor.

6. 1 M o di fyi n g t h e g e n e ral s etti n gs

Property name: activeProfile


Default value: externaldb-mssql
New value: externaldb-mysql
Explanation: Profiles can be defined in the settings.xml. The activeProfile property allows
you to indicate which profiles are loaded when the settings.xml is read. Part of the data is not
stored in the JCR but directly in a relational database. This property is used to indicate which
database type should be used. Possible values: externaldb-mssql, externaldb-mysql, and
externaldb-oracle.

Property name: activeProfile


Default value: jcr-standalone-derby
New value: jcr-standalone-mysql
Explanation: Various storage mechanisms can be selected to store data in the JCR . By default,
data is stored in the Apache Derby 5 database. Possible values: jcr-standalone-derby, jcr-
standalone-mssql, jcr-standalone-mysql, jcr-standalone-oracle, jcr-
clustered-mysql, jcr-clustered-mssql and jcr-clustered-oracle.

Property name: webmanager.project.basedir


Default value: C:/GX-WebManager/WM91/yoursite
New value: /vol/www/webmanager-mywebsite
Explanation: This is the directory that contains the GX WebManager release. This directory is
actually a temporary directory: After a successful build of GX WebManager, this directory is
deleted.

Property name: webmanager.project.name


Default value: Your site
New value: This is the name of MyWebsite

5
http://db.apache.org/derby/

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 51/64


INSTALLATION in a Linux Production Environment

Property name: webmanager.project.description


Default value: Your site
New value: This is the description of MyWebsite

Property name: webmanager.project.url


Default value: http://www.yoursite.nl
New value: http://www.mywebsite.com

Property name: webmanager.portnr


Default value: 8080
New value: 80
Explanation: This is the port number that allows access to the website in a browser. In a
production environment, the Tomcat environment will only be available via the AJP protocol (in
this sample installation on port 8009). The Apache web server catches the HTTP requests on port
80 and, if necessary, forwards them to GX WebManager which runs in Tomcat. The communication
between Apache web server and Tomcat runs via the AJP protocol (on port 8009).

Property name: webmanager.frontendservername


Default value: 127.0.0.1
New value: www.mywebsite.com
Explanation: The server name that allows access to the external GX WebManager environment.
This is the URL the website visitor will access.

Property name: webmanager.backendservername


Default value: localhost
New value: edit.mywebsite.com
Explanation: The server name that allows access to the internal GX WebManager environment.
The editor will use this address to log in to GX WebManager.

Property name: webmanager.admin.username


Default value: Administrator
New value: wmadmin_user
Explanation: In GX WebManager, it is possible to access a form of logging to analyze what happens
on the website. The access to this log is limited to the user defined in this property. This user
should also be defined in the admin-users.xml file (see Section 0). The address where the log
is shown: http://www.mywebsite.com/web/admin/log.

Property name: webmanager.admin.password


Default value: CHANGEMECHANGEME
New value: MyPassword
Explanation: Password for the user defined above (“wmadmin_user”).

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 52/64


INSTALLATION in a Linux Environment

Property name: webmanager.workbasedir


Default value: ${webmanager.project.basedir}/work
New value: /vol/www/mywebsite/work
Explanation: Temporary files and directories created while GX WebM anager is running are located
here. When GX WebManager is restarted, a number of these directories need to be deleted. These
directories are listed in the rc scripts of Tomcat’s start/stop (see “GXD0060_en - GX WebManager
9 - Installation on Linux – commands - YYYYMMDD.txt” that comes with this document).

Property name: webmanager.staticbasedir


Default value: ${webmanager.project.basedir}/webmanager-webapps/webmanager-
static-webapp/target/${webmanager.project.artifactId}-static-
webapp-${webmanager.project.version}
New value: /vol/www/mywebsite/web-docs
Explanation: The location for all the static content (images and style sheets that determine the
website’s design).

Property name: webmanager.backendbasedir


Default value: ${webmanager.project.basedir}/webmanager-webapps/webmanager-
backend-webapp/target/${webmanager.project.artifactId}-backend-
webapp-${webmanager.project.version}
New value: no-backenddir
Explanation: Contains a reference to the location of the GX WebManager application. Becaus e the
setup of the environment is based on WAR files, this parameter can be disabled. This is done by
entering the ‘no-backenddir’ value.

Property name: webmanager.bundledir


Default value: [empty]
New value: Tomcat: leave it empty. For JBoss: set it to:
${webmanager.osgidirectory}/platformbundles
Explanation: Set the bundledir to ${webmanager.osgidirectory}/platformbundles for deployment
on application servers that unpack the application archive to a temporary directory on each
startup. E.g. JBoss.

Property name: webmanager.configfilename


Default value: ${webmanager.backendbasedir}/WEB-INF/siteworks/configuration.xml
New value: /vol/www/mywebsite/configuration/configuration.xml
Explanation: The reference to GX WebManager’s configuration file. Whi ch license components are
available for which host names is determined in this file.

Property name: webmanager.cleansitelocation


Default value: ${webmanager.project.basedir}/webmanager-
cleansite/target/${webmanager.project.artifactId}-cleansite-
${webmanager.project.version}.jar
New value: /vol/www/mywebsite/system/${webmanager.project.artifactId}-
cleansite-${webmanager.project.version}.jar

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 53/64


INSTALLATION in a Linux Production Environment

Explanation: The reference to GX WebManager’s clean site. The clean site is a file that contains
the default GX WebManager design. After the clean site is read, GX WebManager is ready. The
clean site includes a web initiative, a home page, a workflow, users, etc.

Property name: webmanager.streamingfiledir


Default value: ${webmanager.backendbasedir}/WEB-INF/streaming
New value: /vol/www/mywebsite/streaming
Explanation: The streaming directory contains files uploaded in GX WebManager and requiring
authorization. These files cannot just be placed in a public web directory.

Property name: webmanager.smtphost


Default value: smtp.gx.nl
New value: smtp.mywebsite.com
Explanation: This property contains the SMTP server used to send all outgoing e -mails. Example of
e-mails sent by GX WebManager:
 Responses to forms completed on the website
 Newsletters
 Alerts to editors

Property name: webmanager.springproperties.filename


Default value: classpath:webmanager.properties
Explanation: This property points to the files used by the Spring framework (see the file
<webmanager-root>\webmanager\webapps\backed\WEB-INF\springmvc-servlet.xml). The
properties file can be pointed to in two ways:

 By setting a Java system property with the name ‘webmanager.properties.filename that


points to the location of the file webmanager.properties, for example:

<webmanager.springproperties.filename>classpath:webmanager.
properties</webmanager.springproperties.filename>

 By explicitly pointing to the location of the file on the file system if the properties file is
located outside of the GX WebManager deployment, for example:

<webmanager.springproperties.filename>file:/vol/www/mywebsite/condig
uration/spring/webmanager.properties</webmanager.springproperties.fi
lename>

Property name: webmanager.editiondir


Default value: ${webmanager.backendbasedir}/work/edition-bundles
Explanation: This property points to the directory containing the GX WebManager WCBs.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 54/64


INSTALLATION in a Linux Environment

6. 2 M o di fyi n g t h e d at a b as e s e tti n gs

6.2.1 Navigating to the DB-specific part in settings.xml

During the configuration of the general activeProfile property, which profiles should be used for
the database are indicated. This manual uses MySQL as a database, so only the MySQL-specific
profiles (externaldb-mysql and jcr-standalone-mysql) are modified.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 55/64


INSTALLATION in a Linux Production Environment

6.2.2 Modifying the externaldb properties

Property name: webmanager.externaldb.dbhost


Default value: localhost
New value: 127.0.0.1
Explanation: The host for the database.

Property name: webmanager.externaldb.dbport


Default value: 3306
New value: 3306
Explanation: Port number for the database.

Property name: webmanager.externaldb.dbname


Default value: webmanager9
New value: wm9mywebsite
Explanation: The name of the database for storing all external data.

Property name: webmanager.externaldb.dbuser


Default value: root
New value: root
Explanation: The user who has database rights.

Property name: webmanager.externaldb.dbpassword


Default value: admin
New value: myDBpassword
Explanation: The database user’s password.

6.2.3 Modifying the jcr database properties

Property name: webmanager.jcr.dbhost


Default value: localhost
New value: 127.0.0.1
Explanation: The host for the database.

Property name: webmanager.jcr.dbport


Default value: 3306
New value: 3306
Explanation: The port number for the database.

Property name: webmanager.jcr.dbname


Default value: webmanager9
New value: wm9mywebsite
Explanation: The name of the database where all the JCR data is stored.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 56/64


INSTALLATION in a Linux Environment

Property name: webmanager.jcr.dbuser


Default value: root
New value: root
Explanation: The user connecting to the database.

Property name: webmanager.jcr.dbpassword


Default value: admin
New value: myDBpassword
Explanation: The database user’s password.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 57/64


INSTALLATION in a Linux Production Environment

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 58/64


INSTALLATION in a Linux Environment

7 APPENDIX B: COMMON I SSUES

7. 1 My S QL d i f f er e n c e b et w e e n Wi n d o ws a n d Li n u x

Some problems can occur if development takes place with a MySQL server that runs on Windows.
By default, the MySQL server in Linux uses case-sensitive table names while the MySQL server in
Windows has been set to save table names as case-insensitive.

This problem can be solved two different ways:

1. Make the Windows MySQL installation case-sensitive. This can be done by adding
lower_case_table_names=2 to my.ini (located in the root of the MySQL
installation). This option has to be set before GX WebManager is installed on the
database. If the GX WebManager database has been created, use the second option
(below).

2. Set the Linux MySQL installation to case-insensitive. This can be done by adding
lower_case_table_names=1 to /etc/my.cnf. If the database already contains
databases, they have to first be dumped. Next, the variable has to be set, and then the
databases (including the ones from the ZIP file) can be read.

7. 2 GX W e b Ma n a g er ed it e n vir o n me n t d o e s n o t r es p o n d f ast

When the edit environment does not respond fast, check the next settings.

7.2.1 KeepAlive of Apache httpd

The KeepAlive option in Apache httpd makes sure that when a client makes multiple requests
really fast after each other, the connection stays ‘alive’ during handling all these requests. This
really saves a lot of overhead between the server and the browser. Check the settings of the next
parameters and set them to the next values:

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5

These settings can be found in a configuration file of Apache httpd:


 Httpd 2.0: /vol/www/server/conf/httpd.conf
 Httpd 2.2: /vol/www/server/conf/extra/httpd-default.conf

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 59/64


INSTALLATION in a Linux Production Environment

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 60/64


INSTALLATION in a Linux Environment

8 APPENDIX C: EXPLANATION ON THE JAVA_OPTS

PARAMETERS

In the catalina.sh of Tomcat, a number of parameters are set through the JAVA_OPTS setting.
This appendix gives an explanation on those parameters.

For specific environments, these values of the parameters can be tailored to the corresponding
requirements. For a full description of the VM options see
http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp

8. 1 G e n er al p ar a m e t er s

8.1.1 -server

The client system is optimal for applications which need fast startup times or small footprints.
The server system is optimal for applications where the overall performance is most important.
Since startup is less important to WebManager than overall performance, the server system should
be used.

8.1.2 -Duser.language=en and -Duser.country=US

These two options set the ‘locale’ of the VM and are mostly used to avoid problems while running
on the Oracle database. The Oracle server is mostly installed with the “en_US” locale. If the VM
(in which GX WebManager is running) communicates with the Oracle server, it uses by default the
locale of the Operating System. If that locale is set to, for example, “nl_NL” then problems might
arise with date formats. To avoid any issues it’s best to set the locale of the VM to “en_US” and
install the Oracle server with that locale too.

8.1.3 –Xmx1024m

This option sets the maximum heap size the Java virtual machine. WebManager uses memory for
caching content from the database. A low value for this option can cause excessive garbage
collection overhead and a lot database accesses. This option should be tuned based on the
performance requirements of the application like number of concurrent users and the size of the
content.

If more memory is assigned to WebManager, more content can be cached in memory and the
overhead of database access can be avoided.

Assigning more memory to the VM will generally improve the performance. However, (excessive)
swapping should be avoided as much as possible. Another drawback of a large heap is the fact
that a Full garbage collection will take more time. If the garbage collector uses a stop -the-world
garbage collection policy, WebManager will be unresponsive for a longer period of time.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 61/64


INSTALLATION in a Linux Production Environment

8.1.4 –Xms512m

Setting the minimum heap size can improve startup time.

8.1.5 -XX:MaxPermSize=128m

WebManager can load a large number of classes, especially if there are large jar files included in
OSGi bundles. Other reasons for the existence of many files are JSPs or th e use of XSLTC, since
these technologies generate classes on the fly.
Classes are stored in the permanent space of the virtual machine. If there are too many classes in
this space, then a Full Garbage collect will be performed to clean up unused classes. I f this occurs
too often, the performance of the web application will suffer.

If there are more classes than can be fit in the Permanent Space, the VM will perform many Full
Garbage collects and finally throw an OutOfMemoryError: PermGen space, which can result in all
types of faulty behavior.

8.1.6 -Djava.awt.headless=true

This option should be set to make sure the server is able to manipulated images without the
presence of a display.

8.1.7 -Dsun.net.inetaddr.ttl=300

This option determines the number of seconds that the result of a hostname lookup should be
cached in the JVM. The default behavior of the JVM is to cache it until a restart. This, however, is
not desirable on a production environment. By adding this parameter with the value 300, the
result of the hostname lookups stay cached for 5 minutes.

8. 2 G ar b a g e c ol l e ct or p ar a m et ers

The garbage collection algorithm should be tuned to the characteristics of the WebManager
application. WebManager caches content in memory. The content is stored in the tenured space.
Cleaning up this tenured space would usually require a Full garbage collect.

Long, stop-the-world garbage collection pauses should be avoided as much as possible. A long
pause does not only make the site unresponsive, it also causes clients to send duplica te requests
and causes a build-up of open requests on the server.

Stop-the-world pauses can be minimized by using the concurrent mark sweep collector. It
performs most garbage collection activity concurrently, i.e., while the application threads are
running, to keep garbage collection-induced pauses short. This is especially useful if there are
unused processors available on the server.
A slight drawback of this collector is that garbage collection uses some more CPU instructions.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 62/64


INSTALLATION in a Linux Environment

8.2.1 -XX:+UseConcMarkSweepGC

The concurrent mark sweep collector should be activated using the command -line option
-XX:+UseConcMarkSweepGC

8.2.2 -XX:+UseParNewGC

The new generations can be collected in parallel.

8.2.3 -verbose:gc

The overhead of the garbage collector can be measured and logged by setting the VM option:
-verbose:gc. The duration of the garbage collections are logged in the Tomcat catalina.out.
If the overhead becomes a problem, this log can be used for analyzing and tuning the garbage
collector.

8.2.4 -Dsun.rmi.dgc.client.gcInterval=600000

The content of WebManager is indexed by the WebManager search engine. This search engine is a
separate application which runs in its own virtual machine. RMI is used as the protocol for
communication between the WebManager server and the search engine.
RMI forces periodical Full garbage collections, to make sure all objects in the distributed
environment can be freed. The default interval for this is one minute, which leads to a stop -the-
world full garbage collect every minute. Especially for large heaps this will be a major
performance issues.
Setting this interval to ten minutes will not cause any problems, since the number of RMI calls and
the corresponding garbage is limited. If the full garbage collects still cause problems, this value
could be changed to one hour, e.g. 3600000.

8.2.5 -XX:+HeapDumpOnOutOfMemoryError

If a WebManager application in some cases throws an OutOfMemoryError and profiling locally


doesn’t solve the problem, the VM can be instructed to dump the contents of the heap to disk f or
analysis. This option should not be turned on by default on production environments, since
dumping the heap is stop-the-world and may take a long period of time.

8.2.6 -XX:-ReduceInitialCardMarks

A flaw in the implementation of a card-marking performance optimization in the JVM can cause
heap corruption under some circumstances. This issue affects the CMS garbage collector prior to
6u18, and the CMS, G1 and Parallel Garbage Collectors in 6u18. The serial garbage collector is not
affected. Applications most likely to be affected by this issue are those that allocate very large
objects which would not normally fit in Eden, or those that make extensive use of JNI Critical
Sections (JNI Get/Release*Critical).

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 63/64


INSTALLATION in a Linux Production Environment

8.2.7 -Dorg.apache.jasper.runtime.JspFactoryImpl.USE_POOL=false"

This system property disables Tomcat JSP Custom Tags pooling which can cause memory leaks in
GX WebManager.

GX SOFTWARE B.V. e-mail info@gxsoftware.com http://www.gxsoftware.com/ 64/64

Das könnte Ihnen auch gefallen