则证明你的mysql运行不来,请查看错误日志: /usr/local/mysql/var/*.err 然后确定安装是否成功,如果没有成功,请检查上面的步骤是否正确
.
安装完成后,能够通过 /usr/local/mysql/bin/mysql 来连接mysql进行管理,如果你装了apache并且能够解析php的话,也能使用phpMyadmin来管
理你的mysql,记得装完后使用mysql或者mysqladmin来修改root的密码,这里我们就不说了,请参考相关的文章.
四、 安装php5脚本支持
去以下地址下载源代码包到/usr/local/src/下,
接着,安装libxml2 (安装php5必须,我们先不装,测试一下效果):
#cd /usr/local/src
#tar –zxvf php-5.1.6.tar.gz
#cd php-5.1.6
#./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-libxml-dir=/usr/local/libxml2 --enable-maintainer-zts --enable-memory-limit --enable-zend-multibyte
有关于zend 的参数 --enable-maintainer-zts --enable-memory-limit --enable-zend-multibyte
可见php内建对php加速软件zend的支持
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
configure: error: xml2-config not found. Please check your libxml2 installation.
出错啦
现在来装libxml2
#tar –zxvf libxml2-sources-2.6.19.tar.gz
# cd libxml2-2.6.19
# ./configure
#make;make install
再来配置:
# cd /usr/local/src/php-5.1.6
#./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --enable-maintainer-zts --enable-memory-limit --enable-zend-multibyte
显示:
configure: error: Please specify the install prefix of iconv with --with-iconv=
--with-iconv-dir=DIR XMLRPC-EPI: iconv dir for XMLRPC-EPI.
xmlrpc-epi is an implementation of the xmlrpc protocol in C. It provides an easy to use API for developers to serialize RPC requests to and from XML.
# cd /usr/ports/converters/iconv
# make all
# make install
===>; Installing for iconv-2.0_3
===>; iconv-2.0_3 depends on file: /usr/local/bin/perl5.8.5 - found
===>; Generating temporary packing list
===>; Checking if converters/iconv already installed
pkg_info: package bsdpan-DBD-mysql-2.9007 has no origin recorded
pkg_info: package bsdpan-DBI-1.48 has no origin recorded
===>; lib
install -C -o root -g wheel -m 444 libbiconv.a /usr/local/lib
install -C -o root -g wheel -m 444 libbiconv_p.a /usr/local/lib
install -s -o root -g wheel -m 444 libbiconv.so.2 /usr/local/lib
ln -fs libbiconv.so.2 /usr/local/lib/libbiconv.so
install -C -o root -g wheel -m 444 biconv.h /usr/local/include
install -o root -g wheel -m 444 biconv.3.gz /usr/local/man/man3
install -o root -g wheel -m 444 biconv_open.3.gz /usr/local/man/man3
install -o root -g wheel -m 444 biconv_close.3.gz /usr/local/man/man3
===>; ccs
cd /usr/ports/converters/iconv/work/iconv-2.0/ccs; install -o root -g wheel -m 444 big5.cct cns11643-plane1.cct cns11643-plane2.cct cns11643-plane14.cct cp775.cct cp850.cct cp852.cct cp855.cct cp866.cct gb_2312-80.cct iso-8859-1.cct iso-8859-2.cct iso-8859-4.cct iso-8859-5.cct iso-8859-15.cct jis_x0201.cct jis_x0208-1983.cct jis_x0212-1990.cct koi8-r.cct koi8-u.cct ksx1001.cct shift_jis.cct /usr/local/share/iconv; install -o root -g wheel -m 555 iconv_mktbl /usr/local/bin
===>; ces
cd /usr/ports/converters/iconv/work/iconv-2.0/ces && install -o root -g wheel -m 444 euc-jp.so euc-kr.so euc-tw.so gb2312.so iso-10646-ucs-2.so iso-10646-ucs-4.so ucs-2-internal.so utf-16.so /usr/local/libexec/iconv
===>; util
install -s -o root -g wheel -m 555 biconv /usr/local/bin
install -o root -g wheel -m 444 biconv.1.gz /usr/local/man/man1
{ echo "# BEGIN iconv"; cat /usr/ports/converters/iconv/work/iconv-2.0/ccs/charset.aliases /usr/ports/converters/iconv/work/iconv-2.0/ces/charset.aliases | /usr/ports/converters/iconv/work/iconv-2.0/iconv_builtin -n us-ascii utf-8 ucs-4-internal; echo "# END iconv"; } >; /usr/local/share/iconv/charset.aliases
===>; Running ldconfig
/sbin/ldconfig -m /usr/local/lib
===>; Registering installation for iconv-2.0_3
再装libiconv-1.9.1.tar.gz,把libiconv-1.9.1.tar.gz放到/usr/local/src/下
# tar -zvxf libiconv-1.9.1.tar.gz
# cd libiconv-1.9.1
# ./configure
#make;make install
# cd /php-5.0.4
#./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --enable-maintainer-zts --enable-memory-limit --enable-zend-multibyte
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
到此php5成功配置完成. Thanks : )
#make
#make test
#make install
# cp /usr/local/src/php-5.0.4/php.ini-dist /usr/local/lib/php.ini
配置php.ini请参考手册
![nixsky[www.nixsky.com]](/templets/images/toplogo.gif)

