LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   AIX (https://www.linuxquestions.org/questions/aix-43/)
-   -   startup services in AIX (https://www.linuxquestions.org/questions/aix-43/startup-services-in-aix-445581/)

sanjeevkchopra 05-17-2006 01:16 AM

startup services in AIX
 
Hi all,

Can anybody tell me how an application can be made a startup service in AIX.

Thanks and regards,
Sanjeev Kumar.

AbrahamJose 05-17-2006 06:15 AM

startsrc
 
Do u mean services?
In AIX they are called daemons.

startsrc -g group_of_daemons
startsrc -s subsystem_daemon

Eg. startsrc -g spooler
startsrc -s lpd

SEE man startsrc
Also see stopsrc

AbrahamJose 05-22-2006 08:31 PM

R U satisfied
 
My previous answer was with out properly understanding the question.

Is my anwer enough 4 u.
Or do u mean an autostartup after system boot.

Use one of the file, of ur choice, /etc/rc.*

Michael AM 05-27-2006 09:30 AM

AIX supports both the system V interface of /etc/rc.d .... as well as a "System Resource Controller" (startsrc, stopsrc, refreshsrc, lssrc).

To add applications to the SRC system, use the command defsys.

To control existing AIX subsystems you can use smit to set default (i.e. boot settings).

smit otherserv

is the fastpath.

sanjeevkchopra 06-28-2006 05:43 AM

Quote:

Originally Posted by AbrahamJose
Do u mean services?
In AIX they are called daemons.

startsrc -g group_of_daemons
startsrc -s subsystem_daemon

Eg. startsrc -g spooler
startsrc -s lpd

SEE man startsrc
Also see stopsrc


Suppose if we want to make tomcat as startup service in AIX how can we proceed?

AbrahamJose 07-12-2006 02:51 AM

Manually do?
 
I haven't much idea about tomcat.
How do you start it manually.
I mean the command/script to start it.

sanjeevkchopra 07-20-2006 01:14 AM

if we put a daemon script(say with name my_script) in the /etc/init.d/ directory in AIX
then how we have to proceed in order to make it startup service.

I want to know all the commands to be executed stepwise.

Thanks and Regards
Sanjeev.

jyoung4 08-23-2006 01:14 PM

To get a daemon to start when the system in rebooted, you can follow the standard Sys V procedure of creating start/stop shell scripts in the /etc/rc.d/* directories. I created the following two scripts:
One moves the system from run level 2 to run level 3. The second, starts both Samba and Tomcat. All of the startup scripts we create run at run level 3. (That's our convention, not a requirement.) The directory /etc/rc2.d/samples on most AIX systems has a README.txt file and some more sample start/stop scripts.

Script #1 - /etc/rc.d/rc2.d/S99jay
Code:

#!/bin/ksh

##################################################
# name: S99jay
# purpose: script to kick the system to run level 3
##################################################

case "$1" in
start )
        telinit 3
        ;;
stop )
        ;;
* )
        echo "Usage: $0 (start | stop)"
        exit 1
esac

Script #2 - /etc/rc.d/rc2.d/S70jay
Code:

#!/bin/ksh

##################################################
# name: S70jay
# purpose: script to start both the wkiki and samba
##################################################


case "$1" in
start )
        /usr/local/samba/bin/smbd -D
        ERROR=$?

        /usr/local/samba/bin/nmbd -D
        ERROR2=$?
        if [ $ERROR2 -ne 0 ]
        then
                ERROR=1
        fi

        return $ERROR
        /z/tomcat/jakarta-tomcat-4.1.31/bin/startup.sh &
        ;;
stop )
        ;;
* )
        echo "Usage: $0 (start | stop)"
        exit 1
esac



All times are GMT -5. The time now is 11:21 PM.