Notes:
- This document includes only installation steps specific to this application server.
- Before following the steps below, please review and follow the general instructions in the WAR Installation documentation.
- The default server name for a new Weblogic installation is “myserver”, so the instructions below assume your server is named “myserver”.
- If you wish to use a different server name, replace “myserver” with your actual server name everywhere it occurs in the below instructions.
- Several environment variables which specify the locations of key directories are referenced in the below commands. You may either set these, or manually type in the appropriate directories in place of the environment variables in the below commands.
$WEBLOGIC_HOME
: The path to the root of your Weblogic installation (see Install Weblogic)$DOMAIN_DIR
: The path the the root of your Weblogic domain directory (see Install Weblogic)$DOTCMS_HOME
: The path to the root of your dotCMS WAR directory (within your Weblogic Deploy directory)
Setup Weblogic
Perform the following steps to set up Weblogic. For more information, please see the Weblogic Installation documentation.
1. Install Weblogic
- Install Weblogic following the Weblogic README instructions.
- Important: Make sure to create a new domain as the README instructs.
- Save the full path to the Weblogic installation directory, or set the
$WEBLOGIC_HOME
environment variable, (for use in later steps). - Save the full path to the Weblogic domain directory, or set the
$DOMAIN_DIR
environment variable, (for use in later steps).
2. Startup Weblogic
- Start the Weblogic server from the new domain.
3. Create a New Weblogic Server
Note: This can be done via the setup in the GUI or in the Web Admin UI.
4. Set up Access to the Server
- Using ./configure.sh
- If the ./configure.sh is used (as described in the the Weblogic README), then after the installation process and the creation of the new Domain, the server will be automatically started and accessible using the following URL
http://localhost:7001/console
- If the ./configure.sh is used (as described in the the Weblogic README), then after the installation process and the creation of the new Domain, the server will be automatically started and accessible using the following URL
- Manual Configuration
- If you do not use the ./configure.sh file, then you can perform the following steps to set up the URL to access the server:
- Run the startManagedWebLogic script
startManagedWebLogic.sh "myserver" "http://:7001"
- Go to your created domain.
- Start the weblogic server
$WEBLOGIC_HOME/user_projects/domains/mydomain/startWebLogic.sh
- Run the startManagedWebLogic script
- Once the server is running you will be able to access to the admin console using the following URL:
http://localhost:7001/console
- If you do not use the ./configure.sh file, then you can perform the following steps to set up the URL to access the server:
Configure Weblogic for dotCMS
5. Stop the Weblogic Server
If your server is running, stop it before continuing with the next steps.
6. Copy the JDBC Driver to $DOMAIN_DIR/lib
Run one of the following commands to copy the appropriate JDBC driver for the database you plan to use with dotCMS:
Postgres:
cp $DOTCMS_HOME/docs/examples/jboss/modules/com/dotcms/postgres/main/postgresql-9.0-801.jdbc3.jar $DOMAIN_DIR/lib
H2:
cp $DOTCMS_HOME/WEB-INF/lib/h2-1.3.176.jar $DOMAIN_DIR/lib
7. Restart Weblogic
$WEBLOGIC_HOME/user_projects/domains/mydomain/startWebLogic.sh
8. Set up the Postgres Datasource
- Access the admin console:
http://localhost:7001/console
- Navigate to: Services → Data Sources → New → Generic Data Source
- Enter the database driver information
Database Type: PostgreSQL JNDI Name: jdbc/dotCMSPool Name: JDBC Postgres DS
- Click the Next button
- Select the Default option for the Database Driver
PostgreSQL's Driver (Type 4) Versions: Any
- Click the Next button
- Uncheck Supports Global Transactions
- Click the Next button
- Enter the database information
Database Name: dotcms Host Name: localhost Port: 5432 Database User Name: postgres Password: postgres
- Click the Next button
- Verify the datasource configuration
- Click Test Configuration
- Once you've verified the configuration, click the Finish button
For more information, please see the Weblogic Data Source Configuration documentation.
9. Set up the H2 database
- Navigate to: Services → Data Sources
- Select the created JDBC Postgres DS
- Select Targets
- Select your server (e.g. “myserver”)
- Enter the H2 database database driver information
Database Type: Other JNDI Name: jdbc/dotCMSPool Name: JDBC H2 DS
- Click the Next button
- Select Other for the Database Driver
- Click the Next button
- Uncheck Supports Global Transactions
- Click the Next button
- Enter the database login credentials
Database User Name: sa Password: sa
- Click the Next button
- Enter the database information
Driver Class Name: org.h2.Driver URL: jdbc:h2:h2_dotcms_data;MVCC=TRUE Database User Name: sa Password: sa
- Click the Next button
- Select your server
- Select Targets -> “myserver”
- Click the Finish button
For more information, please see the Weblogic Data Source Configuration documentation.
10. Turn off the Wrap Data Types option
- Navigate to: Services → Data Sources
- Select the created JDBC Postgres DS
- Select the Configuration: Connection Pool tab
- Click Advanced to display advanced connection pool options
- Uncheck the Wrap Data Types option
- Click the Save button
For more information, please see the Weblogic Wrap Data Types documentation.
11. Create the Mail Resource
- Navigate to: Services → Mail Sessions → New
- Enter the mail resource information
JNDI Name: mail/MailSession Name: dotcmsMailSession
- Click on Next button:
- Select Mail Session Targets → Servers
- Select your server (e.g. “myserver”)
- Click the Finish button
For more information, please see the Weblogic mail configuration documentation.
12. Activate All Changes
- Navigate to Change Center
- Click the Activate Changes button
Install dotCMS on Your Weblogic Server
13. Create the Deploy directory on your Server Installation
cd $WEBLOGIC_HOME/user_projects/domains/mydomain/servers/myserver/
mkdir deploy
14. Copy the exploded dotCMS WAR directory into your Deploy folder
cd $DOTCMS_HOME/WAR
unzip ROOT.war -d $WEBLOGIC_HOME/user_projects/domains/mydomain/servers/myserver/deploy/ROOT.war
cd $WEBLOGIC_HOME/user_projects/domains/mydomain/servers/myserver/deploy/ROOT.war/
15. Modify the Java VM Options for the Weblogic App Server
Note: This is necessary to be able to set up the javaagent, and debug properties if needed.
- Edit $WEBLOGIC_HOME/user_projects/domains/mydomain/bin/startWebLogic.sh
- At Approximately line 98, add the following line after the line which sets the JAVA_OPTIONS variable:
JAVA_OPTIONS="$JAVA_OPTIONS -javaagent:$WEBLOGIC_HOME/user_projects/domains/mydomain/servers/myserver/deploy/ROOT.war/WEB-INF/lib/dot.jamm-0.2.5_2.jar"
- Resulting in something like the following:
JAVA_OPTIONS="${SAVE_JAVA_OPTIONS}" JAVA_OPTIONS="$JAVA_OPTIONS -javaagent:$WEBLOGIC_HOME/user_projects/domains/mydomain/servers/myserver/deploy/ROOT.war/WEB-INF/lib/dot.jamm-0.2.5_2.jar" SAVE_JAVA_OPTIONS="" (etc....)
- At Approximately line 98, add the following line after the line which sets the JAVA_OPTIONS variable:
16. Override the Quartz Driver Class
Set the QUARTZ_DRIVER_CLASS
property in the dotmarketing-config.properties file to org.quartz.impl.jdbcjobstore.WebLogicDelegate
. Note: It is strongly recommended that you make all changes to the dotmarketing-config.properties file through the configuration plugin.
## QUARTZ SETTINGS
## This is used if you need to override the Quartz driver. We have seen cases where WebLogic needs to do this with Oracle. You can safely leave commented if you are not having issues.
QUARTZ_DRIVER_CLASS=org.quartz.impl.jdbcjobstore.oracle.weblogic.WebLogicOracleDelegate
Start dotCMS
17. Deploy dotCMS
- Access the Weblogic admin console:
http://localhost:7001/console
- Navigate to: Your Deployed Resources → Deployments → Install
- Browse to the Deploy folder (servers/myserver/deploy)
- Select ROOT.war
- Click the Next button
- Select the targeting style
- Choose Install this deployment as an application
- Click the Next button
- Select Security and set the following options
- What security model do you want to use with this application?
- Use only roles and policies that are defined in the deployment descriptors
- How should the source files be made accessible?
- **Use the defaults defined by the deployment's targets
- Plan Source Accessibility:
- (Use the same accessibility as the application)
- Click the Next button
- What security model do you want to use with this application?
- Click the Finish button