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 .
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 .
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...
... or if it is supposed to starting just programs, you want to link it into /etc/rc.d/rc2.d/S99start ?
Rgds
zxmaus
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
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
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
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
I run something similar to automatically mount some NFS share, I use the inittab.
I think I would rather use automount to mount nfs shares than inittab ?
Kind regards
zxmaus