LinuxQuestions.org
Help answer threads with 0 replies.
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 06-01-2008, 12:01 AM   #1
tekmann33
Member
 
Registered: Nov 2006
Posts: 188

Rep: Reputation: 30
Auto start Apach and MYSQL on bootup


I have installed mysql and apache from source.

What is the best way to auto start them on bootup? Since they have been installed as source tarballs, they are not present in the GUI setup:

System -> Administration -> Services
 
Old 06-01-2008, 12:48 AM   #2
eggixyz
Member
 
Registered: Apr 2008
Posts: 310

Rep: Reputation: 30
Hey There,

Depending on your distro this might slightly incorrect, but the easiest way would be to create init scripts for them (probably in /etc/init.d/ with links to /etc/rc2.d/Sapache, etc)

All the scripts (and you can even not do this) are start and stop options, usually in a case statement.

If you don't want to get into that stuff, you can probably just copy an existing init file and modify it to include the apache or mysql start/stop commands, and make the appropriate link to the runlevel directory /etc/rc2.d or /etc/rc3.d

Hope that helps

, Mike
 
Old 06-01-2008, 03:49 AM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Note that the runlevels and initialization sequence in general is distro specific. For example, Slackware uses BSD style init scripts rather than the SysV style /etc/rcN.d scripts. Also, Debian and its derivatives tend to boot into run level 2 (or sometimes 3 I think if they start a GUI) while Red Hat based distros generally boot into 3 for non-GUI mode and 5 for GUI mode. You'll have to say which distro you're using for more specific help. Most distros support an rc.local script that is run on boot and this is an option if you don't want to write a full-fledged init script.
 
Old 06-01-2008, 08:30 AM   #4
tekmann33
Member
 
Registered: Nov 2006
Posts: 188

Original Poster
Rep: Reputation: 30
Quote:
You'll have to say which distro you're using for more specific help. Most distros support an rc.local script that is run on boot and this is an option if you don't want to write a full-fledged init script.
I am running Fedora 8
 
Old 06-02-2008, 02:18 AM   #5
ravibhure
Member
 
Registered: May 2007
Posts: 75

Rep: Reputation: 15
just put two entries for apache and mysql
edit /etc/rc.local
$sudo /etc/rc.local
at last line add
/etc/init.d/mysqld start
/usr/local/apache2/bin/apachectl -k restart
 
  


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
auto e2fsck on bootup Ben Cobb Slackware 2 02-29-2008 11:16 AM
any one here know agood book to start with Apach 2 adam_blackice Linux - Newbie 1 11-26-2006 10:54 AM
How do I auto start modules that aren't auto loaded on boot? darkbluedrew Debian 2 09-18-2005 10:10 AM
eth0 Auto Connect, How to auto start on logon cornish Linux - Networking 2 05-09-2005 01:02 PM
Auto run at bootup irfan44 Linux - Software 6 05-21-2004 09:44 AM


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