LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices



Reply
 
Search this Thread
Old 04-15-2005, 03:32 PM   #1
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 74
FreeBSD starting services


I have decided to install apache, mysql and webmin via ports. How do I get these services to automatically start at boot time. After installing webmin, I got a message that putting webmin_enable="YES" in /etc/rc.conf would start webmin at boot time, but this doesn't happen and its the same for apache2 and mysql. I can start apache2 manually by doing /usr/local/etc/rc.d/apache2.sh start, but webmin and mysql won't start using the scripts. I don't even get an error on screen, so I can't understand why they are failing to start. Any help is appreciated.
 
Old 04-17-2005, 05:01 AM   #2
hemmelig
Member
 
Registered: Oct 2004
Distribution: FreeBSD, NetBSD, OpenBSD, Slackware GNU/Linux
Posts: 33

Rep: Reputation: 15
Did you remember to run 'rehash' after installing mysql or webmin via Ports?
If so, check your logs. They are the key to solving all unexpected errors.
 
Old 04-17-2005, 08:48 AM   #3
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Original Poster
Rep: Reputation: 74
Can you explain a bit more about what you mean by running "rehash". Thanks.
 
Old 04-17-2005, 09:44 AM   #4
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
Rehash has nothing to do with it. Rehash is only for things that use the C shell (which rc scripts do not). The only time you have to use it is when you install software and your shell needs to scan your path again (rehash).

The short answer is "Run `/usr/local/etc/rc.d/whatever.sh rcvar` and set the correct variables in rc.conf"


Things about the FreeBSD service starting at boot time have changed a little bit in the recent past. Basically, anything in /usr/local/etc/rc.d with an extention of '.sh' and set executable will be run at boot time.

The thing that has changed is that that used to be all that was required. It was a pain to tell the new users how to do all that though, so they adopted something closer to Net and Open's solution of installing all the scripts so that they would be executed at startup, but they check rc.conf to see if they should actualy activate the service that they're in charge of.

See the handbook for more information.

Last edited by sigsegv; 04-17-2005 at 09:46 AM.
 
Old 04-17-2005, 11:14 AM   #5
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Original Poster
Rep: Reputation: 74
Thanks, I have managed to get apache2 and mysql starting at boot time. As for webmin its another issue, it just won't start manually or at boot time, so I will just have to keep searching for a solution.
 
  


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
Services not starting in runlevel 3 JesusAddict3791 Linux - Newbie 4 04-26-2005 01:49 AM
Starting services from terminal ExploiT Linux - General 4 09-18-2004 11:04 PM
Starting Services on Slackware 9.1 granatica Linux - General 2 03-16-2004 09:49 PM
Starting Services InEeDhElPlInUx Linux - Newbie 9 11-06-2003 12:57 PM
stopping and starting services nero64 Linux - Newbie 3 11-13-2002 02:10 AM


All times are GMT -5. The time now is 04:34 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration