Setup a service in Centos 6.5
First check if the service is setup and set to run:
chkconfig --list
chkconfig --list | grep 3:on
;; lists processes set to start on boot
If the service is not listed here or needs modification, we need to add it to the etc/init.d folder. For eg., if it is missing the tomcat8 script:
cp script /etc/init.d/tomcat8
chmod +x /etc/init.d/tomcat8
chkconfig --add tomcat8
chkconfig --list tomcat8
chkconfig tomcat8 on