The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > AIX
.
google unix.com



AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
start services during the startup s_linux SuSE 8 05-29-2009 12:41 PM
run script at startup pchangba1 AIX 1 11-06-2008 10:51 AM
Startup script texaspanama Shell Programming and Scripting 2 06-29-2006 04:08 PM
ksh in rc3.d startup script JayNick Shell Programming and Scripting 1 05-19-2006 12:28 PM
Startup script DSL c19h28O2 Shell Programming and Scripting 0 04-11-2006 05:54 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-27-2009
ITHelper ITHelper is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 26
Startup script and services

Guy's

What the exact steps to mention for example this script /usr/start/start.sh
to be as start up script , I want it to be automatically started when I reboot the server .
  #2 (permalink)  
Old 10-27-2009
dplinux dplinux is offline
Registered User
  
 

Join Date: May 2009
Location: Irving,TX
Posts: 32
insert Line in inittab

use mkitab command
or
go to /etc/inittab and look at the sample lines

you can also put it in /etc/profile...it depends on the content of the file...
  #3 (permalink)  
Old 10-28-2009
zxmaus's Avatar
zxmaus zxmaus is offline Forum Staff  
Moderator
  
 

Join Date: May 2008
Location: /etc/objrepos
Posts: 309
... or if it is supposed to starting just programs, you want to link it into /etc/rc.d/rc2.d/S99start ?

Rgds
zxmaus
  #4 (permalink)  
Old 3 Weeks Ago
shiniraz shiniraz is offline
Registered User
  
 

Join Date: Nov 2009
Location: Kuala Lumpur
Posts: 4
Inittab is more adviceable :

Inittab syntax:
***********
Identifier:RunLevel:Action:Command


To insert entry:
***********
#mkitab "websphresrvr:2:boot:/opt/WebSphere/AppServer/bin/startServer.sh server1"


to view all /etc/inittab entry
*********************
#lsitab -a

Good luck.
Shiniraz
Malaysia
  #5 (permalink)  
Old 3 Weeks Ago
zxmaus's Avatar
zxmaus zxmaus is offline Forum Staff  
Moderator
  
 

Join Date: May 2008
Location: /etc/objrepos
Posts: 309
Shiniraz,

I would say that's a matter of taste or rules - in my opinion no application is supposed to start from inittab - that's for services only. At least in our environment we have to stop and start websphere frequently - so I expect to find a working start/stopscript at a definite location - that is on AIX /etc/rc.d/init.d and linked into rc2.d. Especially if you have separate teams maintaining the server and the applications like in our environment - an entry in inittab would start the application as root. In case of Websphere that would not be acceptable for us.

Kind regards
zxmaus
  #6 (permalink)  
Old 3 Weeks Ago
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
  
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 1,641
zxmaus is correct - in fact it is IMHO a rather bad practice to start applications from the inittab, where only the basic system should be started. Applications should be started from S-scripts and stopped from analogous K-scripts in /etc/rc* - this is the very reason the /etc/rc* does exist in fact.

And this is what i am getting at, for reasons of completeness: even if zxmaus didn't mention it, create a corresponding K-script for every S-script you create lest you get troubles using the init/telinit command to switch runlevels.

Entering a new runlevel is done by first running all the K-scripts of the current runlevel, then entering the new runlevel and first thing running all the S-scripts of the new runlevel. If there is a S-script without a corresponding K-script the started process will be left over.

Btw.. the order of the K-/S-scripts being run is alphabetical - this is why they are usually numbered S01-S99/K01-K99 - to enforce a certain order should that be necessary.

I hope this helps.

bakunin
  #7 (permalink)  
Old 3 Weeks Ago
zxmaus's Avatar
zxmaus zxmaus is offline Forum Staff  
Moderator
  
 

Join Date: May 2008
Location: /etc/objrepos
Posts: 309
Quote:
Originally Posted by bakunin View Post
And this is what i am getting at, for reasons of completeness: even if zxmaus didn't mention it, create a corresponding K-script for every S-script you create lest you get troubles using the init/telinit command to switch runlevels.
Thank you Bakunin - I thought I had covered this with 'working stop/startscripts Probably it comes so naturally to me that they're always paired that I did not even think of mentioning it explicitely - and this thread was about starting ?

Kind regards
zxmaus
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:17 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0