LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 05-17-2006, 01:16 AM   #1
sanjeevkchopra
LQ Newbie
 
Registered: May 2006
Posts: 14

Rep: Reputation: 0
Unhappy 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.
 
Old 05-17-2006, 06:15 AM   #2
AbrahamJose
Member
 
Registered: Feb 2006
Location: India
Posts: 167

Rep: Reputation: 31
Post 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
 
Old 05-22-2006, 08:31 PM   #3
AbrahamJose
Member
 
Registered: Feb 2006
Location: India
Posts: 167

Rep: Reputation: 31
Post 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.*
 
Old 05-27-2006, 09:30 AM   #4
Michael AM
Member
 
Registered: May 2006
Distribution: AIX 5.3, AIX 6.1, AIX 7.1
Posts: 121

Rep: Reputation: 33
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.
 
Old 06-28-2006, 05:43 AM   #5
sanjeevkchopra
LQ Newbie
 
Registered: May 2006
Posts: 14

Original Poster
Rep: Reputation: 0
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?
 
Old 07-12-2006, 02:51 AM   #6
AbrahamJose
Member
 
Registered: Feb 2006
Location: India
Posts: 167

Rep: Reputation: 31
Manually do?

I haven't much idea about tomcat.
How do you start it manually.
I mean the command/script to start it.
 
Old 07-20-2006, 01:14 AM   #7
sanjeevkchopra
LQ Newbie
 
Registered: May 2006
Posts: 14

Original Poster
Rep: Reputation: 0
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.
 
Old 08-23-2006, 01:14 PM   #8
jyoung4
LQ Newbie
 
Registered: Apr 2006
Location: Minneapolis, Minnesota, USA
Posts: 16

Rep: Reputation: 1
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
startup services kola Fedora 2 12-02-2004 05:47 PM
how 2 remove services from startup?? fhameed Linux - Software 4 08-30-2004 10:39 PM
Services startup? mikedderuki Linux - Software 5 09-26-2003 04:44 PM
Startup services Road Linux - General 5 06-07-2002 05:34 PM
Startup Services Stephanie Linux - General 2 08-07-2001 09:37 AM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 05:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration