Installing, Starting, and Stopping CQ5 WCM

How to Install CQ WCM Author and Publish Instances using Quickstart

This section describes how to install CQ WCM.

Generally, when you set up CQ WCM, you need to set up an Author and a Publish instance - see the section called “Author and Publish Environments” for further details on the two types of environment.

Installation procedures for these are described in Installing an Author instance and Installing a Publish instance. If, for testing or other purposes, you need to install CQ WCM out of the box (an author instance with default settings and file names), you can use the generic procedure.

Installing an Author Instance

This procedure describes how to set up a default Author instance on port 4502 of the desired host.

To install an author instance:

  1. On the host file system, create a directory and name it author.

  2. Copy the CQ5 cq-wcm-quickstart-<version>.jar file into author/.

  3. Rename cq-wcm-quickstart-<version>.jar to cq5-author-4502.jar. If you need a different port this can be set in the filename.

  4. Copy a valid license.properties file into author/ as well (the same directory as the cq5-author-4502.jar file).

    [Note]Note

    If when starting the application, you do not provide the license.properties file, CQ WCM redirects you to the Welcome screen where you enter a valid license key. You can also request a valid license key from Day at this time.

  5. Start CQ WCM Quickstart:

    • If using a GUI file-system explorer, double-click the cq5-author-4502.jar file.

    • If using the command line, type:

      java -jar cq5-author-4502.jar
    • Use a custom script located in the crx quickstartfolder, such as server.bat to start CQ. The Start and Stop scripts are for UNIX, Linux, and Macintosh. The server.bat script is for Windows.

      [Important]Important

      You cannot use a custom script when you install the quickstart.jar file unless you expand the file first. Use the -unpack option on the command line to unpack the contents before running the script as in java -jar cq-wcm-quickstart-<version>.jar -unpack.

  6. When the installation is completed, you are automatically redirected to http://localhost:4502/bin/login.html.

    [Note]Note

    With the default settings, the syndication agent points toward the publish instance at http://localhost:4503/.

Installing a Publish Instance

To set up a publish instance on port 4503 of the desired host, you perform the same steps as in installing an author instance except that you create a directory named publish (instead of author) and you rename the quickstart.jar file as cq5-publish-4503.jar. You can select any port number.

To install a publish instance:

  1. On the host file system, create a directory and name it publish.

  2. Copy the CQ WCM cq-wcm-quickstart-<version>.jar file into publish/.

  3. Rename cq-wcm-quickstart-<version>.jar to cq5-publish-4503.jar. If you need a different port this can be set in the filename.

  4. Copy a valid license.properties file into publish/ as well (the same directory as the cq5-publish-4503.jar file).

    [Note]Note

    If when starting the application, you do not provide the license.properties file, CQ WCM redirects you to the Welcome screen where you enter a valid license key. You can also request a valid license key from Day at this time.

  5. Start CQ WCM Quickstart:

    • If using a GUI file-system explorer, double-click the cq5-publish-4503.jar file.

    • If using the command line, type:

      java -jar cq5-publish-4503.jar
    • Use a custom script located in the crx quickstartfolder, such as server.bat to start CQ. The Start and Stop scripts are for UNIX, Linux, and Macintosh. The server.bat script is for Windows.

    [Important]Important

    You cannot use a custom script when you install the quickstart.jar file unless you expand the file first. Use the -unpack option on the command line to unpack the contents before running the script as in java -jar cq-wcm-quickstart-<version>.jar -unpack.

  6. When the installation is completed, you can browse your site (for example, http://localhost:4503/content/geometrixx/en/company.html)

Installing a CQ WCM Instance - Generic Procedure

This procedure is a generic, quickstart procedure for installing CQ WCM; it installs an author instance using default settings and file names. It is often used when testing, or other scenarios when you need a quickly available instance.

[Note]Note

You do not need to perform this procedure before installing author or publish instances. To install an author or publish instance, see Installing an Author instance and Installing the Publish instance.

To install a generic CQ WCM instance (author):

  1. Copy the CQ WCM cq-wcm-quickstart-<version>.jar file (for example, cq-wcm-quickstart-5.2.0.20090319.jar) to the desired directory on the host file system.

  2. Copy a valid license.properties file into the same directory as the cq-wcm-quickstart-<version>.jar file.

    [Note]Note

    If when starting the application, you do not provide the license.properties file, CQ WCM redirects you to the Welcome screen where you enter a valid license key. You can also request a valid license key from Day at this time.

  3. Start CQ WCM Quickstart by doing one of the following:

    • If using a GUI file-system explorer, double-click the cq-wcm-quickstart-<version>.jar file. This installs and automatically starts the server.

      [Note]Note

      The repository data is stored in the subdirectory crx-quickstart/repository.

    • If using the command line, type the following:

      java -jar cq-wcm-quickstart-<version>.jar
    • Use a custom script located in the crx quickstart folder, such as server.bat to start CQ. The Start and Stop scripts are for UNIX, Linux, and Macintosh. The server.bat script is for Windows.

      [Note]Note

      You cannot use a custom script when you install the quickstart.jar file unless you expand the file first. Use the -unpack option on the command line to unpack the contents before running the script as in java -jar cq-wcm-quickstart-<version>.jar -unpack.

  4. When the installation is complete, you are automatically redirected to http://localhost:4502/bin/login.html.

    [Note]Note

    CQ WCM quickstart selects the first available port from the following list: 4502,8080,8081,8082,8083,8084,8085,8888,9362,<random>. You can also set the port number. See installing an author instance for an example on how to set a port number.

Starting CQ WCM

Running CQ WCM is the same as starting it: you double-click CQ Quickstart or start CQ from the command line or a custom script.

To start CQ WCM:

  1. Navigate to your quickstart.jar file.

  2. Do one of the following:

    1. If using a GUI file-system explorer, double-click the quickstart.jar file.

    2. If using the command line, type java -jar cq-wcm-quickstart-<version>.jar.

    3. Use one of the custom scripts located in the crx-quickstart/server folder to start CQ. The start and stop scripts are for UNIX, Linux, and Macintosh. The server.bat script is for Windows:

      [Note]Note

      You cannot use a custom script when you install the quickstart.jar file unless you expand the file first. Use the -unpack option on the command line to unpack the contents before running the script.

      Running server.bat looks like the following:

  3. CQ WCM starts and automatically redirects your web browser to the appropriate page, usually the login page (for example http://localhost:4502/):

    Once logged in, you have access to CQ WCM. See the CQ WCM User Guide for details on using CQ WCM.

Options for the Windows server.bat script

The server.bat file can be used to start CQ under Windows. The file defines various default values and can be customized as required.

[Caution]Caution

Day recommends that you make a backup of the file before editing.

The options for server.bat are:

Quickstart
usage: server.bat [options]

where options include:
    -debug [socket]           enable debug (shared mem is default)
    -suspended                start suspended (only if debug)
    -quiet                    don't show info message
    -jconsole                 start with -Dcom.sun.management.jmxremote
    -help                     this usage
    -jar                      explicitely specify the jar file to run

for additional tuning, edit the first section of the server.bat file

Options for the shell start and serverctl scripts

Both the start and serverctl scripts can be used to start CQ. Both files set various default values and can be customized as required.

[Caution]Caution

Day recommends that you make a backup of the files before editing them.

To use the start script enter the following at the command prompt:

  • start [options]

To use the serverctl script enter the following at the command prompt:

  • serverctl [options] {start|stop|restart|status}

The options for both are:

Day Quickstart Server Control, version 5.0.0 ($Rev: 45191 $)
    usage: serverctl [options] {start|stop|restart|status}

Engine Options:
    --context          the communique context directory, defaults to <cq-installation-dir>/crx-quickstart/server
    --port, -p         the default port to listen to if not overrriden in server.xml
    --loglevel, -l     the initial loglevel.
    --logdir           the log directory for startup.log. defaults to <cq-installation-dir>/crx-quickstart/server/logs
    --log              the startup log file. defaults to <cq-installation-dir>/crx-quickstart/server/logs/startup.log
    --interface, -a    the interfact to bind to (use 0.0.0.0 for any).
    --jar              explicitely specify the jar file to run, relative to --context

Java Options:
    --javahome         the java home directory. overrides JAVA_HOME env var.
    --heap-min         the minimum heap in megabytes. defaults to 128
    --heap-max         the maximum heap in megabytes. defaults to 256
    --debug, -d [socket|shmem]  
                       starts jvm in debug mode. default 'socket'
    --debug-suspended [socket|shmem]  
                       starts jvm in suspended debug mode. default 'socket'
    --debug-port       port for debug address. default "30303"
    --profile [yjp]    start jvm with YourKit Java Profiler
    --javaopts         additional java options
    --jaas             use jaas.config. default is disabled
    --jaas-config      config for jaas. default is etc/jaas.config
    --verbose-gc       turn on vebose gc

Other options
    --fg, -D           starts cq in foreground
    --bg               starts cq in background. this is the default.
    --verbose, -v      be more verbose 
    --dry              prepare but do not start
    --help, -h         show this help
    --max-files        sets the ulimit for max open files before executing the jvm. 
                       default is 1024

Accessing CRX, CQSE, and the Apache Felix Management Console

Once CQ WCM has been started, you can also access:

Accessing CRX

To access the CRX console use your browser to navigate to http://<host>:<port>/crx/index.jsp; for example http://localhost:4502/crx/index.jsp:

See the CRX documentation for full information about using CRX.

Accessing CQSE

To access the CQSE console use your browser to navigate to http://<host>:<port>/admin/webapps; for example http://localhost:4502/admin/webapps:

Accessing the Apache Felix Web Management Console

To access the Felix Web Management console use your browser to navigate to http://<host>:<port>/system/console; for example http://localhost:4502/system/console or for the Bundles page http://localhost:4502/system/console/bundles:

See the section called “Configuring CQ WCM with the Apache Felix Web Management Console” for further details.

Stopping CQ5 WCM

To stop CQ WCM, do one of the following:

  • If you started CQ WCM from either a script or the command line, press Ctrl+C to shut down the server.

    [Note]Note

    If you are running UNIX with the start script, you must use the Stop script to stop CRX.

  • If you started CQ WCM by double-clicking the jar file, click the On button (which then changes to Off) to shut down the server.