7. Confluence Docs 3.0 : Installing Confluence EAR-WAR on JBoss This page last changed on Jul 19, 2009 by ggaskell. On this page: Step 1. Configuring the Confluence War File Step 2: (optional) Create a Data Source Deployment Descriptor Step 3: Deploy Confluence Troubleshooting After installing JBoss, follow the instructions below. ### Step 1. Configuring the Confluence War File Download the Confluence EAR/WAR zip file. (You need to click the 'Show all' link to see the EAR/WAR zip file.) Check your unzip program before extracting the downloaded zip file. Some archive-extract programs cause errors when unzipping the Confluence zip file: Windows users must avoid the Windows built-in unzip utility, as it doesn't extract all the files. Use a third-party unzip program like 7Zip or Winzip. Solaris users will need to use GNU tar to handle the long file names. Extract the downloaded zip file. You have now unzipped your Confluence build home directory, which should contain the version number e.g. `confluence-2.10.2`. This directory will be later referred to as the <_CONFLUENCE-BUILD-HOME>_ . Inside is a `confluence` subdirectory, referred to later as the (Exploded) Confluence WAR directory. Modify its confluence-init.properties and set Confluence Home. Inside the Confluence installation directory, edit `...confluence/WEB-INF/classes/confluence-init.properties` in a text editor. Now define your Confluence Home directory, by setting the `confluence.home` property to a directory of your choosing. We suggest using different paths for your installation and home directories. This will facilitate upgrades. This is the directory that will contain all of Confluence's configuration, backup and attachment files. Tip: Another term for 'Home directory' would be 'data directory'. Add your database driver jar file to the WEB-INF/lib directory. If your driver already exists in the main classpath and is used for other applications, you can skip this step. Check the Database Installation Instructions. If you're not already committed, we recommend Postgres. Create a new file `$CONFLUENCE_BUILD_HOME/edit-webapp/WEB-INF/jboss-web.xml` with the following content:
       <?xml version="1.0" encoding="UTF-8" ?>
       <!DOCTYPE jboss-web PUBLIC
       "-//JBoss//DTD Web Application 4.2//EN"
       "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">
       <jboss-web>
       <context-root>confluence</context-root>
       </jboss-web>
1. Build the war file. Windows Open the command line prompt Navigate to the Confluence installation directory Run the command `build war` Linux Open a terminal window Navigate to the Confluence installation directory Add executable mode to `build.sh` — `chmod +x build.sh` Run `build.sh` The WAR file is now located in the `dist` subfolder in your Confluence installation directory ### Step 2: (optional) Create a Data Source Deployment Descriptor If you want to use a container managed data source, you need to tell JBoss to create a new datasource for you. Create a new file `confluence-ds.xml` with the following content (This will be deployed in `$JBOSS_HOME/server/default/deploy`):
       <?xml version="1.0" encoding="UTF-8"?>
       <datasources>
       <local-tx-datasource>
       <jndi-name>ConfluenceDS</jndi-name>
       <connection-url>jdbc:postgresql://localhost/confluence</connection-url>
       <driver-class>org.postgresql.Driver</driver-class>
       <user-name>confluence</user-name>
       <password>confluence</password>
       <min-pool-size>5</min-pool-size>
       <max-pool-size>10</max-pool-size>
       </local-tx-datasource>
       </datasources>
When you configure the database in the Confluence Setup Guide, choose to "Connect via a Data Source". The JNDI name will be `java:/ConfluenceDS` so enter this value in the approriate field. ### Step 3: Deploy Confluence If you made one, copy `confluence-ds.xml` to `<JBOSS_HOME>/server/default/deploy` Copy <_CONFLUENCE-BUILD-HOME>_`/dist/confluence-x.x.x.war` to `$JBOSS_HOME/server/production/deploy` If you didn't put one in the war file's lib folder, check that you have the correct JDBC driver in `$JBOSS_HOME/server/production/lib` Start JBoss watching the logs for any errors. You can access Confluence via http://localhost:8080/confluence and proceed to the Confluence Setup Guide. ## Troubleshooting Please refer to Known Issues for JBoss.

Document generated by Confluence on Nov 05, 2009 23:27