• Skip to content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
  • Content
  • Java
  • Sightly
  • AngularJS
  • Web services
  • More
    • Testing
    • Adobe Marketing Cloud
      • Adobe Analytics
      • Adobe Campaigns
      • Adobe Target
    • Replication
    • Forms
    • Files
    • 3rd Party
    • Troubleshooting
    • Installation and Configuration
    • References

Practical AEM

By Developers To Developers

  • Content
  • Java
  • Sightly
  • AngularJS
  • Web services
  • More
    • Testing
    • Adobe Marketing Cloud
      • Adobe Analytics
      • Adobe Campaigns
      • Adobe Target
    • Replication
    • Forms
    • Files
    • 3rd Party
    • Troubleshooting
    • Installation and Configuration
    • References

Configuring AEM as a Service on CentOS 7

March 27, 2018 By ksurendra

This article details how to setup AEM as a service on CentOS/Linux

Step-by-step guide

  • You will need root access
  • Download these 2 files

File: aem

aem file
Shell
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
            #
            # /etc/rc.d/init.d/aem6
            #
            #
            # # of the file to the end of the tags section must begin with a #
            # character. After the tags section, there should be a blank line.
            # This keeps normal comments in the rest of the file from being
            # mistaken for tags, should they happen to fit the pattern.>
            #
            # chkconfig: 35 85 15
            # description: This service manages the Adobe Experience Manager java process.
            # processname: aem6
            # pidfile: /crx-quickstart/conf/cq.pid
 
            # Source function library.
            . /etc/rc.d/init.d/functions
 
            SCRIPT_NAME=`basename $0`
            AEM_ROOT=/opt/aem6
            AEM_USER=aem
 
            ########
            BIN=${AEM_ROOT}/crx-quickstart/bin
            START=${BIN}/start
            STOP=${BIN}/stop
            STATUS="${BIN}/status"
 
case "$1" in
start)
echo -n "Starting AEM services: "
su - ${AEM_USER} ${START}
touch /var/lock/subsys/$SCRIPT_NAME
;;
stop)
echo -n "Shutting down AEM services: "
su - ${AEM_USER} ${STOP}
rm -f /var/lock/subsys/$SCRIPT_NAME
;;
status)
su - ${AEM_USER} ${STATUS}
;;
restart)
su - ${AEM_USER} ${STOP}
su - ${AEM_USER} ${START}
;;
reload)
;;
*)
echo "Usage: $SCRIPT_NAME {start|stop|status|reload}"
exit 1
;;
esac

  • File: aem.service

aem.service file
Shell
1
2
3
4
5
6
7
8
9
10
11
12
[Unit]
        Description=Adobe Experience Manager
 
        [Service]
        Type=simple
        ExecStart=/usr/bin/aem start
        ExecStop=/usr/bin/aem stop
        ExecReload=/usr/bin/aem restart
        RemainAfterExit=yes
 
        [Install]
        WantedBy=multi-user.target

  • Open aem script file and update the below
    • AEM_ROOT (e.g: /mnt/crx is the root, where /mnt/crx/crx-quickstart is the full path)
    • AEM_USER (e.g: aem)
  • SCP these files to the server
    • Copy aem to /usr/bin/aem
      • Example: From terminal on your desktop $ scp user@1.1.1.1:/usr/bin/aem
    • Copy aem.service to /etc/system.d/system/aem.system
      • Example: From terminal on your desktop $ scp user@1.1.1.1:/etc/system.d/system/aem.system
  • SSH to your server
    • ssh user@1.1.1.1
  • Give permissions to the files
    • sudo chmod u+rwx /usr/bin/aem
    • sudo chmod u+rwx /etc/system.d/system/aem.system
  • Update
    • cd /etc/system.d/system
    • systemctl enable aem.system
  • You can restart the server or run the below commands to start AEM. Make sure you run Pre-requisite Step 2 before running this command.

 

Commands to START, RESTART and STOP AEM
1) Start AEM – sudo service aem start
2) Restart AEM – sudo service aem restart
3) Stop AEM – sudo service aem stop

Notes
* The example above was tested on CentOS 7
* AEM 6.3 version was used. Although the above process should work for AEM 6.x

Filed Under: Installation and Configuration Tagged With: centos, service

Primary Sidebar

  • Facebook
  • Google+
  • Instagram
  • LinkedIn
  • Pinterest
  • Twitter

Angular JS

Issues with download files in IE using Angular and Fix

November 20, 2015 By ksurendra

AngularJS Setup in AEM

November 11, 2015 By ksurendra

More Topics

  • 3rd Party
  • AngularJS
  • Assets
  • Content
  • Dispatcher
  • Files
  • Forms
  • Installation and Configuration
  • Java
  • References
  • Replication
  • Reports
  • Sightly
  • Sling
  • Testing
  • Troubleshooting
  • Uncategorized
  • Web services

Footer

About Us

This is an example of a text widget which can be used to describe a particular service. You can also use other widgets in this location.

Examples of widgets that can be placed here in the footer are a calendar, latest tweets, recent comments, recent posts, search form, tag cloud or more.

Sample Link.

Recent Posts

  • Configuring AEM as a Service on CentOS 7
  • How to set httpOnly and Secure flags on login-token
  • Thumbnails and Renditions for EPS and AI files in AEM – Using ImageMagick and GhostScript
  • Integrating Webtrends with AEM
  • Integrate AEM with Tealium
  • AEM 6.2 Out-of-the-box Asset Reports
  • AEM 6.2 Out-of-the-box Reports

Search

Tags

activate aem aem 6.2 analytics angularjs asset reports books brackets content crx disk space dispatcher dropdown-lists eclipse ffmpeg file-download git google-maps imagemagick junit miscadmin mockito oauth ootb page activity report recaptcha references reports rest reverse proxy sightly sling-servlet submit-action tag management tealium testing tools vault video video-renditions videos vlt wcmusepojo web services webtrends

Copyright © 2019 · Magazine Pro on Genesis Framework · WordPress · Log in