LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 02:32 PM   #1
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
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, 04:01 AM   #2
hemmelig
Member
 
Registered: Oct 2004
Posts: 33

Rep: Reputation: Disabled
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, 07:48 AM   #3
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Original Poster
Rep: Reputation: 77
Can you explain a bit more about what you mean by running "rehash". Thanks.
 
Old 04-17-2005, 08: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: 47
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 08:46 AM.
 
Old 04-17-2005, 10:14 AM   #5
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Original Poster
Rep: Reputation: 77
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



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

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

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