#####php常用扩展安装 ######php扩展
扩展帮助信息
http://pecl.php.net/
######fileinfo
1、下载的php版本中自带有
cd /path/php/ext/fileinfo
phpize
./configure --with-php-config=/path/php/bin/php-config
make
make install
2、在peclphp.net/搜索下载安装
######msgpack
在peclphp.net/搜索下载安装 注意:版本是否适合php的版本
wget "http://pecl.php.net/get/msgpack-0.5.7.tgz"
tar zxf msgpack-0.5.7.tgz
cd msgpack-0.5.7
/usr/local/php/bin/phpize
./configure --with-msgpack
make
make install
最后修改下php.ini文件
extension = "msgpack.so"
#######imap php安装包内含有
安装依赖包
yum install -y libc-client-*
cd /path/php/ext/fileinfo
phpize
./configure --with-php-config=/path/php/bin/php-config --with-kerberos --with-imap-ssl
make
make install
######常见错误
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
为缺失库文件
ll /usr/lib64/libc-client.so
ln -s /usr/lib64/libc-client.so /usr/lib/libc-client.so
再进行编译安装
######intl扩展
######安装之前应先安装ICU
ICU官网:http://www.icu-project.org/
下载地址:http://download.icu-project.org/files/icu4c/49.1.2/icu4c-49_1_2-src.tgz
PHP intl:http://pecl.php.net/package/intl
安装ICU
tar zxf icu4c-49_1_2-src.tgz
cd /path/icu/source
./configure --prefix=/usr/local/icu
make && make install
安装intl扩展
cd /path/php/ext/intl
phpize
./configure --enable-intl --with-icu-dir=/usr/local/icu/ --with-php-config=/usr/local/php5/bin/php-config
make
make install
#最后修改下php.ini文件
extension = "intl.so"
来源:oschina
链接:https://my.oschina.net/u/2752689/blog/701278