FastDFS php扩展安装
- 安装环境及其配置目录
centos 6.2 x64 PHP Version 5.3.8 PHP installpath : /usr/local/php FastDFS_v3.08.tar.gz
- 为方便查找目录,设置变量
# vi .bashrc alias worksrc='cd /usr/local/src' 配置生效 # source .bashrc
-
- 安装扩展
wget http://fastdfs.googlecode.com/files/FastDFS_v3.08.tar.gz tar -zxvf FastDFS_v3.08.tar.gz cd FastDFS ./make.sh ./make.sh install cd client make; make install cd ../php_client/ /usr/local/php/bin/phpize #php路径一定要对 ./configure --with-php-config=/usr/local/php/bin/php-config make && make install #将fastdfs的初始化数据导入php中 cat /usr/local/src/FastDFS/php_client/fastdfs_client.ini >> /usr/local/php/etc/php.ini service php-fpmd restart #重启php
cd client make; make install 如以上不安装,直接进php-config目录进行编译安装,会报如下错误 make: *** [fastdfs_client.lo] Error 1
另外我们可以参考REAME,里面介绍的也相当的详细
- 安装扩展