LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to set a program to automatically start (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-set-a-program-to-automatically-start-313253/)

wfernley 04-14-2005 02:11 PM

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

masand 04-14-2005 02:32 PM

u can make a script and put that in /etc/init.d

or put the command directly in rc.local

regards

wfernley 04-14-2005 02:43 PM

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

masand 04-14-2005 02:59 PM

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


regards

mjmwired 04-14-2005 08:52 PM

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.

masand 04-14-2005 09:57 PM

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

wfernley 04-15-2005 07:47 AM

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.

marvin00001 04-16-2005 01:10 PM

Cant you just add paths to the executables in inittab

masand 04-16-2005 01:20 PM

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


All times are GMT -5. The time now is 03:45 PM.