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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-14-2005, 03:11 PM
|
#1
|
Member
Registered: Apr 2005
Posts: 65
Rep:
|
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
|
|
|
04-14-2005, 03:32 PM
|
#2
|
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522
Rep:
|
u can make a script and put that in /etc/init.d
or put the command directly in rc.local
regards
|
|
|
04-14-2005, 03:43 PM
|
#3
|
Member
Registered: Apr 2005
Posts: 65
Original Poster
Rep:
|
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
|
|
|
04-14-2005, 03:59 PM
|
#4
|
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522
Rep:
|
yes that would do but i still recommend that u make a script for that with help from other scripts there
regards
|
|
|
04-14-2005, 09:52 PM
|
#5
|
Member
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620
Rep:
|
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.
|
|
|
04-14-2005, 10:57 PM
|
#6
|
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522
Rep:
|
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
|
|
|
04-15-2005, 08:47 AM
|
#7
|
Member
Registered: Apr 2005
Posts: 65
Original Poster
Rep:
|
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.
|
|
|
04-16-2005, 02:10 PM
|
#8
|
Member
Registered: Apr 2005
Posts: 59
Rep:
|
Cant you just add paths to the executables in inittab
|
|
|
04-16-2005, 02:20 PM
|
#9
|
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522
Rep:
|
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 09:07 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|