AEM 6530 - Quick Instructions to Install AEM with S3 Datastore on CentOS


Install AEM 65 on CentOS with Amazon S3 bucket configured as Datastore

For more detail check aem documentation

Thank you Bryan Stopp for the help with aem service commands


1) Assuming you are accessing the CentOS server from Windows client using ssh, set the following in  C:\Users\<user>\.ssh\config so the terminal doesn't timeout

                              ServerAliveInterval 120

2) Assuming you have an S3 bucket available with  name experience-aem-65 in region us-east-1

3) Download aws s3 connector from adobe software distribution eg.*&orderby=%40jcr%3Acontent%2Fjcr%3AlastModified&orderby.sort=desc&layout=list&p.offset=0&p.limit=2

4) Upload the jdk jar, aem 65 jar,, s3 connector zip to a location on the server e.g. /mnt/crx/packages (here i used Filezilla)

5) Install Java

                              > sudo su
                              > mkdir /mnt/java
                              > cd /mnt/java
                              > tar -zxf /mnt/crx/packages/jdk-8u241-linux-x64.tar.gz -C .
                              > sudo update-alternatives --install /usr/bin/java java /mnt/java/jdk1.8.0_241/bin/java 1
                              > sudo vi ~/.bashrc
                                       # Set java environment
                               export JAVA_HOME=/mnt/java/jdk1.8.0_241
                               export PATH=${PATH}:${JAVA_HOME}/bin

6) Make sure you have read and write access to the S3 bucket (generally a IAM role is configured on the box to access S3 without credentials)
                              > aws s3api list-objects --bucket experience-aem-65
                              > aws s3api put-object --bucket experience-aem-65 --key test --body some_text_file.txt

7) Unpack the AEM S3 bundle on server

                              > unzip -d /mnt/crx/packages/s3

8) Unpack AEM

                              > sudo su
                              > cp /mnt/crx/packages/cq-quickstart-6.5.0-p4502.jar /mnt/crx/author/
                              > cp /mnt/crx/packages/ /mnt/crx/author/
                              > cd /mnt/crx/author
                              > java -jar cq-quickstart-6.5.0-p4502.jar -unpack 

9) Copy the S3 bundle jars and config files

                              > sudo su
                              > cp -R /mnt/crx/packages/s3/jcr_root/libs/system/install /mnt/crx/author/crx-quickstart/install
                              > cp /mnt/crx/packages/s3/jcr_root/libs/system/config/org.apache.jackrabbit.oak.plugins.blob.datastore.S3DataStore.config /mnt/crx/author/crx-quickstart/install
                              > cp /mnt/crx/packages/s3/jcr_root/libs/system/config/org.apache.jackrabbit.oak.segment.SegmentNodeStoreService.config /mnt/crx/author/crx-quickstart/install
                              > chmod -R 777 /mnt/crx/author

10) Edit the S3 datastore config file to provide the following bucket info eg. /mnt/crx/author/crx-quickstart/install/org.apache.jackrabbit.oak.segment.SegmentNodeStoreService.config

     The following properties assume S3 IAM role was configured, otherwise you need to provide accessKey and secretKey as well.
     The other property secret is for sharing this data store with publish for binaryless replication


11) Install AEM with runmode crx3tar-nofds

                              > sudo su
                              > cd /mnt/crx/author
                              > java -jar cq-quickstart-6.5.0-p4502.jar -r crx3tar-nofds

12) To run AEM with service user

                              > sudo groupadd aem
                              > sudo useradd -M aem -g aem
                              > sudo chown -R aem:aem /mnt/crx/author
                              > vi /lib/systemd/system/aem.service
                                               Description=Adobe Experience Manager


                                               # We want systemd to give aem some time to finish gracefully, but still want
                                               # it to kill aem after TimeoutStopSec if something went wrong during the
                                               # graceful stop. Normally, Systemd sends SIGTERM signal right after the
                                               # ExecStop, which would kill aem. We are sending useless SIGCONT here to give
                                               # aem time to finish.


                              > sudo chmod 644 /lib/systemd/system/aem.service
                              > sudo systemctl enable aem.service

13) Commands to run AEM

                              Start AEM:  sudo systemctl start aem
                              Stop AEM:  sudo systemctl stop aem
                              AEM Status:  sudo systemctl status aem

No comments:

Post a Comment