This covers dotCMS 1.9.3 and WebLogic 11g version 10.3.4.0 but should work with any dotCMS version after 1.9.3
- Install Weblogic following README instructions. Make sure to create a new domain as the README instructs. Start the server form the new domain and then you need to create a new Server. This can be done whne you set up in the GUI or in the Web Admin UI. Once you have a new server you need to start it. To do this goto the bin dir of your domain and run
startManagedWebLogic.sh "my_managed_server" "http://:7001" - Start a browser and open up url - 'http://localhost:7001/console' to administer the server
- You can download the dotCMS WAR or Run "ant war-no-jsp" to build your own. This will place the WAR in build/war/ You need to unzip the war and name the folder {name}.war. ie.. You will end up with a folder names dotcms_1.9.3.war and the contents will have the WEB-INF etc.. directories in it. The war is called an exploded war
You can perform the below steps directly in the WAR or in the dotCMS. IF you do them in the dotCMS download directly you can build your WAR afterwards so that your changes are not lost every time you rebuild. you will need to add a dotCMS to the pathing mentioned as that is the real root of the WAR. - Copy tomcat/lib/log4j.jar to dotCMS/WEB-INF/lib if you downloaded the WAR you will have to grab this from a downloaded dotCMS.
- If running 1.9.3.x or greater add The Apache Jasper libaries from the Tomcat lib directory.
-
Comment out the following 3 blocks in the web.xml:
<resource-ref> <res-ref-name>jdbc/dotCMSPool</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> <resource-ref> <res-ref-name>mail/MailSession</res-ref-name> <res-type>javax.mail.Session</res-type> <res-auth>Container</res-auth> </resource-ref> -
Edit the following block:
<servlet> <servlet-name>dwr-invoker</servlet-name> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class> <init-param> <param-name>debug</param-name> <param-value>false</param-value> </init-param> <init-param> <param-name>compressor</param-name> <param-value>none</param-value> </init-param> </servlet>By inserting the following block:<init-param> <param-name>crossDomainSessionSecurity</param-name> <param-value>false</param-value> </init-param>So that it looks like this:<servlet> <servlet-name>dwr-invoker</servlet-name> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class> <init-param> <param-name>debug</param-name> <param-value>false</param-value> </init-param> <init-param> <param-name>compressor</param-name> <param-value>none</param-value> </init-param> <init-param> <param-name>crossDomainSessionSecurity</param-name> <param-value>false</param-value> </init-param> </servlet> -
If it is recommended to edit src-conf/log4j.xml and change the File location of the FILE appender, to point it to an absolute location, since the variable catalina.home won't be defined. Make sure the directory does exist before starting the dotCMS. For example:
<param name="File" value="/opt/wl_domain/log/dotcms.log"/>
-
It is also recommended to set the two following properties in src-conf/dotmarketing-config.properties, to locations outside of the war:
DYNAMIC_CONTENT_PATH
ASSET_REAL_PATH
These two locations are where dynamic data (binary assets, indexes, on-disk cache), is stored. The difference between them is that one (ASSET_REAL_PATH) contains data that needs to be share across cluster nodes if operating in a cluster environment. - At this point you can build the WAR as mentioned above and explode it unless you have been working in the WAR. Place the WAR in a directory on the server so you can deploy it
- Install weblogic and create a domain. Copy JDBC driver to $DOMAIN_DIR/lib before starting weblogic. Recommended (but there might be other ways of doing this, just remember that dotCMS needs to run in a ROOT context)
-
Create JDBC resource
Services -> Data Sources -> New -> Generic Data Source
Create a JDBC connection with whatever name makes sense for you. The JNDI Name has to be "jdbc/dotCMSPool"
Select the database type you're using. The defaults should work, except for the "Connection Properties" section, where you need to input the correct parameters for your environment:
Database Name
Host Name
Port
Database User Name
Password
In the "Select Targets" screen, make sure you target your server
For production environments, make sure to go to the DataSource you just created -> Configuration -> Connection Pool, and increase the Maximum Capacity. Refer to documentation for recommendation (ConfigurationAdministration.html#DatabaseConfiguration) -
Create the mail resource
Services -> Mail Sessions -> New
Create a Mail Session with whatever name makes sense for you. The JNDI Name has to be "mail/MailSession"
In the "Select Targets" screen, make sure you target your server
- Deploy from the directory you unzipped. You can use the default options making sure you target to the correct server
2