If you want to make your CQ/AEM instance start on system boot in Windows Operating System, I am sure you will find a lot of documentation on that. Even Day (now Adobe) has a page on installing CQ as a Windows service.
But you will hardly find any page on making your CQ/AEM instance start on system boot in Linux Operating System.
But you will hardly find any page on making your CQ/AEM instance start on system boot in Linux Operating System.
I was trying this in Ubuntu 13.0 64 bit OS, but with some R & D, and some help, I was able to achieve this the hard way.
So here goes the steps to make your CQ start on system boot in Linux:
- First, you need to create a shell file with some shell script that describes the start, stop and status case for CQ. For now, let's say you created cq5init.sh file.
Also, let's assume you have installed your CQ instance in /opt directory. So now your crx-quickstart is located in /opt/cq5/crx-quickstart. - Then you need to move shell file to init.d directory in Linux. Use the following to move your file:
# Make sure your terminal is pointing to the directory # where you have saved cq5init file sudo mv cq5init /etc/init.d/
- Then you need to make your shell file executable with raised privileges using the following command:
sudo chmod +x /etc/init.d/cq5init
- Before I explain the next step, the following information might be helpful to understand the next command –>
Linux services can be started, stopped and reloaded with the use of scripts stocked in /etc/init.d/.
However, during start-up or when changing run level, those scripts are searched in /etc/rcX.d/ where X is the runlevel number.
When installing a new service under debian, the default is to enable it. So for instance, if you just installed the apache2 package, after you installed it, the apache service will be started and so will it be upon the next reboots. You could either disable this service on boot up by removing any symbolic links in/etc/rcX.d/SYYapache2 or by using update-rc.d.The advantage of using update-rc.d is that it will take care of removing/adding any required links to /etc/init.d automatically. So on same lines, next command is to register your service with update-rc.d:sudo update-rc.d cq5init defaults
- Now just reboot your system, and if you have done your steps right, your CQ instance will automatically get up.
If I missed any details, that might be helpful to implement this, please post a comment. And if you need help writing the exact shell file for CQ, contact me through comments.
No comments:
Post a Comment
If you have any doubts or questions, please let us know.