Install CQ 4.2.x with CRX 1.4.2

This article provides step-by-step instructions how to set up a plain CRX1.4.2 instance and install a fresh CQ4.2.x instance on top of this repository. The result is a CQ4.2.x instance running with CRX1.4.2 inside the CQ Servlet Engine.

Install CRX1.4.2

The following section guides you through the process of extracting the CQ Servlet Engine and the CRX-webapp from the quickstart package. The following directory structure is used in the example below:

<cq_root>/
  |_ server
  |_ data/[author|publish]
       |_ crx
  1. Download CRX1.4.2 quickstart.
  2. Copy or move the quickstart jar-file to the <cq_root> directory.
  3. Run the following commands:
jar -xf crx-quickstart-*.jar etc/cqse-dist.zip
cd etc
jar -xf cqse-dist.zip
rm cqse-dist.zip
cd ..
mv etc server
jar -xf crx-quickstart-*.jar etc/server/lib/container
mv etc/server/lib/container/* server/lib/container
jar -xf crx-quickstart-*.jar etc/server/webapps/crx-explorer_crx.war
mkdir server/webapps/crx-explorer_crx.war/
mv etc/server/webapps/* server/webapps/crx-explorer_crx.war/
rm -r etc
cd server/webapps/crx-explorer_crx.war
jar -xf crx-explorer_crx.war
rm crx-explorer_crx.war
cd ../../..

The result is basically a (yet unconfigured) CQSE and exploded CRX repository webapp. The next steps show how to configure the CQSE. This step is required as it is currently not configured. It contains default placeholders that are automatically replaced when starting CRX with quickstart.

Edit the file server/etc/server.xml and replace all @...@ placeholders with the right values, or use the following script (localhost and port 7402 are used in the example below):

sed -i.bak 's/@cqse.dist.host@/localhost/' server/etc/server.xml 
sed -i.bak2 's/@cqse.dist.port@/7402/' server/etc/server.xml 

Edit the file server/etc/server.xml and replace @cqse.dist.webapps@ with (context path /crx used in example below):

<web-app>
<context>/crx</context>
<path>webapps/crx-explorer_crx.war</path>
<run-on-startup>true</run-on-startup>
</web-app>

Windows: Edit server/server.bat and replace all @...@ settings with the right values.
Linux: Edit server/start or use following commands (adapt settings according to your local environment):

sed -i.bak 's/@cqse.dist.host@/localhost/' server/start 
sed -i.bak2 's/@cqse.dist.port@/7402/' server/start 
sed -i.bak3 's/@cqse.dist.java.opts@//' server/start 
sed -i.bak4 's/@cqse.dist.java.unix@/java/' server/start 

Linux: Make start / stop / serverctl executable:

chmod 777 server/serverctl
chmod 777 server/start
chmod 777 server/stop

When starting the instance at this point, the CRX repository is created in the directory <cq_root>/server/crx-quickstart. If you want to use another directory (for example, <cq_root>/data/author/crx), edit the following files of the CRX-webapp and replace all crx-quickstart settings:

Edit the file WEB-INF/web.xml, and change the following settings:

  • Repository servlet, parameter repository-home: change the value from crx-quickstart/repository to an absolute path (for example, <cq_root>/data/author/crx)
  • Repository servlet, parameter explorer-home: change the value from crx-quickstart/repository to an absolute path (for example, <cq_root>/data/author/crx)
  • Repository servlet, parameter repository-name: change the value from crx to crxauthor (resp. crxpublish)
  • JCRExplorer servlet, parameter repository-name: change the value from crx to crxauthor (resp. crxpublish)
  • JCRWebdavServer servlet, parameter home: change the value from crx-quickstart to an absolute path (for example, <cq_root>/data/author/crx)

Edit the file WEB-INF/log4j.xml, and change the following settings:

  • Appender 'error', change the value of the parameter File from crx-quickstart/logs/crx/error.log to an absolute path (for example, <cq_root>/data/author/crx/logs/error.log)
  • Appender 'translation', change the value of the parameter File from crx-quickstart/logs/crx/translation.log to an absolute path (for example, <cq_root>/data/author/crx/logs/translation.log)

Provide a valid license key so that CRX is fully usable:

  • Either copy an existing license.properties file to <cq_root>/server directory
  • Or start the CQSE, request http://<host>:<port>/crx and enter a valid license key

At this point, you have setup and installed a plain CRX1.4.2 instance which can now serve as a basis for a custom CQ4.2.x installation.

Install CQ4.2.x

Run the CQ4.2.x installer and choose custom installation. During installation, you are prompted whether to install a fresh CRX repository or use an existing one. Install on the CRX repository that was created in above steps. Make sure that the repository is running.

Dette arbejde har licens under en Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Opslag på Twitter™ og Facebook er ikke omfattet af vilkårene for Creative Commons.

Juridiske meddelelser   |   Politik for beskyttelse af personlige oplysninger online