Re: Run httpd and mysqld automatically?

From: Date: Sun, 27 Aug 2000 16:46:13 +0000
Subject: Re: Run httpd and mysqld automatically?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-13845@lists.php.net to get a copy of this message
> I've slogged through the install, with a build of apache, php4, > and mysql, which all worked, except neither httpd or mysqld > are run on startup. What do I do to get this to happen? Depends on your operating system. I myself run Slackware Linux 7.1 so I have done it this way: in /etc/rc.d create two files rc.httpd & rc.mysqld (remember to make them executable) rc.httpd contains: #!/bin/sh # if [ -x /usr/local/apache/bin/apachectl ]; then echo "Starting Apache..." . /usr/local/apache/bin/apachectl start fi and rc.mysqld contains: #!/bin/sh # if [ -x /usr/local/mysql/bin/safe_mysqld ]; then echo "Starting MySQL..." (cd /usr/local/mysql/bin && ./safe_mysqld& ) fi Then in /etc/rc.d/rc.M I have the following piece of script to ensure that rc.httpd and rc.mysqld get run at boot time. # Start MySQL server: if [ -x /etc/rc.d/rc.mysqld ]; then . /etc/rc.d/rc.mysqld fi # Start Web server: if [ -x /etc/rc.d/rc.httpd ]; then . /etc/rc.d/rc.httpd fi If your system uses SysV init scripts like RedHat does (as opposed to Slackware's BSD scripts) then it will be different to you (consult your init man page). And ofcourse if you use windows it's a completely different ballgame. Best regards, Jesper Juhl

« previous php.general (#13845) next »