centos php5插件完全编译

作者: admin 分类: linux 发布时间: 2010-11-20 12:24 ė 6 没有评论

 centos5 php5扩展插件完全编译安装

APACHE+MYSQL 可以在我查看文章http://www.linuxqq.com/archives/11.html

出去PHP的只看APACHE+MYSQL的 然后用这个文章编译PHP 就支持常用的DZ PHPWIND了

wget -c ftp://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.11.tar.gz
tar zxvf libiconv-1.11.tar.gz
cd libiconv-1.11
./configure –prefix=/usr/local/libiconv
make
make install

wget -c http://download.savannah.gnu.org/releases/freetype/freetype-2.3.7.tar.gz
tar zxvf freetype-2.3.7.tar.gz
cd freetype-2.3.7
./configure
make
make install

wget -c ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.33.tar.gz
tar zxvf libpng-1.2.33.tar.gz
cd libpng-1.2.33
./configure
make
make install

wget -c ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
tar zxvf jpegsrc.v6b.tar.gz
cd jpegsrc.v6b
./configure –enable-static –enable-shared
mkdir -p /usr/local/man/man1 –如果make的过程中提示不能创建/usr/local/man/man1目录,需要执行这一步
make
make install
make install-lib

wget -c ftp://xmlsoft.org/libxml2/libxml2-2.6.30.tar.gz
tar zxvf libxml2-2.6.30.tar.gz
cd libxml2-2.6.30
./configure
make
make install

wget -c http://jaist.dl.sourceforge.net/sourceforge/mcrypt/libmcrypt-2.5.8.tar.gz
tar zxvf libmcrypt-2.5.8.tar.gz
ln -s /usr/lib/g++32 /usr/lib/g++ –如果提示找不着C++编译器,执行这不创建一个链接
./configure
make
make install
/sbin/ldconfig
cd libltdl
./configure –enable-ltdl-install
make
make install

wget -c http://jaist.dl.sourceforge.net/sourceforge/mhash/mhash-0.9.9.tar.gz
tar zxvf mhash-0.9.9.tar.gz
cd mhash-0.9.9
./configure
make
make install

wget -c http://jaist.dl.sourceforge.net/sourceforge/mcrypt/mcrypt-2.6.7.tar.gz
tar zxvf mcrypt-2.6.7.tar.gz
cd mcrypt-2.6.7
cp /usr/local/lib/libmcrypt*.* /usr/lib
ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
./configure
make
make install

wget -c http://curl.haxx.se/download/curl-7.19.1.tar.gz
tar zxvf curl-7.19.1.tar.gz
./configure
make
make install

wget -c http://www.libgd.org/releases/gd-2.0.35.tar.gz
tar zxvf gd-2.0.35.tar.gz
cd gd-2.0.35.tar.gz
./configure –with-libiconv-prefix –with-png –with-freetype –with-jpeg
make
make install

wget  http://down1.chinaunix.net/distfiles/php-5.2.6.tar.bz2

tar jxvf php-5.2.6.tar.bz2

cd php-5.2.6

./configure –prefix=/usr/local/php –with-mysql=/usr/local/mysql –with-apxs2=/usr/local/apache/bin/apx –with-libxml-dir –with-zlib –enable-calendar –with-curl –with-curlwrappers –enable-dba=shared –enable-ftp –with-gd –with-jpeg-dir –with-png-dir –with-freetype-dir –enable-gd-native-ttf –enable-mbstring –enable-mbregex –with-mcrypt –with-mhash

make

make install

cp php.ini-recommended /usr/local/php/lib
cd /usr/local/php/lib
mv php.ini-recommended php.ini
cp php.ini /etc/php.ini
编译完成 接下来是修改APACHE主配置文件
*在LoadModule处添加 LoadModule php5_module module/libphp5.so
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps 我習慣添加在863行 是編譯版本
还需要在395行
DirecToryIndex index.html index.html.var index.php
添加这个PHP

接下来做个测试
编写个PHP的测试脚本
cd /usr/lcoal/apache/htdocs
echo “<? phpinfo()?>”>info.php

然后记得把zend安装上哦

上面找不到的包都可以去cu 搜索下载 down1.chinaunix.net  呵呵  ~~

转载注明(LINUXQQ)

本文出自 小Q,转载时请注明出处及相应链接。

本文永久链接: http://www.linuxqq.com/archives/274.html

0
更多
Ɣ回顶部