Adobe Experience Manager (AEM) is a powerful content management system used for building and managing digital experiences. This guide provides detailed instructions for installing AEM 6.5 on a CentOS-based system with Amazon S3 configured as the Datastore. Additionally, it includes troubleshooting tips and best practices for integrating Schema App to enhance SEO and metadata management within AEM environments.
Installation Overview
AEM 6.5 can be installed on a CentOS-based server with Amazon S3 configured as the primary data store. This setup is ideal for organizations looking to leverage cloud storage for scalable, distributed content management. The following steps outline the process, from initial server configuration to AEM deployment and post-installation configuration.
Prerequisites and System Setup
Before installing AEM, ensure that the following prerequisites are met:
- A CentOS server is accessible via SSH.
- An Amazon S3 bucket is created and accessible in the U.S. region.
- An IAM role is configured to allow read and write access to the S3 bucket without the need for explicit credentials.
- Java 8 is installed on the server.
- The AEM 6.5 JAR file and S3 connector bundle are available.
Configuring SSH Settings
To prevent SSH sessions from timing out during long installation processes, modify the SSH configuration on the Windows client:
bash
ServerAliveInterval 120
This setting ensures that the connection remains active during the installation.
Java Installation
Java 8 is required to run AEM. To install Java:
bash
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
Set the JAVA_HOME
and update the PATH
in the .bashrc
file:
bash
export JAVA_HOME=/mnt/java/jdk1.8.0_241
export PATH=${PATH}:${JAVA_HOME}/bin
Amazon S3 Access Verification
Before proceeding with the AEM installation, verify that the server has read and write access to the S3 bucket. This is typically achieved by assigning an IAM role to the server instance:
bash
aws s3api list-objects --bucket experience-aem-65
aws s3api put-object --bucket experience-aem-65 --key test --body some_text_file.txt
If the commands execute successfully, the server can access the S3 bucket.
AEM Installation with S3 Datastore
Downloading and Preparing Files
Download the following files to the server:
- AEM 6.5 JAR file
- JDK 8
- S3 connector bundle
- License file
Upload these files to the server using an SFTP client such as Filezilla.
Unpacking and Configuring AEM
Navigate to the directory containing the AEM JAR file and unpack it:
bash
cd /mnt/crx/author
java -jar cq-quickstart-6.5.0-p4502.jar -unpack
Copy the S3 connector bundle and configuration files:
bash
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
Ensure the correct permissions are set:
bash
chmod -R 777 /mnt/crx/author
Configuring S3 Datastore
Edit the S3 datastore configuration file to include the bucket name, region, and secret key:
bash
s3Bucket="experience-aem-65"
s3Region="us-east-1"
secret="eaem"
If an IAM role is configured, the access key and secret key are not required.
Running AEM with Custom Run Mode
To install AEM with the crx3tar-nofds
run mode:
bash
cd /mnt/crx/author
java -jar cq-quickstart-6.5.0-p4502.jar -r crx3tar-nofds
This run mode is optimized for environments where the file data store is not needed.
Setting Up AEM as a Systemd Service
To ensure AEM runs as a service on startup, create a systemd service file:
bash
sudo groupadd aem
sudo useradd -M aem -g aem
sudo chown -R aem:aem /mnt/crx/author
Create the service file at /lib/systemd/system/aem.service
with the following content:
```ini [Unit] Description=Adobe Experience Manager After=network.target remote-fs.target nss-lookup.target
[Service] Type=forking PIDFile=/mnt/crx/author/crx-quickstart/conf/cq.pid User=aem Group=aem ExecStart=/mnt/crx/author/crx-quickstart/bin/start ExecStop=/mnt/crx/author/crx-quickstart/bin/stop TimeoutStopSec=4min KillSignal=SIGCONT PrivateTmp=true
[Install] WantedBy=multi-user.target ```
Enable and start the service:
bash
sudo chmod 644 /lib/systemd/system/aem.service
sudo systemctl enable aem.service
sudo systemctl start aem.service
Post-Installation Configuration
After installation, additional configuration is required to ensure optimal performance and integration with external services such as Schema App.
Dispatcher Configuration
If the AEM instance uses a dispatcher, it must be configured to allow Schema App requests. Edit the dispatcher configuration file:
bash
[base project]/dispatcher/src/conf.dispatcher.d/filters/filters.any
Add a filter rule to allow Schema App requests:
bash
/filter
/0001 { /type "allow" /glob "*" }
Save the file and rebuild the AEM instance.
Enabling POST Requests
Schema App requires POST requests to update schema markup. To enable POST requests, configure the Apache Sling Referrer Filter:
- Navigate to
system/console/configMgr
. - Search for
Apache Sling Referrer Filter
. - Check the
Allow Empty
checkbox.
This allows Schema App to send POST requests without being blocked.
Schema App Integration
Schema App enhances SEO by adding structured data in JSON-LD format. To integrate Schema App:
- Add the Schema App JavaScript to the page header.
- Configure the connector in the page properties in AEM.
- Verify that the correct domain and API keys are used.
The JSON-LD markup is injected at runtime in the page header, and the schema data is stored under the page in AEM.
Troubleshooting Common Issues
Dispatcher Configuration Issues
If Schema App is not working correctly, verify that the dispatcher is configured to allow the necessary requests. The configuration should include rules to allow POST and other required methods.
CDN Configuration
If a CDN is in use, ensure it is configured to allow POST requests and respects caching rules from the origin. The CDN should update cached content when new JSON-LD is generated.
JavaScript Performance
The Schema App JavaScript has minimal impact on page performance. However, if the script fails to match a Highlighter template, it may retry multiple times, which can affect performance. Ensure that templates are correctly configured to minimize retries.
Webhook Failover
Webhooks used by Schema App will automatically retry up to five times. To view the results of webhook calls, check the Schema App dashboard at https://app.schemaapp.com/integrations/webhook.
Multi-Regional and Multi-Site Configuration
A single AEM deployment can support multiple regional or multi-site configurations. Each site can be configured individually within the Schema App account. This allows organizations to manage SEO and metadata for different regions or websites within a single AEM instance.
Managing Multiple Websites
Each website can be configured separately in Schema App. This includes setting different domains, API keys, and configuration settings. If all regions are part of a single website, configuration can be applied at the folder or page level.
AEM On-Prem and AEMaaCS Support
Schema App supports both AEM On-Prem and AEMaaCS (Adobe Experience Manager as a Cloud Service). This allows organizations to use Schema App across different deployment models for different parts of their website.
Conclusion
Installing Adobe Experience Manager with Amazon S3 as the data store is a robust solution for organizations requiring scalable, cloud-based content management. This guide has detailed the process for setting up AEM on a CentOS server, configuring S3 as the data store, and integrating Schema App for enhanced SEO and metadata management. By following these steps, system administrators and developers can ensure a reliable and high-performance AEM deployment tailored to their specific needs.