Instructions

 You’ll need to make the script executable by running the chmod command:
 
sudo chmod 755 /etc/init.d/liferay
 
The last step is actually linking this script to the startup folders with a symbolic link. Execute these two commands and we should be on our way.
 
sudo ln -s /etc/init.d/liferay /etc/rc1.d/K99liferay
sudo ln -s /etc/init.d/liferay /etc/rc2.d/S99liferay