FreeBSD上Apache+php+mysql+GD的正确安装
来自 ChinaUnix.net
//文章很经典,没有乱七八糟的内容,但是如果你常装软件,一看就明白了,是个参考的好资料
//另外,如果下面的安装可能会碰到部分问题,希望参考一下我以前写的一篇关于安装apache+php+mysql的文章
//互相参考: http://blog.csdn.net/heiyeshuwu/archive/2004/08/19/79419.aspx
安装MySQL:
===========================================================
./configure --prefix=/usr/local/mysql
make
make install
./scripts/mysql_install_db
chown -R root /usr/local/mysql
chgrp -R mysql /usr/local/mysql
chown -R root /usr/local/mysql/bin
chgrp -R mysql /usr/local/mysql/bin
chown -R root /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql/var
chmod 777 /usr/local/mysql/var
chown -R root /usr/local/mysql/var/mysql
chgrp -R mysql /usr/local/mysql/var/mysql
chmod 777 /usr/local/mysql/var/mysql
chown -R root /usr/local/mysql/var/mysql/*
chgrp -R mysql /usr/local/mysql/var/mysql/*
chmod 777 /usr/local/mysql/var/mysql/*
chmod 777 /usr/local/mysql/lib/mysql/libmysqlclient.a
============================================================
安装apache 1.3.x
===========================================================
./configure --prefix=/usr/local/apache --enable-module=so
make
make install
===========================================================
安装mod_gzip
===========================================================
vi Makefile (将APXS的路径 APXS?=/usr/local/sbin/apxs 改成apache安装路径: APXS?=/usr/local/apache/bin/apxs)
make
make install
===========================================================
安装zlib
===========================================================
./configure
make test
make install
===========================================================
安装libpng
===========================================================
cd /usr/ports/graphics/png
make install
===========================================================
安装jpegsrc
==============================================================
cd /usr/ports/graphics/jpeg
make install
==============================================================
安装jpegsrc
===========================================================
cd /usr/ports/print/freetype
make install
===========================================================
安装php
==============================================================
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/apache/conf --enable-track-vars --enable-force-cgi-redirect --enable-pic --enable-inline-optimiation --enable-memory-limit --enable-debug=no --enable-bcmath --enable-shmop --enable-versioning --enable-calendar --enable-dbx --enable-dio --enable-mcal --with-ttf --with-gd --enable-gd-native-ttf --with-ftp --with-zlib --with-freetype --with-gettext --with-jpeg-dir=/usr/local/ --with-png-dir=/usr/local/
//这里要注意一个问题,如果你使用的是apache2.X.X的话,那么上面一句要改成: --with-apxs2=/usr/local/apache/bin/apxs
make
make install
cp php.ini-dist /usr/local/apache/conf
===========================================================
安装Zend Optimizer
===========================================================
./install.sh
===========================================================
本文地址:http://com.8s8s.com/it/it34836.htm