Goba
--- Begin Message ---
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 [EMAIL PROTECTED]************************************************************************** **************************************************************************Installing Apache-ssl + MySQL + PHP on FreeBSD using the PORTS collection. by Greg L. Magnusson <[EMAIL PROTECTED]> (c) 08-26-2003 special thanks to John Brooks <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] *************************************************************************** ***************************************************************************
--- End Message ---