Return-path: <php-mirrors-return-20731-goba=php.net@lists.php.net>
Received: from php.net (pb2.pair.com [216.92.131.5])
	by server.barthazi.hu (Postfix) with SMTP id 1F84323EB9	for <gabor@hojtsy.hu>;
 Mon, 01 Sep 2003 22:44:05 +0200 (CEST)
Received: (qmail 65659 invoked by alias); Mon, 01 Sep 2003 20:44:00 +0000
Received: (qmail 65601 invoked by alias); Mon, 01 Sep 2003 20:44:00 +0000
Received: (qmail 65474 invoked from network); Mon, 01 Sep 2003 20:43:58 +0000
Received: from unknown (HELO pb1.pair.com) (216.92.131.4)
  by pb2.pair.com with SMTP; Mon, 01 Sep 2003 20:43:58 +0000
Received: (qmail 9222 invoked by uid 1010); Mon, 01 Sep 2003 20:43:58 +0000
Received: (qmail 9192 invoked by uid 1010); Mon, 01 Sep 2003 20:43:58 +0000
Date: Mon, 01 Sep 2003 14:41:19 -0600
From: Greg Magnusson <glm@cyborgspiders.com>
Subject: PHP install on FreeBSD with MySQL + Apache
X-Sender: cyborgspiders@mail.sasknow.com
To: webmaster@php.net
Message-id: <5.2.1.1.0.20030901143942.00a22ec0@mail.sasknow.com>
MIME-version: 1.0
X-Mailer: QUALCOMM Windows Eudora Version 5.2.1
Content-type: multipart/mixed; boundary="Boundary_(ID_bGPiYssIdUKNDaJiXOcR3g)"
Precedence: bulk
Delivered-to: goba@server.barthazi.hu
Delivered-to: goba@pair2.php.net
Delivered-to: alias-scan-goba@php.net
Delivered-to: goba@php.net
Delivered-to: mailing list php-mirrors@lists.php.net
Delivered-to: ezmlm-scan-php-mirrors@lists.php.net
Delivered-to: ezmlm-php-mirrors@lists.php.net
Delivered-to: webmaster@pair2.php.net
Delivered-to: alias-scan-webmaster@php.net
Delivered-to: webmaster@php.net
Mailing-List: contact php-mirrors-help@lists.php.net; run by ezmlm
X-Spam-Status: No,
 hits=2.0 required=9.0	tests=HTML_00_10,HTML_MESSAGE,MSG_ID_ADDED_BY_MTA_3
	version=2.55
X-Spam-Level: **
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)


--Boundary_(ID_bGPiYssIdUKNDaJiXOcR3g)
Content-type: text/plain; charset=us-ascii; format=flowed
Content-transfer-encoding: 7BIT

re:  minor changes to file bsd_apache_mysql_php_install.txt

To: webmaster@php.net

   It has been brought to my attention that two errors occurred in the file 
I submitted 08-30-03.  These have been changed + I added one name to the 
special thanks area.  If you choose to post these instructions, please use 
the attached version of the installation instructions.

Sincerely,

Greg Magnusson
glm@cyborgspiders.com

--Boundary_(ID_bGPiYssIdUKNDaJiXOcR3g)
Content-type: text/plain; charset=us-ascii;
 NAME=bsd_apache_mysql_php_install2.txt
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=bsd_apache_mysql_php_install2.txt

**************************************************************************
**************************************************************************

Installing Apache-ssl + MySQL + PHP on FreeBSD using the PORTS collection.

by Greg L. Magnusson <glm@cyborgspiders.com> (c) 08-27-2003
special thanks to
John Brooks <john@day-light.com>
Curtis Petit <address with-held>
Pat Lashley <patl@volant.org>
Francis Clark <address with-held>

  One of the easiest ways to install Apache, MySQL, and PHP on FreeBSD is to compile each application from 'source' using the FreeBSD ports system.  The following install instructions require the following:

1) that you have root control of a FreeBSD box
2) that you have a FreeBSD box connected to the internet
3) that you have installed the 'ports collection'
4) that you have updated the 'ports collection' via CVsup

  If you have FreeBSD running and installed from cd-rom with a working ethernet card, you will need to connect to the internet.  To configure your network connection TYPE /stand/sysinstall and choose 'networking' from the list of options.
  This installation requires the ports collection.  If you have not already done so, install the 'ports collection'.  An outline of how to install the 'ports collection' is described in the FreeBSD handbook.

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html

  If you have installed the 'ports collection' using a cd-rom it is going to be necessary to upgrade to the latest releases of the ported software you are looking for.  If you have just installed the 'ports collection' via ftp, it is okay to skip the next step.

Installing CVsup.
Fortunately, FreeBSD makes it extremely easy to stay current.

/*note that TYPE means 'at the root prompt, use your keyboard to enter
the data ad verbatim following the TYPE command */


    TYPE cd /usr/ports/net/cvsup
    TYPE make
    TYPE make install
    TYPE make clean
    TYPE shutdown -r now

When your machine gets back up and running:

  As root, copy /usr/share/examples/cvsup/ports-supfile to a new location, such as /root or your home directory.

    TYPE cp /usr/share/examples/cvsup/ports-supfile /root/ports-supfile

Edit ports-supfile using your favourite editor.

    TYPE ee ports-supfile

You should change the ports-supfile to look something like this.....

#*********************************************************************
*default host=cvsup.ca.FreeBSD.org.
*default base=/usr
*default prefix=/usr
*default release=cvs
*default delete use-rel-suffix
*default tag=.
src-all
#**********************************************************************

......pay particular attention to the first line, choosing a CVsup mirror that is close to you to save time.  At the very least, try to choose the country that you are in to download from.  A list of mirrors can be found here.

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html#CVSUP-MIRRORS

Now it's time to run cvsup:

    TYPE cvsup -g -L 2 /root/ports-supfile

  This command is going to upgrade all the skeletons of your ports collection.  This can take a while.

  Once you get the command prompt back, it is onto the fun part.  Enter these commands one at a time, waiting for the command prompt between each instance of TYPE.

Install the PERL language (necessary for MySQL)
1)  TYPE cd /usr/ports/lang/perl
    TYPE make
    TYPE make install
    TYPE make clean

Install MySQL
2)  TYPE cd /usr/ports/databases/mysql40-server
    TYPE make
    TYPE make install 
    TYPE make clean

Install Apache13x+mod_ssl
3)  TYPE cd /usr/ports/www/apache13-modssl
    TYPE make
    TYPE make install
    TYPE make clean

Install PHP
4)  TYPE cd /usr/ports/www/mod_php4
    TYPE make
  Choose your installation preferences.  Notice that the dependent choices have been made for you.  Realize that certain options will require licensing fees (eg. PDFlib)
    TYPE make test
    TYPE make install
    TYPE make clean

Congratulations...you have Apache-ssl MySql and PHP installed on your FreeBSD system.

To test this, install a web browser.  I like to use LYNX.
    TYPE cd /usr/ports/www/lynx
    TYPE make
    TYPE make install
    TYPE make clean

TYPE lynx 127.0.0.1
You should be viewing a congratulatory Apache screen.
(Note 'q' gets you out)

Three considerations.
1)  edit the Apache httpd.conf file
    TYPE cd ~
    TYPE ee /usr/local/etc/apache/httpd.conf

Add the following lines anywhere within the Apache httpd.conf file
#***************************************
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .php3s
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
#***************************************

Find the line that says 'ServerAdmin' and put your email address there.

2)  create a php test file
    TYPE ee /usr/local/www/data/index.php
Add the following to the file you just opened:

<html>
<head>
<title>PHP test</title>
</head>
<body>
<?php
phpinfo();
?>
</body>
</html>

PRESS 'esc' and save this file.

3)  TEST THIS OUT

    TYPE shutdown -r now

  This will shutdown the machine, the reboot will start Apache and MySQL as daemon processes.  When you get the root prompt back
    
    TYPE lynx 127.0.0.1
  
  If this worked, you should be viewing the information about your new PHP-MySQL enabled Apache web server.  Congratulations.

See you at the top,
Greg L. Magnusson
glm@cyborgspiders.com

***************************************************************************
***************************************************************************

--Boundary_(ID_bGPiYssIdUKNDaJiXOcR3g)--
