This page last changed on Aug 20, 2008 by smaddox.

The standard Crowd installation guide tells you how to install the Standalone distribution of Crowd, which includes Apache Tomcat. You may wish to deploy Crowd on your own existing application server instead. For this purpose, we provide WAR (Webapp ARchive) distributions of the Crowd and CrowdID server applications.

This page shows one example - use it as a basis for other installations

Step 1. Check the System Requirements

Please check that your database and server are supported, as outlined in System Requirements, and make sure that all dependencies are installed as described below, otherwise Crowd will not run properly.

  1. Sun JDK 1.5 or higher. You can download the Java SE Development Kit (JDK) from the Sun website.
  2. Note: Once the JDK is installed, you will need to set the JAVA_HOME environment variable, pointing to the root directory of the JDK. Some JDK installers set this automatically (check by typing 'echo %JAVA_HOME%' in a DOS prompt, or 'echo $JAVA_HOME' in a shell). If it is not set, please see Setting JAVA_HOME.
  3. J2EE 1.4 application server or a Servlet 2.4 web container. NOTE: Crowd ships with Apache Tomcat (5.5.x).
  4. JDBC-compliant database that is supported by Hibernate. NOTE: Crowd ships with a built-in HSQL database, which is fine for evaulation purposes. For production environments we recommend configuring Crowd to use an external database.
  5. If you are deploying a WAR installation, ensure that the JTA (Java Transaction API) jar is deployed in the shared lib folder on the application server. The JTA is available in a couple of places:
    • On the Sun website.
    • In the Crowd Standalone Distribution zip file, available on the Crowd download centre — file jta-1.0.1B.jar in CROWD\apache-tomcat-5.5.20\common\lib.

      The JTA specifies standard Java interfaces between a transaction manager and the parties involved in a distributed transaction system: the resource manager, the application server, and the transactional applications. Refer to the Sun documentation for more information.

Step 2. Install Crowd WAR

Follow the steps below to install Crowd on JBoss 4.2.2 GA using a PostgreSQL database:

  1. Download the WAR distribution from the Crowd download centre.
    You will find the WAR archives for the Crowd and the CrowdID applications. You will need to deploy each application separately. For the rest of these instructions, we assume you are deploying Crowd WAR.

  2. Please check your unzip program before extracting the downloaded archive, as some unzip programs can cause errors – see the note on the Crowd installation front page.

  3. Unzip the download archive into a directory of your choice. We'll call it server/default/deploy/crowd.war in the rest of these instructions.

  4. Specify your Crowd Home directory by editing the configuration file at server/default/deploy/crowd.war/WEB-INF/classes/crowd-init.properties.

    The Crowd Home directory is where Crowd will store its configuration information. If you are using the embedded HSQL database, supplied for evaluation purposes, Crowd will also store its database in this directory. To specify the directory:

    • Open the crowd-init.properties file.
    • Choose the appropriate line in the file, depending upon your operating system (see below).
    • Remove the # at the beginning of the line.
    • Enter the name of the directory you want Crowd to use as its Home directory. For example,
      • On Windows:
        crowd.home=c:/data/crowd-home

        Note: On Windows, make sure you use forward slashes as shown above, not backward slashes.

      • On Mac and Unix-based systems:
        crowd.home=/var/crowd-home
    • Save the crowd-init.properties file.


  5. Add file server/default/deploy/crowd.war/WEB-INF/jboss-web.xml, with the following contents:
    <jboss-web>
      <resource-ref>
        <res-ref-name>jdbc/CrowdDS</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <jndi-name>java:CrowdDS</jndi-name>
      </resource-ref>
    </jboss-web>



  6. Create database crowd_db in PostgreSQL.

  7. Add a datasource definition file server/default/deploy/postgres-ds.xml:
    <datasources>
      <local-tx-datasource>
        <jndi-name>CrowdDS</jndi-name>
        <connection-url>jdbc:postgresql://localhost:5432/crowd_db</connection-url>
        <driver-class>org.postgresql.Driver</driver-class>
        <user-name>postgres</user-name>
        <password>postgres</password>
      </local-tx-datasource> 
    </datasources>



  8. Modify file server/default/deploy/crowd.war/WEB-INF/classes/crowd.properties to point to the port of the JBoss server. 8080 is the default port number, and is shown in the example below:
    crowd.server.url=http://localhost:8080/crowd/services/
    application.login.url=http://localhost:8080/crowd/console/



  9. Start JBoss with run.sh (Unix-based systems) or run.bat (Windows).

  10. Point a web browser at http://localhost:8080/ where you will see the Crowd Setup Wizard.
RELATED TOPICS
Document generated by Confluence on Aug 27, 2008 20:21