Chinaunix首页 | 论坛 | 博客
  • 博客访问: 601715
  • 博文数量: 51
  • 博客积分: 4000
  • 博客等级: 上校
  • 技术积分: 1737
  • 用 户 组: 普通用户
  • 注册时间: 2006-06-27 13:45
文章分类

全部博文(51)

文章存档

2011年(3)

2009年(19)

2008年(29)

我的朋友

分类:

2008-03-28 13:47:07

php插件freetype

freetype-2.1.10

freetype-2.1.10.tar.gz

php插件jpeg

jpeg-6b

jpeg-6b.tar.gz

php插件zlib

zlib-1.2.3

zlib-1.2.3.tar.gz

php插件libpng

libpng-1.2.5

libpng-1.2.5.tar.gz

php插件t1lib

t1lib-5.1.1

t1lib-5.1.1.tar.gz

php插件gd

gd-2.0.34

gd-2.0.34.tar.gz

php插件curl

curl-7.16.2

curl-7.16.2.tar.gz

php

php-5.2.3

php-5.2.3.tar.gz

 

 安装:

tar zxvf freetype-2.1.10.tar.gz

cd freetype-2.1.10

./configure --prefix=/usr/local/freetype-2.1.10/

make

make install

安装在/usr/local/include/

配置在/usr/local/lib

jpeg

tar -zxvf jpegsrc.v6b.tar.gz

cd jpeg-6b

./configure --prefix=/usr/local/jpeg-6b

make

make install

 

编译jpeg时报错
/usr/bin/install -c -m 644 ./cjpeg.1

/usr/local/man/man1/cjpeg.1

/usr/bin/install: cannot create regular file

/usr/local/man/man1/cjpeg.1': No such file or directory

缺少/usr/local/man目录及man1子目录,新建后重新编译。

shell> mkdir /usr/local/man

shell> mkdir /usr/local/man/man1

zlib

tar -zxvf zlib-1.2.3.tar.gz

cd zlib.1.2.3

[zlib-1.2.3]# ./configure --prefix=/usr/local/zlib-1.2.3

make

make install

libpng

tar -zxvf libpng-1.2.5-config.tar.gz

cd libpng-1.2.5-config

libpng-1.2.5]# cp scripts/makefile.std makefile

说明:查看INSTALL中的安装说明,安装libpng之前必须安装zlib

安装目录为:/usr/local/

make

make install

tlib

tar zxvf tlib- 5.1.1.tar.gz

cd tlib- 5.1.1

t1lib-5.1.1]# ./configure --prefix=/usr/local/t1lib-5.1.1

make

make install

GD

cd /usr/local

tar -zxvf gd-2.0.33.tar.gz

cd gd-2.0.33

./configure --prefix=/usr/local/gd-2.0.34 --with-jpeg=/usr/local/jpeg-6b --with-png=/usr/local/ --with-zlib=/usr/local/zlib-1.2.3 --with-freetype-dir=/usr/local/freetype-2.1.10/

make

make install

curl

tar zxvf curl-7.16.2.tar.tar

cd curl-l7.16.2

./configure --prefix=/usr/local/curl-7.16.2

make

make install

php-5.2.3

将php-5.2.3.tar.gz拷贝至/usr/local/目录中,

并解压:tar zxvf php-5.2.3.tar.gz

开始编译安装php-5.2.3

cd /usr/local/php-5.2.3

./configure  --prefix=/usr/local/php523 --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php523/lib --enable-so --with-oci8=/home/oracle/product/10.2.0/ --with-png=/usr/local/ -with-freetype-dir=/usr/local/freetype-2.1.10/ --with-curl=/usr/local/curl-7.16.2 --with-gd=/usr/local/gd-2.0.34 --with-zlib --with-jpeg=/usr/local/jpeg-6b --with-mysqli --enable-sigchild --enable-mbstring=cn --enable-sockets

 

make && make install

cp php.ini-recommended /usr/local/php523/lib/php.ini

 

修改参数并配置:

vi /usr/local/apache2/conf/httpd.conf

添加如下内容:

LoadModule php5_module modules/libphp5.so

AddType application/x-httpd-php .php

 

vi /usr/local/php523/bin/apachectl

在ARGV="$@前面添加下面内容

LD_LIBRARY_PATH=/home/oracle/product/10.2.0/lib:${LD_LIBRARY_PATH}

TNS_ADMIN=/home/oracle/product/10.2.0/network/admin

TNS_HOME=/home/oracle/product/10.2.0/network/admin

NLS_LANG="simplified chinese_china.zhs16gbk"

ORACLE_HOME=/home/oracle/product/10.2.0/

export ORACLE_HOME LD_LIBRARY_PATH TNS_ADMIN TNS_HOME NLS_LANG

 

php-java-bridge

cat php-java-bridge_3.0.8.tar.bz2 | bunzip2 |tar xf –

cd php-java-bridge-3.0.8/

export PATH=/usr/local/php-5.2.3/bin:$PATH

phpize

./configure --with-java= /usr/local/j2sdk1.4.2_06

make

make install

 

将下列内容添加到/usr/local/php-5.2.3/lib/php.ini i(可以用php –i查出php所使用的配置文件路径,加以修改)

[java]

java.java_home = " /usr/local/j2sdk1.4.2_06 "

java.java = " /usr/local/j2sdk1.4.2_06/bin/java"

java.log_level = 3

java.log_file = "/var/log/php-java-bridge.log"

java.classpath

"/usr/local/php-5.2.3/lib/php/extensions/no-debug-non-zts-20050922/JavaBridge.jar:/usr/local/php-5.2.3/lib/php/extensions/no-debug-non-zts-20050922"

java.libpath = "/usr/local/php-5.2.3/lib/php/extensions/no-debug-non-zts-20050922/"

extension_dir = "/usr/local/php-5.2.3/lib/php/extensions/no-debug-non-zts-20050922/"

extension = java.so

 

php.ini修改:把displfay_errors = On 改为display_errors = Off

二、      测试

用记事本新建一个文件phpinfo.php,文件内容输入:

phpinfo();

?>

保存到web服务器的发布目录,如apache的DocumentRoot:/var/www/html

在浏览器地址拦输入

安装成功的话会显示当前PHP相关的信息,如果不能打开,提示文件下载或者404错误,请检查以上每一个步骤!

 

阅读(2784) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2009-08-18 23:38:10

zvczv