How to chkconfig (OpenKM JBOSS init script)

It needs some steps to integrate OpenKM properly. Therefore, you basically need to engineer your start script yourself. The following notes should help to get JBOSS up quickly.

1) create a new user 

  # useradd jboss
2) copy script

  # cp JBOSS_HOME/bin/ /etc/init.d/jboss
3) add chkconfig properties to init file

  # chkconfig: 345 65 35
  # description: JBOSS AS init script
  # pidfile: /var/run/
4) adjust all other variables in the init file header 
5) add script to chkconfig
  # chkconfig --add jboss
6) set jboss to be started at level 3
  # chkconfig jboss --level 3 on
7) start now (# service jboss start)

Start and Stop Service in CentOS 5

Use the service command to start and stop services in CentOS 5 Linux distributions. Go for the command chkconfig to edit runlevel entries. Chkconfig will also give a list of available system services. 

start the service
service [name] start

stop the service
service [name] stop

display the service status 
service [name] status

display all the available services 
host# chkconfig --list
crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
dc_client 0:off 1:off 2:off 3:off 4:off 5:off 6:off
dc_server 0:off 1:off 2:off 3:off 4:off 5:off 6:off

automatically run the service on the next startup
chkconfig --level 345 [name] onremove the service from the startup list
chkconfig --level 345 [name] off