March 16, 2020
Estimated Post Reading Time ~

Installing AEM/ Adobe CQ5

CQ Prerequisite
In order to start and complete this tutorial successful there are some prerequisite:
§ Very Basic Knowledge of Java (At least should know what JVM is and classes and packages)
§ Unix Basics  

Unix Basics
§ Basic Unix Commands
§ How to check running process (ps -ef command)
§ How to find number of open files (lsof command)
§ How to use java and jar commands (java command, jar command)
§ How to do curl (curl command)

§ Server basics (Should know about application servers such as Tomcat, WebLogic, etc and web servers such as IIS or Apache)
Installing CQ on Application Server
CQ version 5.6 supports the following application servers
§ WebSphere 7 / WebSphere 8 / WebSphere 8.5
§ JBoss 5.1
§ JBoss 7.1
§ Oracle WebLogic 10.3.5 / 10.3.6 / 12.1
§ Tomcat 6
§ Tomcat 7

We will cover how to install CQ on Tomcat 7 (As it is open source)
1) Get CQ war file from Adobe
2) Install Tomcat 7 on your machine
§ http://tomcat.apache.org/tomcat-7.0-doc/setup.html
3) Copy the CQ .war file (cq-quickstart-5.5.0-20120220.war) to <Tomcat Install folder>\webapps\
4) Remove the folder \ROOT from <Tomcat Install folder>\webapps\
5) Rename cq-quickstart-5.5.0-20120220.war to ROOT.war
6) Using a zip utility such as WinZip or WinRAR, extract the file web.xml in ROOT.war (ROOT.war\WEB-INF\web.xml) onto the filesystem and edit it.
7) Create a folder “crx” on your server.
8) Change “init-param” from the default “sling.home” to the location of the crx folder you created in the previous step. <Tomcat Install Folder>\crx\
9) If this will be a CQ “Publish” instance, change the value for “sling.run.modes” to “publish” from the default “author”.
10) Save the file web.xml and insert it back into ROOT.war
11) Make a copy of catalina.bat in C:\Programs\Apache\apache-tomcat-7.0.27\bin and name it setenv.bat
12) Clear it and then add the following lines to it

@echo off
rem —————————-
rem Default JVM options
rem —————————-
set JAVA_OPTS=%JAVA_OPTS% -server
set JAVA_OPTS=%JAVA_OPTS% -Djava.awt.headless=true
set JAVA_OPTS=%JAVA_OPTS% -XX:NewRatio=1
set CQ_JVM_OPTS=%CQ_JVM_OPTS% -XX:+UseAdaptiveGCBoundary
set JAVA_OPTS=%JAVA_OPTS% -XX:+UseParallelGC
set JAVA_OPTS=%JAVA_OPTS% -XX:+UseParallelOldGC
set JAVA_OPTS=%JAVA_OPTS% -XX:ParallelGCThreads=4
set JAVA_OPTS=%JAVA_OPTS% -Xms4096m
set JAVA_OPTS=%JAVA_OPTS% -Xmx4096m
set JAVA_OPTS=%JAVA_OPTS% -XX:PermSize=128m
set JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=128m
rem —————
rem CQ options
rem —————
set CQ_JVM_OPTS=%CQ_JVM_OPTS% -Dcrx.memoryMaxUsage=80
set JAVA_OPTS=%JAVA_OPTS% -Dorg.apache.jackrabbit.core.state.validatehierarchy=true
set JAVA_OPTS=%JAVA_OPTS% -Dcom.day.crx.persistence.tar.IndexMergeDelay=0
rem Uncomment line below for debugging
rem JAVA_OPTS=%JAVA_OPTS% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=30303
rem —————————
rem JConsole Profiling
rem —————————
set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=50055
set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.authenticate=false
set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.ssl=false
13) Start Tomcat by running startup.bat from a command prompt. startup.bat will invoke catalina.bat which in turn will invoke setenv.bat You should see an INFOrmational message such as below:
INFO: Deploying web application archive <Tomcat Install Folder>\webapps\ROOT.war
14) Watch the folder <Tomcat Install Folder>\crx\ Folders such as follows will be created in the following order:
- launchpad
- logs
- repository
15) After about 5 minutes, verify that CQ is running by pointing the browser to the Tomcat server instance (Eg. http://HOST:8080/). Enter license information.
16) Also check the CQ log at C:\Programs\Apache\apache-tomcat-7.0.27\crx\logs\error.log and make sure that everything is working.

Tomcat can be shut down by running shutdown.bat
Installing CQ on Unix Based System
1) Install JDK and set up Java Home
§ http://www.java.com/en/download/help/download_options.xml
§ http://docs.oracle.com/cd/E19182-01/821-0917/inst_set_jdk_korn_bash_t/index.html
2) Get CQ jar file from Adobe
§ http://daycare.day.com/home/products/cq_wcm.html
3) Install CQ as Author
§ Open terminal
§ Rename jar file as cq5-author-p4502 (<anything>-<mode>-p<port number>.jar)
§ Use command java -jar cq5-author-p4502 -unpack
§ Once file unpacked go to crx-quickstart/bin folder
§ Open start script and make sure that CQ_RUNMODE='author'
§ start CQ using the start script. Run command ./start
§ This is installed CQ as an author on port 4502 on that server.
4) Install CQ as publish
§ Open terminal
§ Rename jar file as cq5-publish-p4503 (<anything>-<mode>-p<port number>.jar)
§ Use command java -jar cq5-publish-p4503 -unpack
§ Once file unpacked go to crx-quickstart/bin folder
§ Open start script and make sure that CQ_RUNMODE='publish'
§ start CQ using the start script. Run command ./start
§ This is installed CQ as publish on port 4503 on that server.
5) Change default JVM param
§ Open to /crx-quickstart/bin/start in any editor of your choice
§ Search for "set CQ_JVM_OPTS"
§ Change JVM option based on your need
§ You can also set the run mode using CQ_JVM_OPTS=-Dsling.run.modes=publish, dev
JVM_PARAM Variable has the following meaning
6) Stop CQ

§ You can stop CQ using stop script.Run stop script as ./stop
Installing CQ on Windows
1) Install JDK and set up java home
§ http://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/index.html
2) Get CQ jar file from Adobe
§ http://daycare.day.com/home/products/cq_wcm.html
3) Install CQ as Author
§ Rename CQ jar file as cq5-author-p4502.jar (<anything>-<mode>-p<port number>.jar)
§ Double click on the jar file
§ CQ will start as an author on port 4502
4) Install CQ as publish
§ Rename CQ jar file as cq5-publish-p4503 (<anything>-<mode>-p<port number>.jar)
§ Double click on the jar file
§ CQ will start as publish on port 4503
5) Start CQ from the command line
§ Once CQ is installed using a jar file and started. Stop using the "stop" button
§ From command line go to /crx-quickstart/bin
§ run command start.bat
6) Change default JVM param
§ Open to /crx-quickstart/bin/start.bat in any editor of your choice
§ Search for "set CQ_JVM_OPTS"
§ Change JVM option based on your need
7) Stop CQ
§ If you started CQ by double-clicking jar file and just click on the stop button in the jar file
§ If you started CQ from the command line then run "stop" script from crx-quickstart/bin directory
8) Start and Stop CQ as service
§ Installing CQ As Window Service

Introduction to CQ Console
§ Accessing the CRX Console
You can access CRX console from HOST:PORT/crx/explorer/index.jsp
Accessing Felix Console
You can access Felix console from HOST:PORT/system/console
Accessing the Package Manager Console
Package Manager can be accessed from HOST:PORT/crx/packmgr/index.jsp
Accessing Cluster Console
Cluster Console can be accessed from HOST:PORT/libs/granite/cluster/content/admin.html
§
Accessing Backup Console

 

Backup Console can be accessed from HOST:PORT/libs/granite/backup/content/admin.html

Accessing CRXDE console

CRXDE Console for development can be accessed from HOST:PORT/libs/granite/backup/content/admin.html
Verify Installation
You can verify if CQ is installed properly through the following steps:
Make sure that you can access HOST:PORT/crx/explorer/index.jsp

§ Make sure that you can log in as "admin" "admin" 


§ Make sure that you can access Felix console HOST:PORT/system/console and log in as "admin" "admin".
Also, make sure that all bundle is either active or fragment. 


§ Make sure that you can log in as admin in author instance as "admin" "admin" as 

HOST:PORT Or you can access HOT:PORT/libs/cq/core/content/login.html



By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.