LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   server startup script (https://www.linuxquestions.org/questions/linux-newbie-8/server-startup-script-789866/)

elainelaw 02-18-2010 12:21 AM

server startup script
 
I have newly installed Redhat v4 , it works fine , I want the server run some scripts after re-start , I tried to add the script to /etc/rc.local and also tried to add it to /etc/inittab , but it is not work , the script do not run after re-start the server , can advise what is wrong ? thx in advance.

linuxlover.chaitanya 02-18-2010 12:28 AM

Red Hat v4? Do you mean RHEL4? Scripts in rc.local should get executed at the boot? Have you looked into the logs for the errors? And what scripts are you trying to run? What are the scripts for?

elainelaw 02-18-2010 12:33 AM

Quote:

Originally Posted by linuxlover.chaitanya (Post 3867738)
Red Hat v4? Do you mean RHEL4? Scripts in rc.local should get executed at the boot? Have you looked into the logs for the errors? And what scripts are you trying to run? What are the scripts for?

yes , rhel4 , the script includes mount server , startup database , start service .

linuxlover.chaitanya 02-18-2010 12:50 AM

If you want to start the service, you can use chkconfig utility. It will start the services automatically at boot time.
And if you want to mount a shared folder you can edit fstab file.

elainelaw 02-18-2010 01:04 AM

Quote:

Originally Posted by linuxlover.chaitanya (Post 3867752)
If you want to start the service, you can use chkconfig utility. It will start the services automatically at boot time.
And if you want to mount a shared folder you can edit fstab file.

it now ok , I change the rc.local to 777 .

chrism01 02-18-2010 01:08 AM

The problem with using rc.local for that is those service eg DB will NOT get shutdown automatically. Try using chkconfig instead.

linuxlover.chaitanya 02-18-2010 01:11 AM

Changing rc.local permission to world writable is not sufficiently a good idea. I doubt you can prove your decision to change the permissions. Use chkconfig instead. It is designed for the very purpose you need.


All times are GMT -5. The time now is 10:42 PM.