Last active
August 13, 2025 22:05
-
-
Save frieder/48f207638c77b76b77d7ff78e83f3391 to your computer and use it in GitHub Desktop.
AEM 6.x systemd start script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| The following start script has been tested with SLES 12 SP2, AEM 6.3 and Java 8u161. | |
| ------------------------------------------------------------------------------------------------------------- | |
| cat << 'EOF' > /etc/systemd/system/aem.service | |
| [Unit] | |
| Description=Adobe Experience Manager | |
| After=network.target | |
| [Service] | |
| Type=forking | |
| ExecStart=/data/aem/instance/crx-quickstart/bin/start | |
| ExecStop=/data/aem/instance/crx-quickstart/bin/stop | |
| User=aem | |
| WorkingDirectory=/data/aem/instance | |
| PIDFile=/data/aem/instance/crx-quickstart/conf/cq.pid | |
| LimitNOFILE=16000 | |
| KillSignal=SIGINT | |
| [Install] | |
| WantedBy=multi-user.target | |
| EOF | |
| -------------------------------------------- | |
| mkdir /etc/systemd/system/aem.service.d/ | |
| -------------------------------------------- | |
| cat << 'EOF' > /etc/systemd/system/aem.service.d/aem.conf | |
| [Service] | |
| Environment="CQ_PORT=4502" | |
| Environment="CQ_RUNMODE=author,runmode1,runmode2,nosamplecontent" | |
| Environment="CQ_JVM_OPTS=-server \ | |
| -Djava.awt.headless=true \ | |
| -Djava.io.tmpdir=/data/aem/tmp/ \ | |
| -Djavax.net.ssl.trustStore=/data/java/jdk8_171/jre/lib/security/cacerts \ | |
| -Djavax.net.ssl.trustStorePassword=changeit \ | |
| -Xmx12g \ | |
| -XX:MaxMetaspaceSize=1g \ | |
| -XX:+HeapDumpOnOutOfMemoryError \ | |
| -XX:HeapDumpPath=/data/aem/dumps/ \ | |
| -XX:+PrintGCDateStamps -verbose:gc \ | |
| -XX:+PrintGCDetails \ | |
| -Xdebug \ | |
| -Xrunjdwp:transport=dt_socket,server=y,address=45028,suspend=n \ | |
| -XX:+JavaMonitorsInStackTrace \ | |
| -Dcom.sun.management.jmxremote.port=45029 \ | |
| -Dcom.sun.management.jmxremote.ssl=false \ | |
| -Dcom.sun.management.jmxremote.authenticate=false \ | |
| -XX:+UseGCLogFileRotation \ | |
| -XX:NumberOfGCLogFiles=5 \ | |
| -XX:GCLogFileSize=20M \ | |
| -Xloggc:/data/aem/logs/gc.log" | |
| EOF |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You are right with your suggestions. At work we already do it as you described but I didn't update the snippet here. Thx for pointing it out, I'll update this now.