分类:
2008-03-28 13:47:07
php插件freetype |
freetype- |
freetype- |
php插件jpeg |
jpeg-6b |
jpeg-6b.tar.gz |
php插件zlib |
zlib- |
zlib- |
php插件libpng |
libpng- |
libpng- |
php插件t1lib |
t1lib- |
t1lib- |
php插件gd |
gd- |
gd- |
php插件curl |
curl- |
curl- |
php |
php- |
php- |
安装:
tar zxvf freetype-
cd freetype-
./configure --prefix=/usr/local/freetype-2.1.10/
make
make install
安装在/usr/local/include/
配置在/usr/local/lib
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
tar -zxvf zlib-
cd zlib.
[zlib-
make
make install
tar -zxvf libpng-
cd libpng-
libpng-
说明:查看INSTALL中的安装说明,安装libpng之前必须安装zlib
安装目录为:/usr/local/
make
make install
tar zxvf tlib-
cd tlib-
t1lib-
make
make install
cd /usr/local
tar -zxvf gd-
cd gd-
./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
tar zxvf curl-
cd curl-l
./configure --prefix=/usr/local/curl-7.16.2
make
make install
将php-
并解压:tar zxvf php-
开始编译安装php-
cd /usr/local/php-
./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/
TNS_ADMIN=/home/oracle/product/
TNS_HOME=/home/oracle/product/
NLS_LANG="simplified chinese_china.zhs16gbk"
ORACLE_HOME=/home/oracle/product/
export ORACLE_HOME LD_LIBRARY_PATH TNS_ADMIN TNS_HOME NLS_LANG
cat php-java-bridge_
cd php-java-bridge-
export PATH=/usr/local/php-
phpize
./configure --with-java= /usr/local/j2sdk1.4.2_06
make
make install
将下列内容添加到/usr/local/php-
[java]
java.java_home = " /usr/local/j2sdk
java.java = " /usr/local/j2sdk
java.log_level = 3
java.log_file = "/var/log/php-java-bridge.log"
java.classpath
"/usr/local/php-
java.libpath = "/usr/local/php-
extension_dir = "/usr/local/php-
extension = java.so
php.ini修改:把displfay_errors = On 改为display_errors = Off
用记事本新建一个文件phpinfo.php,文件内容输入:
phpinfo();
?>
保存到web服务器的发布目录,如apache的DocumentRoot:/var/www/html
在浏览器地址拦输入
安装成功的话会显示当前PHP相关的信息,如果不能打开,提示文件下载或者404错误,请检查以上每一个步骤!