Professional Documents
Culture Documents
Setting up AEM
Create the folder /opt/aem6/ and copy the jar and licence.properties files. We can use WinSCP client to
transfer files from our machine to user home folder of Linux box.
mkdir /opt/aem6
cd $home
cp licence.properties /opt/aem6
cp aem-6.0.0.20140515-generic.jar /opt/aem6
Start the server using the below command. The below command is for author server. For publish, please
change author to publish. In order to have custom run mode like dev, qa, prod etc., add the same
comma separated after –r in the below command. If we do not need sample content (geometrixx etc),
then add nosamplecontent to run mode.
After starting server, stop it and then go to /opt/aem6/crx-quickstart/bin and update start shell script
with new run modes, port, nofork and JMX params.
Copy below aem start up script to /etc/init.d. Create file named aem inside /etc/init.d and copy below
content. In case if you are creating file from windows machine and transferring the same to Linux
machine, then run command dos2unix aem.
#!/bin/sh
#/etc/init.d/aem
#chkconfig:35 85 15
#description:aem startup script for publish the actual scripts are in /opt/aem6/crx-quickstart/bin/
#processname:aem
#pidfile:/crx-quickstart/conf/cq.pid
#Source function library
. /etc/rc.d/init.d/functions
CQ_ROOT="/opt/aem6"
CQ_USER="root"
SERVER="${CQ_ROOT}/crx-quickstart"
START="${SERVER}/bin/start"
STOP="${SERVER}/bin/stop"
STATUS="${SERVER}/bin/status"
usage(){
echo "Usage: $0 {start|stop|restart|status}"
#exit 0
}
if [ $0 != 1 ]; then
usage
fi
start(){
echo -n "Starting cq:"
su - ${CQ_USER} ${START}
/etc/init.d/iptables stop
touch /var/lock/subsys/aem
}
stop(){
echo -n "Stopping cq:"
su - ${CQ_USER} ${STOP}
rm -f /var/lock/subsys/aem
}
status(){
su - ${CQ_USER} ${STATUS}
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status
;;
*)
usage
;;
esac
exit 0
cd /etc/init.d
chmod 755 aem
chkconfig --add aem
chkconfig --level 35 aem on
ln --s /etc/init.d/aem /etc/rc2.d/S35aem
Now you can start aem as "service aem start" and stop as "service aem stop". Also this automatically
starts the server on reboot.
Obtain the latest CQ dispatcher release from Adobe. Unpack the zip and copy the modules and config.
Add the Loadmodule for dispatchermodule and paste the below configuration to httpd.conf
<IfModule disp_apache2.c>
DispatcherConfig conf/dispatcher.any
DispatcherLog logs/dispatcher.log
DispatcherLogLevel 1
DispatcherNoServerHeader 0
DispatcherDeclineRoot 0
DispatcherUseProcessedURL 0
DispatcherPassError 0
</IfModule>
<Directory />
<IfModule disp_apache2.c>
SetHandler dispatcher-handler
ModMimeUsePathInfo On
</IfModule>
Options FollowSymLinks
AllowOverride None
</Directory>
Since the dispatcher requires a writeable cache directory configured in dispatcher. Execute the following
commands
Edit the dispatcher for render, filters and cache location (docroot). Save dispatcher.any