Starting Apache & MySQL

Starting Apache & MySQL

Post by Mark Anderse » Sat, 04 May 2002 06:34:30



How do you get Apache and MySQL to start automatically after a reboot?
I guess theres more than one way to do this. Which way is best?
I have the support-files/mysql.server file, but where should it go, if I
should use it to start MySQL with?

TiA

/Mark

 
 
 

Starting Apache & MySQL

Post by Edwin Paul » Sat, 04 May 2002 06:57:19




Quote:> How do you get Apache and MySQL to start automatically after a reboot?

Place startup-files in /usr/local/etc/rc.d/

mysql.sh
------------
#!/bin/sh
/sbin/ldconfig -m /usr/local/lib/mysql

if [ -x /usr/local/bin/safe_mysqld ]
then
   /usr/local/bin/safe_mysqld --user=mysql > /dev/null &
                                     && echo -n ' mysql'
fi

Change the location /usr/local/bin/safe_mysqld, so this is correct for your
situation.

For apache i guess:

apache.sh
------------
#!/bin/sh
if [ -x /usr/local/bin/apachectl ]
then
   /usr/local/bin/apachectl start > /dev/null &
                                     && echo -n ' apache'
fi

Edwin

 
 
 

Starting Apache & MySQL

Post by Natha » Sat, 04 May 2002 11:10:18


On Thu, 2 May 2002 23:34:30 +0200


> How do you get Apache and MySQL to start automatically after a reboot?
> I guess theres more than one way to do this. Which way is best?
> I have the support-files/mysql.server file, but where should it go, if
> I should use it to start MySQL with?

man rc

put your startup scripts at /usr/local/etc/rc.d

 
 
 

Starting Apache & MySQL

Post by Erik Nygre » Sat, 04 May 2002 16:22:07



> How do you get Apache and MySQL to start automatically after a reboot?
> I guess theres more than one way to do this. Which way is best?
> I have the support-files/mysql.server file, but where should it go, if I
> should use it to start MySQL with?

If you installed from ports I would imagine that you already have
startup-files in /usr/local/etc/rc.d, just rename them
like 010.mysql.sh and 020.apache.sh.
They are executed in the same order that you see them using ls -1

--
Erik Nygren
e r i k { a t } s w i p { d o t } n e t

 
 
 

Starting Apache & MySQL

Post by Tim Ju » Sun, 05 May 2002 13:09:24





> > How do you get Apache and MySQL to start automatically after a reboot?

> Place startup-files in /usr/local/etc/rc.d/

> mysql.sh
> ------------
[snip]
> apache.sh
> ------------

[snip]

except you forgot the "start" or "stop" paramater passed on bootup or
shutdown.

 
 
 

1. Apache compile & Php & mysql

Hello.
How i can to compile apache for it works with php and how to compile php for
it works with apache and mysql ?

Regards.
--
---------------------------------------------------------------------
Aix,Linux,Humor,Zoco
http://web.madritel.es/personales2/jperezm
--------------------------------------------------------------------

2. One more time: Laserwriter Plus?? (Long)

3. Apache & mysql & php not working

4. 43p-240 Memory

5. start mysql database as mysql instead of root

6. Solaris File System

7. starting apache and mysql at boot

8. printer error and staroffice

9. PERL && mod_perl && FreeBSD && Apache

10. Apache, PHP, & MySQL

11. Apache .htaccess & mysql auth

12. Quandry: locking tables & server crashes (Apache, Perl, MySQL)

13. Is Apache authentication with MySQL & mod_auth_mysql the fastest ?