LinuxQuestions.org
Visit Jeremy's Blog.
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 04-14-2005, 03:11 PM   #1
wfernley
Member
 
Registered: Apr 2005
Posts: 65

Rep: Reputation: 15
How to set a program to automatically start


Yes I know its an easy one, but hey I'm a noob.

Alright I have created a webserver and its running good (aside from having samba problems I can't figure out) The question I have is regarding setting up Apache, MySQL and VSFTPD to automatically startup once the system reboots. I was curious how I do this. Do I have to edit a file or is there an easy command that I just use on the command line to run. I'm not sure if I have to edit somethign in inetd or rc.local.

Can someone help me out?

Thanks


Wes
 
Old 04-14-2005, 03:32 PM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
u can make a script and put that in /etc/init.d

or put the command directly in rc.local

regards
 
Old 04-14-2005, 03:43 PM   #3
wfernley
Member
 
Registered: Apr 2005
Posts: 65

Original Poster
Rep: Reputation: 15
OK So lets say I want to start Apache. Usually I would type "/usr/local/bin/apache2/bin/apachectl start". So in my rc.local file I would add a new line with "/usr/local/bin/apache2/bin/apachectl start"?

Thanks for the reply!


Wes
 
Old 04-14-2005, 03:59 PM   #4
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
yes that would do but i still recommend that u make a script for that with help from other scripts there


regards
 
Old 04-14-2005, 09:52 PM   #5
mjmwired
Member
 
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620

Rep: Reputation: 39
What distribution are you using? If you are using the apache, mysql or ftp that came with the distribution, there are tools to automatically do this for you.
 
Old 04-14-2005, 10:57 PM   #6
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
if the binary for apache is here
usr/local/bin/apache2/bin/apachectl
then i think he has built that from source so he can make some scripts on his own and put that in the runlevel,with help from the readymade scripts

regards
 
Old 04-15-2005, 08:47 AM   #7
wfernley
Member
 
Registered: Apr 2005
Posts: 65

Original Poster
Rep: Reputation: 15
Thanks for the replies

I am using Whitebox and I installed MySQL, Apache and PHP from source.

But I am also asking this because I have various other applications I want to run at startup.
 
Old 04-16-2005, 02:10 PM   #8
marvin00001
Member
 
Registered: Apr 2005
Posts: 59

Rep: Reputation: 15
Cant you just add paths to the executables in inittab
 
Old 04-16-2005, 02:20 PM   #9
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
Quote:
Originally posted by marvin00001
Cant you just add paths to the executables in inittab
i do not think that will be a good idea...

rc.local is a good option instead of inittab and i do not know if u can run programs from inittab

regards
 
  


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
How do I automatically start a program at start up? victordh Linux - General 7 10-27-2013 07:02 AM
Set wireless configs automatically apocoloco Linux - Wireless Networking 4 10-22-2005 12:43 PM
How do I start a program automatically when KDE starts up? zmaint Linux - Software 8 12-21-2004 05:52 PM
How do I start a program automatically when I boot up? bad_andy Mandriva 2 11-27-2004 09:15 PM
start apps automatically on start up? chunlee Linux - Newbie 3 09-04-2004 01:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:07 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