Install the software by yourself (the software is downloaded from the official website)
FreeBSD 5.3 release
1) install apache(httpd-2.0.53.tar.gz)
#./Configure -- prefix =/usr/local/Apache
-- Enable-so -- enable-mod-shared = all or most, which indicates dynamic loading of modules.
# Make
# Make install
Make Apache support PHP and save and exit.
Loadmodule php4_module modules/libphp4.so
Addtype application/X-httpd-PHP. php
Addtype application/X-httpd-PHP-source. PHPs
Search for directoryindex index.html In the httpd. conf file, and add index.htm index. php
Start Apache manually
#/Usr/local/Apache/bin/apachetl start
Automatically Start/R/N and create an Apache. Sh file under/usr/local/etc/rc. d/
The content is/usr/local/Apache/bin/apachetl start.
Set it to Executable
All other automatic start operations can be set in this way
(2) install MySQL (mysql-4.1.10a.tar.gz)
# Tar-zxvf mysql-4.1.10a.tar.gz
#./Configure -- prefix =/usr/local/MySQL
# Make
# Make install
# Scripts/mysql_install_db
# Chown-r root/usr/local/MySQL
# Chown-r MySQL/usr/local/MySQL/var
# Chgrp-r MySQL/usr/local/MySQL
#/Usr/local/MySQL/bin/safe_mysqld -- user = MySQL &
# Echo "/usr/local/MySQL/bin/safe_mysqld -- user = MySQL &">/usr/local/etc/rc. d/MySQL. Sh is modified to Executable
# Cd/usr/local/MySQL/bin
#./Mysqladmin-u root-P password "Your-Password"
Modify the password of the root account
32.16install PHP (php-4.3.10.tar.gz)
# Tar-zxvf php-4.3.10.tar.gz
#./Configure -- prefix =/usr/local/PHP
-- With-mysql =/usr/local/MySQL -- with-apxs2 =/usr/local/Apache/bin/apxs -- enable-mbstring
# Make
# Make install
PHP configuration problems
# CP ../php4.3.10/PHP. ini. Dist/usr/local/PHP/lib/PHP. ini
Modify the php. ini file
Register_globals = on
(4) phpMyAdmin (phpmyadmin-2.6.1-pl3.tar.bz2)
# Tar xzvf phpMyAdmin-2.6.1-pl3.tar.bz2
Directly decompress the file CP to/usr/local/Apache/htdocs/and rename it phpMyAdmin
/Find $ cfg [''pmaabsoluteuri ''] =" ", and add the phpMyAdmin path, for example, $ cfg [''pmaabsoluteuri''] = "http: // domain name (localhost)/PHPmyAdmin /"
For non-local use, it is best to add verification! /R/n find $ cfg [''servers'] [$ I] [''auth _ type''] = ''config'', and change config to HTTP, /R/N, for example, $ cfg [''servers'] [$ I] [''auth _ type''] = ''http''
//////////////////////////////////////// ////////////////////////
Http://www.icylife.net/blog/show.php? Id = 16
Configuration completed in Linux
//////////////////////////////////////// //////////////////////////////////////// //////////////////////////////////////// /////////////////
Install FreeBSD with built-in software (download, compile, and install it directly from the official website through the ports collection)
Method: Go to the directory of/usr/ports/software and execute make. If you need to configure it, a window will pop up asking you to select it. If you do not need to configure it, it is directly compiled from the official website in the software, and finally make install, you can
MySQL, Apache, and mod_php are recommended in the following sequence (select Apache as the parameter ),
Apache:/usr/ports/www/apache20
/Usr/local/etc/Apache configuration file
/Usr/local/sbin Startup File
/Usr/local/etc/rc. d/boot self-starting File
MySQL:/usr/ports/databases/mysql5-server
/Var/DB/MySQL database file
/Usr/local/bin/command
/Usr/local/etc/rc. d boot file
# Cp support-files/my-medium.cnf/etc/My. CNF configuration file
PHP:/usr/ports/www/mod_php5
/Usr/ports/lang/php5_extansions
/Usr/local/etc/configuration file
Note: After installation, change phi. ini-Dist to PhP. INI/R/n/usr/ports/lang/php5_extends extension package (select MySql for the parameter)
In addition, the ProFTPd is also installed in this way. The specific parameters can be selected as needed. After installation without any impact, modify/usr/local/etc/rc. d directory, open ** _ enable = "yes": In the file. If the file cannot be edited, change the File Permission to executable.
Configure Apache and support PhP5
# Mount the PhP5 module: (this is already in apache2 by default. It is similar)
Loadmodule php5_modeule modules/libphp5.so
# Tell Apache to parse PhP5:
Addtype application/X-httpd-PHP. php. phtml
Addtype application/X-httpd-PHP-source. PHPs
Restart Apache after saving and exiting:/R/N for testing <? Phpinfo ();?>
MySQL: the owner of the/var/DB/MySQL directory is a MySQL user.