Está en la página 1de 4

AUTOMATIC STARTING OF LIFERAYTOMCAT

st
 1    Step:
    Following is the code to start the tomcat automatically
#!/bin/bash
# chkconfig: ­ 10 20
# description: Liferay

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

PATH=/usr/java/jdk1.5.0_02/bin:$PATH:$HOME/bin:./

export PATH
export JAVA_HOME=/usr/java/jdk1.5.0_02/
export CLASSPATH=/usr/java/jdk1.5.0_02/lib/tools.jar:/usr/java/jdk1.5.0_02/jre/lib/rt.jar:./
export CATALINA_HOME=/opt/LIFERAY/

unset USERNAME

start()
        {
        cd /opt/LIFERAY/bin
        sh startup.sh
       }

stop()
        {
        cd /opt/LIFERAY/bin
        sh shutdown.sh
        }

FILE NAME: AUTOMATIC_START_LIFERAY.DOC AUTHOR NAME: ABHISHEK KAVI


AUTOMATIC STARTING OF LIFERAYTOMCAT

case "$1" in
start)
        start
        ;;
stop)
        stop
        ;;
restart)
        stop
        start
        ;;

*)
 echo "start | stop | restart"
esac

This code can be saved in any name.      (For Example i put S10_liferaylnp)

 2  nd  Step
   : The code must copied on the following path in LINUX SYSTEM(This must done using root 
username)
/opt/nodeconfig. 

If not then create it.

 3  nd  Step
   : Copy same code in the following path in LINUX SYSTEM
/etc/rc.d/init.d. 

rd
 4    Step
   : Then go to the following path   in LINUX SYSTEM(This must done using root username)
/sbin. And give this command 
chkconfig ­­add name.               (For Example  chkcongig ­­add S10_liferaylnp)

FILE NAME: AUTOMATIC_START_LIFERAY.DOC AUTHOR NAME: ABHISHEK KAVI


AUTOMATIC STARTING OF LIFERAYTOMCAT

th
 5    Step
    : check for configuration using this command
 chkconfig ­­list | sort | less

you can see your code name. (For Example you can see my codename bellow S10_liferaylnp)

.....
....
....
nfs             0:off   1:off   2:off   3:off   4:off   5:off   6:off
nfslock         0:off   1:off   2:off   3:on    4:on    5:on    6:off
nifd            0:off   1:off   2:off   3:on    4:on    5:on    6:off
nscd            0:off   1:off   2:off   3:off   4:off   5:off   6:off
ntpd            0:off   1:off   2:off   3:off   4:off   5:off   6:off
pcmcia          0:off   1:off   2:on    3:on    4:on    5:on    6:off
portmap         0:off   1:off   2:off   3:on    4:on    5:on    6:off
psacct          0:off   1:off   2:off   3:off   4:off   5:off   6:off
rdisc           0:off   1:off   2:off   3:off   4:off   5:off   6:off
rhnsd           0:off   1:off   2:off   3:on    4:on    5:on    6:off
rpcgssd         0:off   1:off   2:off   3:on    4:on    5:on    6:off
rpcidmapd       0:off   1:off   2:off   3:on    4:on    5:on    6:off
rpcsvcgssd      0:off   1:off   2:off   3:off   4:off   5:off   6:off
        rsync:          off
rwhod           0:off   1:off   2:off   3:off   4:off   5:off   6:off
S10_liferaylnp  0:off   1:off   2:on    3:on    4:on    5:on    6:off
saslauthd       0:off   1:off   2:off   3:off   4:off   5:off   6:off
sendmail        0:off   1:off   2:on    3:on    4:on    5:on    6:off
smb             0:off   1:off   2:off   3:off   4:off   5:off   6:off
spamassassin    0:off   1:off   2:off   3:off   4:off   5:off   6:off
squid           0:off   1:off   2:off   3:off   4:off   5:off   6:off
sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
....
....
....
....

FILE NAME: AUTOMATIC_START_LIFERAY.DOC AUTHOR NAME: ABHISHEK KAVI


AUTOMATIC STARTING OF LIFERAYTOMCAT

Check whether number 2, 3, 4, 5 it is on or off
if off then following command will must write

chkconfig name on.      (For Example chkconfig S10_liferaylnp on)

th
 6    Step
   : Then got the nodeconfig and give this command
 chown username:username name.  (For Example chown abhishek.k:abhishek.k S10_liferaylnp)

FILE NAME: AUTOMATIC_START_LIFERAY.DOC AUTHOR NAME: ABHISHEK KAVI

También podría gustarte