LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-18-2010, 01:21 AM   #1
elainelaw
Member
 
Registered: Jan 2008
Posts: 258

Rep: Reputation: 30
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.
 
Old 02-18-2010, 01:28 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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?
 
Old 02-18-2010, 01:33 AM   #3
elainelaw
Member
 
Registered: Jan 2008
Posts: 258

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by linuxlover.chaitanya View Post
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 .
 
Old 02-18-2010, 01:50 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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.
 
Old 02-18-2010, 02:04 AM   #5
elainelaw
Member
 
Registered: Jan 2008
Posts: 258

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by linuxlover.chaitanya View Post
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 .
 
Old 02-18-2010, 02:08 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
The problem with using rc.local for that is those service eg DB will NOT get shutdown automatically. Try using chkconfig instead.
 
Old 02-18-2010, 02:11 AM   #7
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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.
 
  


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
run a script on Server Startup Suicidal9090 Linux - Newbie 3 11-15-2008 02:02 PM
executing startup script on shared server (not as root!) agentspanky Linux - Newbie 3 02-11-2008 02:42 AM
script when server startup invent Linux - Server 3 01-08-2008 07:26 PM
mysql.server startup script is not cooperating. vmlinuz.gz Linux - Software 14 04-14-2006 10:41 PM
problem with mysql startup script on server BeetleBailey Programming 2 07-22-2004 05:37 PM


All times are GMT -5. The time now is 06:30 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration