ibm websphere portal blog,websphere portal, portal blog, ibm blog,websphere blog,websphere tips and tricks, websphere interview questions, portal interview questions, portal faqs

CQ 5.5 Installation Document for Novice | IBM WebSphere Portal Blog

Pages

Friday, October 21, 2016

CQ 5.5 Installation Document for Novice

Installation Documentation
This installation document is designed to guide a user to install both author and publish instances for your environment.  The author instance is set up in a shared datastore cluster, where the publish instance just has a shared datastore.

Pre-requisites
•    Java version 6u15 or higher (still v6) must be installed (JDK1.6.0_35 most recent as of this writing)
•    (Unix Only) Ulimit for install user must be >= 8192
•    Installation files (cq5-author-4502.jar or cq5-publish-4503.jar and license.properties) exist on target servers
•    LDAP config file (ldap_login.conf) is available/on server.
•    CQ5.5 Service Pack 2.1 package is available on server
Installation Steps:
Checking the pre-requisites
1.    Log into the desired server and switch to the admin user.
a.    ssh <server>
b.    sudo su – adm
2.    Ensure the ulimit is set accordingly (the output of this command should be 8192 or larger)
a.    ulimit -n
3.    Check that java has been installed to /opt/project/java (typically a symbolic link is created to point to the java version to allow for easier updating of java version, i.e current)
a.    /opt/project/java/current/bin/java -version
Installing the CQ Jar File
4.    Change directory to the installation folder (create any folders that do not exist)
a.    cd /opt/project/cq
5.    Unpack the CQ binary
a.    (For Author) /opt/project/java/current/bin/java –jar cq5-author-4502.jar –unpack
b.    (For Publish) /opt/project/java/current/bin/java –jar cq5-publish-4503.jar –unpack
6.    Now a folder named crx-quickstart should be created under /opt/project/cq.
Start Script Modifications
7.    Open the start script located within crx-quickstart/bin
a.    vi /opt/project/cq/crx-quickstart/bin/start
8.    Within the start script, modify the CQ_PORT variable:
a.    (For Author) CQ_PORT=4502
b.    (For Publish) CQ_PORT=4503
9.    Within the start script, modify the CQ_RUNMODE variable:
a.    (For Author) CQ_RUNMODE='author,<environment>'
i.    For example, in dev-dev, the CQ_RUNMODE=’author,devdev’
b.    (For Publish) CQ_RUNMODE='publish,<environment>'
i.    For example, in dev-dev, the CQ_RUNMODE=’publish,devdev’
Enabling LDAP Connectivity
10.    Within the start script, uncomment the CQ_USE_JAAS variable:
a.    CQ_USE_JAAS=’true’
11.    Within the start script, modify the CQ_JAAS_CONFIG variable to point to the ldap_login.conf file provided (typically this is placed within the /opt/project/cq/crx-quickstart/conf directory)
a.    CQ_JAAS_CONFIG=/opt/project/cq/crx-quickstart/conf/ldap_login.conf
12.    Within the start script, modify the CQ_USE_JAAS control statement from the following:

if [ $CQ_USE_JAAS ]; then
    START_OPTS="${START_OPTS} -Djava.security.auth.login.config=${CQ_JAAS_CONFIG}"
fi

To the following:

if [ $CQ_USE_JAAS ]; then
    CQ_JVM_OPTS="${ CQ_JVM_OPTS } -Djava.security.auth.login.config=${CQ_JAAS_CONFIG}"
Fi
Modifying the Java Heap/PermGen Size
13.    Within the start script, modify the CQ_JVM_OPTS variable.
a.    CQ_JVM_OPTS='-server –Xmx8g -XX:MaxPermSize=512M -Djava.awt.headless=true'
Enabling Remote JMX Console //skip
14.    Add the following code underneath the CQ_JVM_OPTS line mentioned above: )Note: the jmxremote.access and jmxremote.password files will be provided (if not, email rymccull@xyzcompany.com for a fresh copy)
#JMX Configuration
CQ_USE_JMX='true'

CQ_JMX_PASSWORD_FILE='/opt/project/cq/projectapp-author-dev3-01/crx-quickstart/conf/jmxremote.password'

CQ_JMX_ACCESS_FILE='/opt/project/cq/projectapp-author-dev3-01/crx-quickstart/conf/jmxremote.access'

CQ_JMX_PORT=5051

if [ $CQ_USE_JMX ]; then
    CQ_JVM_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=${CQ_JMX_PORT} -Dcom.sun.management.jmxremote.password.file=${CQ_JMX_PASSWORD_FILE} -Dcom.sun.management.jmxremote.access.file=${CQ_JMX_ACCESS_FILE} ${CQ_JVM_OPTS}"
fi
Changing Java Version //we skipped this one
15.    Within the start script, change the last line to the following (to use the newly installed java to run):
a.    /opt/project/java/current/bin/java $CQ_JVM_OPTS -jar $CQ_JARFILE $START_OPTS & echo $! > "conf/cq.pid"

16.    Save and exit the start file
Stop Script Modifications //we skipped this one
17.    Open the stop script
a.    vi /opt/project/cq/crx-quickstart/bin/stop
18.    Within the stop script, modify the java parameter to the following
a.    /opt/project/java/current/bin/java $CQ_JVM_OPTS -jar $CQ_JARFILE $START_OPTS
19.    Save and close the file.
Initial Server Start
20.    Start the server
a.    ./start (must be in the /opt/project/cq/crx-quickstart/bin folder)
21.    Tail the log file to determine when the initial start has been completed.
a.    tail –f /opt/project/cq/crx-quickstart/logs/error.log
22.    When the log has stopped moving and the server has successfully started, stop the server (this will have created many more folders/files within the crx-quickstart folder)
Repository.xml Modifications
23.    Change directories to /opt/project/cq/crx-quickstart/repository
a.    cd /opt/project/cq/crx-quickstart/repository
24.    Open repository.xml in an editor
a.    vi repository.xml
25.    Comment out or delete the following lines: // only till 25 skip the rest of this section.
        <LoginModule class="com.day.crx.core.CRXLoginModule">
        <param name="trust_credentials_attribute" value="TrustedInfo"/>
        <param name="anonymous_principal" value="anonymous"/>
        <param name="anonymousId" value="anonymous"/>
        <param name="adminId" value="admin"/>
        <param name="disableNTLMAuth" value="true"/>
        <param name="tokenExpiration" value="43200000"/>
         </LoginModule>
26.    Modify the following line (assuming that the shared datastore mount is at /nas/project/shared):

<DataStore class="com.day.crx.core.data.ClusterDataStore"/>

To the following

        <DataStore class="org.apache.jackrabbit.core.data.FileDataStore">
                <param name="path" value="${rep.home}/repository/datastore"/>
                <param name="minRecordLength" value="4096"/>
        </DataStore>

27.    Modify the <Cluster> tag to delete tarJournal files older than 1 month.  Change the following line:
  <Cluster>
        <Journal class="com.day.crx.persistence.tar.TarJournal"/>
    </Cluster>

To the following:

<Cluster syncDelay="2000">
    <Journal class="com.day.crx.core.journal.FileJournal">
        <param name="sharedPath" value="${rep.home}/tarJournal" />
        <param name="maximumAge" value="P1M" />
    </Journal>
</Cluster>
28.    Save and close the file
Moving Datastore Files to (New) Shared Location /skip
29.    Create the shared folders for datastore
a.    mkdir /nas/project/shared/datastore
30.    Move all files within the datastore to the new location (again assuming shared datastore is mounted on /nas/project/shared/datastore).
a.    mv /opt/project/cq/crx-quickstart/repository/repository/datastore /nas/project/shared/
31.    Create a symbolic link to the shared datastore location
a.    ln –s /nas/project/shared/datastore /opt/project/cq/crx-quickstart/repository/repository/datastore
Moving Journal Files to (New) Shared Location (Author Only) //skip
32.    Remove any files existing in the previous tarJournal folder
a.    rm –rf /opt/project/cq/crx-quickstart/repository/tarJournal/*
33.    Create the shared folder for Journal
a.    mkdir /nas/project/shared/tarJournal
34.    Move the following folders into the newly created folder:
a.    mv /opt/project/cq/crx-quickstart/repository/namespaces /nas/project/shared/tarJournal
b.    mv /opt/project/cq/crx-quickstart/repository/nodetypes /nas/project/shared/tarJournal
c.    mv /opt/project/cq/crx-quickstart/version/ /nas/project/shared/tarJournal
d.    mv /opt/project/cq/crx-quickstart/workspaces /nas/project/shared/tarJournal
35.    Create a symbolic link to the shared Journal location
a.    ln –s /nas/project/shared/tarJournal /opt/project/cq/crx-quickstart/repository/tarJournal
Lucene Index Changes (Workspace.xml) -todo
36.    Open the workspace.xml file for editing
a.    vi /opt/project/cq/crx-quickstart/repository/workspaces/crx.default/workspace.xml
37.    Add in the following (highlighted) line to the SearchIndex tag:
<SearchIndex class="com.day.crx.query.lucene.LuceneHandler">
            <param name="path" value="${wsp.home}/index"/>
            <param name="resultFetchSize" value="50"/>
            <param name="indexingConfiguration" value="${wsp.home}/indexing_config.xml"/>
</SearchIndex>
38.    Save and close the file
39.    From the project Runbook Wiki, Download the indexing_config.xml file
40.    Copy the file into the following location:
a.    /opt/project/cq/crx-quickstart/repository/workspaces/crx.default/indexing_config.xml
Start the server to pick up changes
41.    Change directory to the bin folder of the instance
a.    cd /opt/project/cq/crx-quickstart/bin
42.    Start the server
a.    ./start
Install CQ5.5 Service Pack 2.1 Package  //todo
43.    In a browser, ensure the server is started up successfully by logging in with the following id/password: (Website will be http://<servername>:<port>/libs/cq/core/content/login.html , port is as configured in the start script)
a.    Username: admin
b.    Password: admin
44.    Install the CQ5 Service Pack 2.1 package:
a.    (From the UI) – ensure you are logged in as admin
i.    Go to the url http://<servername>:4502/crx/packmgr/index.jsp
ii.    Select “Upload Package”
iii.    Select the cq-service-pack-5.5.2.20121012.zip package
iv.    Select “OK”
v.    The package will be added to the list of packages.  Select Install.
vi.    When the installation is completed, a dialog will appear requesting to restart the instance.
45.    View the log to ensure the server has stopped installing update
a.    Tail –f /opt/project/cq/crx-quickstart/logs/error.log
46.    When the log stops updating, stop the instance
a.    ./opt/project/cq/crx-quickstart/bin/stop
Install Supplemental Packages      //optional can be done later
47.    Start the server using the start command
a.    ./opt/project/cq/crx-quickstart/bin/start
48.    Once the server is up, follow the instructions listed at the bottom of the document for “Installing Supplemental Packages”
Create the “all” Group and “Jenkins” user //todo
49.    Log into CQ using the following url: http://<servername>:<port>/welcome , port is as configured in the start script
50.    Select “Users” link from the welcome page (after logging in)
51.    From the resulting page, click “Edit”
52.    From the resulting drop-down, select “Create”
53.    From that drop-down, select “Create Group”
54.    In the group name field, write “all” and click “Create”
55.    Double-click the group from the left column
56.    Select “Permissions” tab from the right column
57.    Click the “Read” checkbox at the top-level folder.
58.    Select “Save” from the right column (located under the tabs on the left).
59.    Again, click the “Edit” button
60.    From the resulting drop-down, select “Create”
61.    From that drop-down, select “Create User”
62.    In the user name field and last name field, write “jenkins”
63.    In the password fields, write “jenkinsadmin”
64.    Click “create”
65.    Double-click the user from the left column
66.    Select “Groups” tab from the right column
67.    Drag the “administrator” group into the list
68.    If it is a publish instance, open the permissions tab and select “read” from “/etc/packages” path
69.    Select “Save” from the right column (located under the tabs on the left).
Create other server instances     //skip
70.    (For author instances only) , modify the cluster.properties file:
a.    vi /opt/project/cq/crx-quickstart/repository/cluster.properties
71.    (For author instances only) – within the cluster.properties, add the following line:
a.    addresses=<node1_ip>,<node2_ip>, … <noden_ip>
b.    This is a comma separated list of all author nodes included in the cluster.  It should include the current node as well.  (i.e addresses=192.168.1.100,192.168.1.101)
72.    Copy the configured instance to all other clustered node locations
a.    scp -r <node1>:/opt/project/cq/crx-quickstart <node2>:/opt/project/cq/crx-quickstart
73.    On each of the newly created crx-quickstart nodes, remove the cluster_node.id file so it gets a unique value.
a.    rm /opt/project/cq/crx-quickstart/repository/cluster_node.id
74.    On each of the newly created nodes, ensure the symbolic links are set correctly for the log directory (See “Setting the shared log directory” above)
75.    Start each of the nodes.

Other Required Configurations: //todo   only for Author
OSGi configurations – modify log location to /opt/project/logs – These can all be modified from within crxde-light
Replication agents – Modify the default agent
1.    From any of the author servers, go to http://<server>:<port>/miscadmin#/etc/replication/agents.author
2.    From the right navigation, double-click “Default Agent”
3.    From the settings bar, click “Edit”
4.    Select the dialog, select the “Transport” tab.
5.    Modify the url to point to a publish instance
6.    Modify the user to use an administrator on that server.
Create another “Default Agent” for each remaining publish instance: //skip as we have only instance.
1.    From any of the author servers, go to http://<server>:<port>/miscadmin#/etc/replication/agents.author
2.    From the right navigation,  click “Default Agent”
3.    From the top bar, click “copy”
4.    From the top bar, click “paste”
5.    Double-click the newly created “Default Agent”
6.    From the settings bar, click “Edit”
7.    Select the dialog, select the “Transport” tab.
8.    Modify the url to point to another publish instance
9.    Modify user to be an administrator on the publish instance.
10.    Repeat steps A-H until all publish instances have a corresponding “Default Agent”
Reverse Replication agents – Modify the Reverse Replication Agents
1.    From any of the author servers, go to http://<server>:<port>/miscadmin#/etc/replication/agents.author
2.    From the right navigation, double-click “Reverse Replication Agent”
3.    From the settings bar, click “Edit”
4.    Select the dialog, select the “Transport” tab.
5.    Modify the url to point to a publish instance
6.    Modify    the user to be an administrator on publish
Create another “Reverse Replication Agents” for each remaining publish instance: //skip as we have only one instance.
1.    From any of the author servers, go to http://<server>:<port>/miscadmin#/etc/replication/agents.author
2.    From the right navigation,  click “Reverse Replication Agent”
3.    From the top bar, click “copy”
4.    From the top bar, click “paste”
5.    Double-click the newly created “Reverse Replication Agent”
6.    From the settings bar, click “Edit”
7.    Select the dialog, select the “Transport” tab.
8.    Modify the url to point to another publish instance
9.    Modify the user to be the admin user on this publish instance
10.    Repeat steps A-H until all publish instances have a corresponding “Reverse Replication Agent”
Dispatcher Flush – Modify the dispatcher flush agent //to-do only on Author
1.    From any of the author servers, go to http://<server>:<port>/miscadmin#/etc/replication/agents.author
2.    From the right navigation, double-click “Dispatcher Flush Agent”
3.    From the settings bar, click “Edit”
4.    Select the dialog, select the “Transport” tab.
5.    Modify the url to point to a dispatcher instance
6.    Modify the user to be the admin user on this publish instance
Dispatcher Flush – Create  the dispatcher flush agent for remaining dispatchers //skip
1.    From any of the author servers, go to http://<server>:<port>/miscadmin#/etc/replication/agents.author
2.    From the right navigation,  click “Dispatcher Flush Agent”
3.    From the top bar, click “copy”
4.    From the top bar, click “paste”
5.    Double-click the newly created “Dispatcher Flush Agent”
6.    From the settings bar, click “Edit”
7.    Select the dialog, select the “Transport” tab.
8.    Modify the url to point to another dispatcher instance
9.    Modify the user to be the admin user on this publish instance
Changing the Log directory location  //todo
The easiest way to preform this action is to make a symbolic link from /opt/project/cq/crx-quickstart/logs to the target log directory.  In our setup, this is /opt/project/logs.
The command for that is:
ln –s /opt/project/logs /opt/project/cq/crx-quickstart/logs
Configuring Entitled ACL Provider     //todo both on Author and Publish
**Note**
This requires the Security Fragment to be installed.  This can be done from the buildSetup profile through CI or directly through MVN.
1.    Open the workspace.xml file:
a.    vi /opt/project/cq/crx-quickstart/repositories/workspaces/crx.default/workspace.xml
2.    Modify the WorkspaceSecurity tag to point to the EntitledACLProvider class provided by the Security bundle.  Modified content highlighted below:
<WorkspaceSecurity>
<AccessControlProvider  
class="com.company.project.security.authorization.service.AccessEvaluator">
                <param name="omit-default-permission" value="true"/>
            </AccessControlProvider>
        </WorkspaceSecurity>
3.    Save and close the file
4.    Restart the server. (Again, make sure fragment is already installed prior to restarting the server.)

Installing Supplemental Packages ***Deprecated, this is taken care of through CI now*** // can be done later.
These are the supplemental packages that need to be installed:
•    login_redirect.zip
•    e2e_test.zip
•    404.zip
•    Osgi settings.zip
For each of the zip files from above, please do the following steps
1.    Go to the CQ Package Manager at the following url:
a.    http://<server>:<port>/crx/packmgr/
2.    Log in with an administrator account. 
3.    From the resulting page, click “Upload”
4.    Select the package from the “Browse” dialog
5.    Select “Upload”
6.    The package should now appear at the top of the list.  Select “Install”.
7.    From the resulting dialog, select “Install” again
8.    Repeat 1-7 for each of the packages above