安装环境Centos 5.3
安装libiconv
tar zxf libiconv-1.13.1.tar.gz
cd libiconv-1.13.1
./configure --prefix=/dicc/libiconv
make && make install
安装libjpeg
tar zxf jpegsrc.v7.tar.gz
cd jpeg-7/
./configure --prefix=/dicc/libjpeg --enable-shared
make && make install
安装libpng
tar zxf libpng-1.2.34.tar.gz
cd libpng-1.2.34
./configure --prefix=/dicc/libpng
make && make install
安装freetype
tar zxf freetype-2.3.8.tar.gz
cd freetype-2.3.8
./configure --prefix=/dicc/freetype
make && make install
==============================
PHP扩展模块之GD2
tar zxf gd-2.0.35.tar.gz
cd gd-2.0.35
./configure --prefix=/dicc/gd \
--with-libiconv-prefix=/dicc/libiconv \
--with-jpeg=/dicc/libjpeg/ \
--with-freetype=/dicc/freetype/ \
--with-png=/dicc/libpng/
安装GD2时出错提示:
cd . && /bin/sh /tmp/cacti/gd/2.0.35/config/missing --run aclocal-1.9 -I config
aclocal:configure.ac:64: warning: macro `AM_ICONV' not found in library
cd . && /bin/sh /tmp/cacti/gd/2.0.35/config/missing --run automake-1.9 --foreign
cd . && /bin/sh /tmp/cacti/gd/2.0.35/config/missing --run autoconf
configure.ac:64: error: possibly undefined macro: AM_ICONV
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
make: *** [configure] error 1
解决方法:
cp /usr/lib/libattr.* /lib/ //有两个libattr开头文件,有一个/lib里有,另一个复制过去就行了
make时出现
make[2]: *** [gd_png.lo] Error 1
make[2]: Leaving directory `/tmp/gd-2.0.26gif'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/gd-2.0.26gif'
make: *** [all] Error 2
需要复制cp /dicc/libpng/include/pngconf.h /dicc/libpng/include/png.h ./
安装libxml2
tar zxf libxml2-2.7.3.tar.gz
cd libxml2-2.7.3
./configure --prefix=/dicc/libxml2 && make && make install
安装zlib
tar zxf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure --prefix=/dicc/zlib && make && make install
安装t1lib
tar zxf t1lib-5.1.2.tar.gz
cd t1lib-5.1.2
./configure --prefix=/dicc/t1lib && make without_doc && make install
安装libmcrypt
cd ..
tar zxf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8
./configure --prefix=/dicc/libmcrypt && make && make install
安装openssl
cd ..
tar zxf openssl-0.9.8j.tar.gz
cd openssl-0.9.8j
./config --prefix=/dicc/openssl && make && make install
安装tc
cd ..
tar zxf tokyocabinet-1.4.36.tar.gz
cd tokyocabinet-1.4.36
./configure --prefix=/dicc/tc && make && make install
出现/usr/local/lib/libz.a: could not read symbols
删掉libz.a
安装TT
cd ..
tar zxf tokyotyrant-1.1.40.tar.gz
cd tokyotyrant-1.1.40
./configure --prefix=/dicc/tt --with-tc=/dicc/tc && make && make install
PHP编译
cd ..
tar zxf php-5.3.1.tar.gz
cd php-5.3.1
./configure --prefix=/dicc/php \
--with-config-file-path=/dicc/php/etc \
--with-zlib=/dicc/zlib \
--with-mysql=mysqlnd --with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-libxml-dir=/dicc/libxml2 \
--with-gd=/dicc/gd \
--with-jpeg-dir=/dicc/libjpeg \
--with-png-dir=/dicc/libpng \
--with-openssl=/dicc/openssl \
--with-iconv-dir=/dicc/libiconv \
--with-mcrypt=/dicc/libmcrypt \
--with-t1lib=/dicc/t1lib \
--with-gettext \
--with-curl \
--enable-mbstring \
--enable-soap \
--enable-sockets \
--with-mhash \
--enable-zip \
--enable-gd-native-ttf
make && make install
PHP扩展模块之memcache
cd ..
tar zxf memcache-3.0.3.tgz
cd memcache-3.0.3
/dicc/php/bin/phpize
./configure --with-php-config=/dicc/php/bin/php-config \
--with-zlib-dir=/dicc/zlib \
--enable-memcache
make && make install
PHP扩展模块之tokyo_tyrant
cd ..
tar zxvf tokyo_tyrant-0.1.2.tgz
cd tokyo_tyrant-0.1.2/
/dicc/php/bin/phpize
./configure --with-tokyo-tyrant=/dicc/tt --with-tokyo-cabinet-dir=/dicc/tc -with-php-config=/dicc/php/bin/php-config
make && make install
PHP扩展模块之apc
cd ..
tar zxf APC-3.1.3p1.tgz
cd APC-3.1.3p1
/dicc/php/bin/phpize
./configure --with-php-config=/dicc/php/bin/php-config
make && make install
PHP扩展模块之uuid
cd ..
tar zxf uuid-1.0.2.tgz
cd uuid-1.0.2
/dicc/php/bin/phpize
./configure --with-uuid --with-php-config=/dicc/php/bin/php-config
make && make install
阅读(2354) | 评论(0) | 转发(0) |