Deploy as a WAR in WebSphere V8.5.5 - Documentation topics on: dotcms war,war,websphere,.

Deploy as a WAR in WebSphere V8.5.5

Before following these steps that are specific to this application server, please review the documentation on deploying dotCMS as a .WAR

  • Accept defaults, should install under /opt

cd /opt/
    sudo chown -R {yourUser} ./IBM
    cd /opt/IBM/WebSphere/Liberty/
    ./bin/server create dotcms --template="defaultServer"

    sudo mkdir /opt/dotcms
    cd /opt/dotcms
    sudo chown -R {yourUser} /opt/dotcms
  • Copy exploded WAR file

      mkdir /opt/IBM/WebSphere/Liberty/usr/servers/dotcms/apps
      unzip dotcms.war -d /opt/IBM/WebSphere/Liberty/usr/servers/dotcms/apps/dotcms.war
      cd /opt/IBM/WebSphere/Liberty/usr/servers/dotcms/apps/dotcms.war/
  • Edit configuration (on the add/modify the following properties)

vi /opt/IBM/WebSphere/Liberty/usr/servers/dotcms/apps/dotcms.war/WEB-INF/classes/
      DYNAMIC_CONTENT_PATH= /opt/dotcms/dotsecure
      ASSET_REAL_PATH= /opt/dotcms/assets
  • Copy your jdbc .jar (Postgres example)

cp $DOTCMS_HOME/docs/examples/jboss/modules/com/dotcms/postgres/main/postgresql-9.0-801.jdbc3.jar /opt/IBM/WebSphere/Liberty/lib

Note: For h2 there is no need to copy any jdbc.jar as it gets directly referenced to the WEB-INF/lib folder inside the dotCMS exploded WAR folder.

  • Modify the websphere profile server.xml (A working example of the server.xml is under $DOTCMS_HOME/docs/examples/websphere/server.xml already configured to work with h2)

Replace the /opt/IBM/WebSphere/Liberty/usr/servers/dotcms/server.xml with the working example we provided ($DOTCMS_HOME/docs/examples/websphere/server.xml).

  • Modify the java vm options for the websphere app server (Needed in order to set up the javaagent and, if needed, debug properties)

mkdir /opt/IBM/WebSphere/Liberty/etc
  vi /opt/IBM/WebSphere/Liberty/etc/jvm.options

See working example here: $DOTCMS_HOME/docs/examples/websphere/jvm.options

  • Copy the mail.jar

cp $DOTCMS_HOME/docs/examples/websphere/mail.jar /opt/IBM/WebSphere/Liberty/usr/servers/dotcms/apps/dotcms.war/WEB-INF/lib/

  • Start the server

cd /opt/IBM/WebSphere/Liberty/
  ./bin/server start dotcms
  tail -f ./usr/servers/dotcms/logs/messages.log
  tail -f /opt/dotcms/dotsecure/logs/dotcms.log

Note: Sometimes is required to hit the application URL in order to deploy the war in WebSphere (localhost:8080)

  • Stop the server

cd /opt/IBM/WebSphere/Liberty/
./bin/server stop dotcms