You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

This topic describes how to set up an XperienCentral installation in a Windows 2008 and 2012 production environment. The result is that all requests for static content (images, style sheets, and so forth) are handled through the web server and requests for dynamic content (XperienCentral’s HTML) are forwarded by the web server to XperienCentral which processes the requests. In this topic, an environment will be created with two host names:

External host name: www.mywebsite.com

Internal host name:  edit.mywebsite.com


In This Topic


The Directory Structure

After installing XperienCentral, a directory structure is created. You are free to choose your own structure, but GX Software recommends the following:

 

<XperienCentral-root>\configuration Contains configuration.xml
                     \deployContains the WM deploy (.war file)
                     Contains the unpacked WM deploy
                     \streaming Website downloads
                     \system System files
                     \work\deploy Directory for deploying plugins
                           \edition-bundlesContains the plugins
                           \jcrContains the JCR config and index
                           \osgiContains the cache for OSGI bundles
                     \wwwroot\mywebsite\cfgFlash elements configuration
                                       \wm
XperienCentral files

 

 

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. The others will be created later in this topic.

 

Back to top

 


Java Development Kit and Apache Maven

To use Tomcat, Java has to be installed. The Java Development Kit has to be installed before installing XperienCentral. The version made available by Oracle is used which is not the same version that comes with some Microsoft products. Use Java version 8 (official support for Java 7 ended in April 2015)

To install XperienCentral, Apache Maven is required. Apache Maven is used to build XperienCentral based on the system-specific settings in the settings.xml. Download the Maven ZIP file from http://archive.apache.org/dist/maven/binaries/. Download the latest release of version 3.3.xx (do not use the 4.x.xx versions of Maven). Unzip the ZIP-file into D:\Program Files\. After unzipping, Maven will be installed in:

<drive>:\Program Files\apache-maven-3.3.xx

Follow the instructions in the Maven readme.txt for further steps you must perform.


Setting the Environment Variables

A number of environment variables should be set in order to work with the JDK:

  1. Right-click “My Computer” and select “Properties”.
  2. Select the [Advanced] tab.
  3. Click the [Environment Variables] button.
  4. Click the bottom [New] button to create a new JAVA_HOME system variable.
  5. Add the path to the Java 8 JDK bin directory to the Path system variable.
  6. Save and close the System Properties window.

 

If in the "System Properties" window the value is too long, the complete path is not visible. To see the complete values, the path and/or set command can be executed in a Command prompt.

 

 

Back to top

 


Install and Configure Apache Tomcat

XperienCentral is written in Java and requires a servlet container to run. Apache Tomcat is such a servlet container in which XperienCentral can operate.

Install Tomcat

Download Tomcat from http://tomcat.apache.org/download-70.cgi (download the Windows Service Installer). Double-click the downloaded file (apache-tomcat-7.0.25.exe for example) and then follow the wizard to install Tomcat.

Configure Tomcat

After Tomcat is installed, it requires configuration adjustments to make it fit for XperienCentral.

Change the Startup Parameters

To change the startup parameters of Tomcat, double-click the “Monitor Tomcat” icon in the system tray. If the icon is not present, then activate it. In Windows 2008 use the the Start menu:

                Start > All Programs > Apache Tomcat 7.0 > Monitor Tomcat

In Windows 2012, navigate to the Start screen and then select “Monitor Tomcat”.

  1. After activating the Monitor, a pop-up appears. Switch to the [Java] tab.
  2. Set “Initial memory pool” to 512 and the “Maximum memory pool” to 1024. These are the recommended defaults. However, if performance is too slow, increasing these values might improve the performance.
  3. Add the following next lines to the “Java Options” input field:

 

-Dsun.rmi.dgc.server.gcInterval=600000
-Dsun.rmi.dgc.client.gcInterval=600000
-Duser.language=en
-Duser.country=US
-XX:+UseConcMarkSweepGC
-Djava.awt.headless=true
-Dwebmanager.clustering.readonly=false
-Dsun.net.inetaddr.ttl=300
-Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
-XX:-ReduceInitialCardMarks
-Dorg.apache.jasper.runtime.JspFactoryImpl.USE_POOL=false
-Dwebmanager.clustering.id=x
-Djava.net.preferIPv4Stack=true
-Dfile.encoding=UTF8

 

Disable the User Account Control (UAC) Settings

When the User Account Control (UAC) settings are turned on, Tomcat (and the Tomcat Configuration Utility) will not start properly. There is a difference in how to switch the UAC off between Windows 2012, Windows 2008 and Windows 2008 R2.

Windows 2012

  • Press the Windows key and then click “Control Panel”.
  • In “Control Panel”, click “System and Security”.
  • In the “System and Security” window, click “Change User Account Control settings”.
  • Move the security slider to the bottom (“Never notify”).
  • Save this setting and restart the Tomcat server or computer.

Windows 2008 R2

  • Click “Start”, and then click “Control Panel”.
  • In “Control Panel”, click “System and Security”.
  • In the “System and Security” window, click “Change User Account Control settings”.
  • Move the security slider to the bottom (“Never notify”).
  • Save this setting and restart the Tomcat server or computer.

Windows 2008

  • Click “Start”, and then click “Control Panel”.
  • In “Control Panel”, click “User Accounts”.
  • In the “User Accounts” window, click “User Accounts”.
  • In the “User Accounts” tasks window, click “Turn User Account Control on or off”.
  • If UAC is currently configured in Admin Approval Mode, the “User Account Control” message appears. Click “Continue”.
  • Clear the “Use User Account Control (UAC) to help protect your computer” check box, and then click “OK”.
  • Click “Restart Now” to apply the change right away

 

Create a New server.xml

The applications Tomcat starts are defined in the server.xml. After installing Tomcat using the installer, Tomcat will not start XperienCentral. Follow the steps below to make sure that Tomcat starts XperienCentral on startup.

  1. Open the file D:\Program Files\Tomcat 7.0\conf\server.xml.
  2. Remove all content from the server.xml and replace it with:

    <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="XperienCentral user database" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="D:/Program Files/Tomcat 7.0/conf/admin-users.xml" />
       </GlobalNamingResources>
       <Service name="WebManager">
          <Connector port="8009" enableLookups="false" redirectPort="8443" debug="1" protocol="AJP/1.3" URIEncoding="UTF-8" connectionTimeout="600000"/>
          <Engine name="WebManager" defaultHost="localhost">
             <Realm className="org.apache.catalina.realm.LockOutRealm" >
                <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="WMUserDatabase"/>
             </Realm>
             <Host name="localhost" unpackWARs="true" autoDeploy="false" deployOnStartup="false" appBase="D:/GX-WebManager/deploy">
                <Valve className="org.apache.catalina.authenticator.SingleSignOn"/>
                <Context path="/web" docBase="webmanager-backend-webapp-1.0-SNAPSHOT.war">
                   <Valve className="org.apache.catalina.authenticator.DigestAuthenticator" cache="true" />
          <Resource name="jdbc/WebManagerDb" auth="Container" type="javax.sql.DataSource" username="sa" password="admin" driverClassName="net.sourceforge.jtds.jdbc.Driver" url="jdbc:jtds:sqlserver://localhost:1433/webmanagerdb;useLOBs=false" maxActive="100" maxIdle="10" maxWait="10000" testWhileIdle="true" timeBetweenEvictionRunsMillis="900000" removeAbandoned="true" removeAbandonedTimeout="30" logAbandoned="true"
                </Context>
             </Host>
          </Engine>
       </Service>
    </Server>
    

Create a new admin-users.xml

For debugging purposes, XperienCentral uses the authentication mechanism of Tomcat. The server.xml contains a reference to the admin-users.xml file in which one or more users are defined. Create the file D:\Program Files\Tomcat 7.0\conf\admin-users.xml and add the following lines to it:

 

<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
   <role rolename="wmadmin"/>
   <user username="wmadmin_user" password="MyPassword" roles="wmadmin"/>
</tomcat-users>

 

Create a New context.xml

Create the file D:\Program Files\Tomcat 7.0\conf\context.xml and add the following lines to it:


<?xml version='1.0' encoding='utf-8'?>
<Context sessionCookiePath="/">
   <WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>


Avoiding Overly Large Log Files

Using the default Tomcat settings, the log file can quickly fill with messages, (information, warning, and error) not all of which you may need to track. GX recommends adjusting the logging.properties file in Tomcat to reduce the number of messages that are logged. Proceed as follows:

  1. Open the D:\Program Files\Tomcat 7.0\conf\logging.properties file.
  2. At the end of the file, add these lines:


nl.gx.level = WARNING
org.apache.felix.level = WARNING
org.apache.jackrabbit.level = WARNING
org.apache.solr.level = WARNING
org.quartz.level = WARNING
org.springframework.level = WARNING
nl.gx.webmanager.startup.level = INFO
# Upgrade bundle logging
nl.gx.webmanager.services.upgrade.impl.level = INFO
#OpenID
org.verisign.joid.level = WARNING


The JDBC Drivers

Obtain a copy of the database driver from the /ext folder of the XperienCentral installation. Copy the driver for your database to the directory D:\Program Files\Tomcat 7.0\lib. Use the following JAR files for the following databases:

  • For MSSQL, copy jtds-1.3.1.jar to D:\Program Files\Tomcat 7.0\lib.
  • For MySQL, copy mysql-connector-java-5.1.19.jar to D:\Program Files\Tomcat 7.0\lib.
  • For Oracle, copy oraclejdbcdriver-12.1.0.2.jar to D:\Program Files\Tomcat 7.0\lib.


ISAPI Redirector

After following all the steps in this part, the webserver (IIS) will receive all the requests for the website. If it’s a request for an image, the webserver can handle that request on its own and will return the image. If the request is for a page, IIS will request the page from XperienCentral (running inside Tomcat). The communication between IIS and Tomcat is handled by the ISAPI Redirector. The ISAPI Redirector can be downloaded from the Tomcat website (http://apache.mirror1.spango.com/tomcat/tomcat-connectors/jk/binaries/windows/).

 

In the code snippets given below, absolute paths are used. Adjust these paths if your folder structure is different.

 

  1. Create the following folder and place the file isapi_redirect.dll in it:

    D:\Program Files\Jakarta Isapi Redirector\bin\

  2. Create the following file:

    D:\Program Files\Jakarta Isapi Redirector\bin\isapi_redirect.properties

  3. Add the following lines to it:


    extension_uri=/jakarta/isapi_redirect.dll
    
    log_file= D:\Program Files\Jakarta Isapi Redirector\logs\isapi_redirect.log
    
    # Possible Log levels: debug, info, warn, error or trace log_level=info
    
    worker_file=D:/Program Files/Jakarta Isapi Redirector/conf/workers.properties
    
    worker_mount_file=D:/Program Files/Jakarta Isapi Redirector/conf/uriworkermap.properties
    



  4. Create the following folder and file:

    D:\Program Files\Jakarta Isapi Redirector\conf\workers.properties

  5. Add the following lines to it:

    worker.list=ajp13w
    worker.ajp13w.type=ajp13
    worker.ajp13w.host=localhost
    worker.ajp13w.port=8009
    worker.ajp13w.connection_pool_size=250
    worker.ajp13w.connection_pool_timeout=600
    worker.ajp13w.socket_timeout=600
    
  6. Create the following file:

    D:\Program Files\Jakarta Isapi Redirector\conf\uriworkermap.properties

  7. Add this line to it:

    /web/*=ajp13w
    



Back to top

 




  • No labels