Return-path: <php-mirrors-return-20692-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 4A29C23E92	for <gabor@hojtsy.hu>;
 Sun, 31 Aug 2003 04:59:56 +0200 (CEST)
Received: (qmail 23550 invoked by alias); Sun, 31 Aug 2003 02:59:50 +0000
Received: (qmail 23456 invoked by alias); Sun, 31 Aug 2003 02:59:49 +0000
Received: (qmail 23302 invoked from network); Sun, 31 Aug 2003 02:59:47 +0000
Received: from unknown (HELO pb1.pair.com) (216.92.131.4)
  by pb2.pair.com with SMTP; Sun, 31 Aug 2003 02:59:47 +0000
Received: (qmail 57582 invoked by uid 1010); Sun, 31 Aug 2003 02:59:47 +0000
Received: (qmail 57563 invoked by uid 1010); Sun, 31 Aug 2003 02:59:46 +0000
Date: Sat, 30 Aug 2003 20:43:54 -0600
From: Greg Magnusson <glm@cyborgspiders.com>
Subject: PHP install instructions for FreeBSD
X-Sender: cyborgspiders@mail.sasknow.com
To: webmaster@php.net
Cc: glm@cyborgspiders.com
Message-id: <5.2.1.1.0.20030830202338.00a04400@mail.sasknow.com>
MIME-version: 1.0
X-Mailer: QUALCOMM Windows Eudora Version 5.2.1
Content-type: multipart/mixed; boundary="Boundary_(ID_vJSX1XuStnUhgtaVnhs6/Q)"
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_vJSX1XuStnUhgtaVnhs6/Q)
Content-type: text/plain; charset=us-ascii; format=flowed
Content-transfer-encoding: 7BIT


re:  instructions for installing Apache SSL + MySQL + PHP on FreeBSD via 
the ports collection.

To whom it may concern,

   I have noticed that the installation instructions for PHP do not 
currently include a method of installing PHP on FreeBSD via the ports 
collection.

http://www.php.net/manual/en/installation.php

   I have compiled a "paint by number" instruction set for a FreeBSD MySQL 
ApacheSSL PHP installation.  I hereby grant publication privileges to 
include this procedure, found in the attached file, in the PHP manual found 
at http://www.php.net.  If you choose to publish this procedure, please 
include my name within the document.

Thank you very much,

Greg L. Magnusson
glm@cyborgspiders.com

--Boundary_(ID_vJSX1XuStnUhgtaVnhs6/Q)
Content-type: text/plain; charset=us-ascii;
 NAME=bsd_apache_mysql_php_install.txt
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=bsd_apache_mysql_php_install.txt

**************************************************************************
**************************************************************************

Installing Apache-ssl + MySQL + PHP on FreeBSD using the PORTS collection.

by Greg L. Magnusson <glm@cyborgspiders.com> (c) 08-26-2003
special thanks to
John Brooks <john@day-light.com>
Curtis Petit <address with-held>
Francis Clark <address with-held>

  The easiest way 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 'use your keyboard to enter data at the root prompt 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/languages/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_vJSX1XuStnUhgtaVnhs6/Q)--
