Linux系统配置PHP支持MongoDB数据库
主命令:
pecl install mongo pecl command not found 问题解决方法:
yum install php-devel php-pear httpd-devel
configure: error: Cannot find php-config. Please use --with-php-config=PATH
很恶劣的一个问题,
我 find / -name php-config -print,发现在/usr/local/php/bin/php-config,
于是我运行
我再运行
我蛋疼地 cp /usr/bin
刚找到一个更好的方法,没亲测,但觉得可行:
cd /tmp/download
wget http://pecl.php.net/get/mongo-1.2.3.tgz
tar xzvf mongo-1.2.3.tgz
cd mongo-1.2.3
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make install
Linux系统配置PHP支持MongoDB数据库