niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » BSD » NetBSD
Starting Apache2 and MySQL Automagically? rc.conf woes. . .
Post new topic   Reply to topic Page 1 of 1 [8 Posts] View previous topic :: View next topic
Author Message
J'm Sm'th
*nix forums beginner


Joined: 03 Jan 2006
Posts: 17

PostPosted: Wed Jan 11, 2006 8:25 pm    Post subject: Re: Starting Apache2 and MySQL Automagically? rc.conf woes. . .SOLVED Reply with quote

User error, as I suspected.

I copied the scripts from /usr/pkgsrc/www/apache2/files/ rather than
/usr/pkg/share/examples/rc.d/apache to /etc/rc.d. Now that I've done
that, and set up "apache=YES" in rc.conf [also for mysqld], everything
works as it should.

Thanks for listening and pointing.

--
J'm Sm'th

To Reply Direct, Remove Clothes
....-.-
Back to top
J'm Sm'th
*nix forums beginner


Joined: 03 Jan 2006
Posts: 17

PostPosted: Wed Jan 11, 2006 2:58 pm    Post subject: Re: Starting Apache2 and MySQL Automagically? rc.conf woes. . . Reply with quote

On Wed, 11 Jan 2006 04:13:04 GMT
Joel Reicher <joel@panacea.null.org> wrote:

Quote:
The alternative is to have a line in rc.local that will start up
apache. This is relatively straightforward. rc.local is certainly run
at boot, so if apache is not starting up I'd say something else is
wrong and that you need to check paths and logs.

Nothing shows up in the httpd error logs. I'll check paths etc. and
give it a try later today. This machine is in use, but fortunately for
me it is an internal database web server for my company, never seen by
the outside world.

--
J'm Sm'th

To Reply Direct, Remove Clothes
....-.-
Back to top
J'm Sm'th
*nix forums beginner


Joined: 03 Jan 2006
Posts: 17

PostPosted: Wed Jan 11, 2006 2:57 pm    Post subject: Re: Starting Apache2 and MySQL Automagically? rc.conf woes. . . Reply with quote

On 11 Jan 2006 12:57:49 +0100
igor@nospam.invalid wrote:

Quote:
I think that apache must be started from /etc/rc.local. There are
three lines related with apache in that file, all commented by
default, just after the "Add your local daemons here." comment.
Once uncommented, rc.local will look for the /usr/pkg/etc/rc.d/apache
initialization file and, if it exists, run it as `apache start'.
I believe that both `apache=YES' and `apache_start="start"' are
required in /etc/rc.conf for the apache script. The way to set up
apache is different if support for encryption is required.

Cheers,
Igor.

But the thing is, it doesn't work on this machine. The apache script
file is there, the path is correct in rc.local, the lines are
uncommented, and it doesn't start.

I have to start apache manually with "apachectl start".

--
J'm Sm'th

To Reply Direct, Remove Clothes
....-.-
Back to top
J'm Sm'th
*nix forums beginner


Joined: 03 Jan 2006
Posts: 17

PostPosted: Wed Jan 11, 2006 2:55 pm    Post subject: Re: Starting Apache2 and MySQL Automagically? rc.conf woes. . . Reply with quote

On Wed, 11 Jan 2006 14:09:14 +0100
Michał Stępień <prezi77@o2.pl> wrote:

Quote:
J'm Sm'th <n0oct@sbcglobal.clothes.net> wrote:

I've been running FreeBSD machines for about 5 years now, NetBSD
much
less intensively for about the same time. For the life of me, I
can't
get Apache or MySQL to start up from scripts. What am I doing
wrong?

but do can start apache from command line?
or maybe in your scripts variable PATH is not set as it should?

"apachectl start" works as advertised. I'll try running apache from the
rc.d script later today.


--
J'm Sm'th

To Reply Direct, Remove Clothes
....-.-
Back to top
Michał Stępień
*nix forums beginner


Joined: 20 Sep 2005
Posts: 2

PostPosted: Wed Jan 11, 2006 1:09 pm    Post subject: Re: Starting Apache2 and MySQL Automagically? rc.conf woes. . . Reply with quote

J'm Sm'th <n0oct@sbcglobal.clothes.net> wrote:

Quote:
I've been running FreeBSD machines for about 5 years now, NetBSD much
less intensively for about the same time. For the life of me, I can't
get Apache or MySQL to start up from scripts. What am I doing wrong?

but do can start apache from command line?

or maybe in your scripts variable PATH is not set as it should?
Back to top
igor@nospam.invalid
*nix forums addict


Joined: 17 Aug 2005
Posts: 81

PostPosted: Wed Jan 11, 2006 11:57 am    Post subject: Re: Starting Apache2 and MySQL Automagically? rc.conf woes. . . Reply with quote

Joel Reicher <joel@panacea.null.org> wrote:
Quote:
J'm Sm'th <n0oct@sbcglobal.clothes.net (J'm Sm'th)> writes:

Seems like in FreeBSD, you put the script in /usr/local/etc/rc.d, add a
line to rc.conf like apache_enable="YES" and away you go. Not so here.

NetBSD is the same, although the variable name might be
different. Check the script that you copied to /etc/rc.d to see what
the variable you need to set is.

The alternative is to have a line in rc.local that will start up
apache. This is relatively straightforward. rc.local is certainly run
at boot, so if apache is not starting up I'd say something else is
wrong and that you need to check paths and logs.

I think that apache must be started from /etc/rc.local. There are
three lines related with apache in that file, all commented by
default, just after the "Add your local daemons here." comment.
Once uncommented, rc.local will look for the /usr/pkg/etc/rc.d/apache
initialization file and, if it exists, run it as `apache start'.
I believe that both `apache=YES' and `apache_start="start"' are
required in /etc/rc.conf for the apache script. The way to set up
apache is different if support for encryption is required.

Cheers,
Igor.
Back to top
Joel Reicher
*nix forums beginner


Joined: 15 Nov 2005
Posts: 29

PostPosted: Wed Jan 11, 2006 4:13 am    Post subject: Re: Starting Apache2 and MySQL Automagically? rc.conf woes. . . Reply with quote

J'm Sm'th <n0oct@sbcglobal.clothes.net (J'm Sm'th)> writes:

Quote:
First, I tried putting "apache=YES" and "apache_start="start" " into
rc.conf. When that didn't work, I copied the apache.sh script from
/usr/pkgsrc/www/apache2 into /etc/rc.d and tried again. When that
didn't work, I uncommented the lines in rc.local concerning apache.
When that didn't work, I copied the apache.sh script to
/usr/pkg/etc/rc.d/ and tried again. Now that that doesn't work, I'm
turning to the good people of the newsgroup.

Was Gibt's?

Seems like in FreeBSD, you put the script in /usr/local/etc/rc.d, add a
line to rc.conf like apache_enable="YES" and away you go. Not so here.

NetBSD is the same, although the variable name might be
different. Check the script that you copied to /etc/rc.d to see what
the variable you need to set is.

The alternative is to have a line in rc.local that will start up
apache. This is relatively straightforward. rc.local is certainly run
at boot, so if apache is not starting up I'd say something else is
wrong and that you need to check paths and logs.

Cheers,

- Joel
Back to top
J'm Sm'th
*nix forums beginner


Joined: 03 Jan 2006
Posts: 17

PostPosted: Wed Jan 11, 2006 1:00 am    Post subject: Starting Apache2 and MySQL Automagically? rc.conf woes. . . Reply with quote

I've been running FreeBSD machines for about 5 years now, NetBSD much
less intensively for about the same time. For the life of me, I can't
get Apache or MySQL to start up from scripts. What am I doing wrong?

First, I tried putting "apache=YES" and "apache_start="start" " into
rc.conf. When that didn't work, I copied the apache.sh script from
/usr/pkgsrc/www/apache2 into /etc/rc.d and tried again. When that
didn't work, I uncommented the lines in rc.local concerning apache.
When that didn't work, I copied the apache.sh script to
/usr/pkg/etc/rc.d/ and tried again. Now that that doesn't work, I'm
turning to the good people of the newsgroup.

Was Gibt's?

Seems like in FreeBSD, you put the script in /usr/local/etc/rc.d, add a
line to rc.conf like apache_enable="YES" and away you go. Not so here.

--
J'm Sm'th

To Reply Direct, Remove Clothes
....-.-
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [8 Posts] View previous topic :: View next topic
The time now is Tue Jan 06, 2009 12:16 pm | All times are GMT
navigation Forum index » *nix » BSD » NetBSD
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts postfix smtp authentication using mysql stored user/pass rtresidd Postfix 0 Fri Oct 03, 2008 5:58 am
No new posts Postfix + MySQL error: very strange variable %s iWarior Postfix 0 Mon Aug 25, 2008 2:01 pm
No new posts Anyone managed to install policyd on x86_64 and mySQL 5.0x? SupaDucta Postfix 5 Mon Nov 13, 2006 3:18 am
No new posts postfix dovecot mysql issues gnetcon Postfix 0 Thu Aug 03, 2006 9:19 pm
No new posts MySQL Max Build Policy Kaj Arnö MySQL 0 Fri Jul 21, 2006 2:08 pm

Bankruptcy | Payday Loans | Repair Bad Credit | Bankruptcy | Debt Consolidation
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.4835s ][ Queries: 20 (0.3336s) ][ GZIP on - Debug on ]