如何在CentOS 5.3上安装php-mongo? [英] How to install php-mongo on CentOS 5.3?

查看:198
本文介绍了如何在CentOS 5.3上安装php-mongo?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的VPS上安装了mongoDB。它工作得很好。

I've already installed mongoDB on my VPS. It works well.

现在我想安装php驱动程序使php与mongoDB一起工作。

Now I want to install php driver to make php work with mongoDB.

Mongo安装,但找不到我需要的信息。本手册仅包含此通知:

I followed Mongo Installation but cannot find information I need. This manual contains only this notice:

如果您使用CentOS或Redhat,Csoke Arpad为这些发行版创建了»RPMs( PHP Mongo )。

If you are using CentOS or Redhat, Csoke Arpad created » RPMs for these distributions (PHP Mongo).

我不熟悉ssh命令 CentOS 和发行版(是什么?)。任何人都可以帮我安装这个PHP扩展?请提供安装所需的所有ssh命令。

I'm not familiar with ssh commands on CentOS and distributions (what is it?). Can anyone help me install this php extension? Please provide all ssh commands needed to install it.

谢谢。

推荐答案

首先使用pecl尝试Justin的解决方案(你会希望使用yum而不是aptitude来安装php-devel),但如果这不工作,我偶然有手动构建过程已经为我自己的部署参考。 :)

Try Justin's solution first with pecl (you'll want to use yum rather than aptitude to install php-devel), but if that doesn't work, I happen to have the manual build procedures on hand already for my own deploy reference. :)

安装PHP MongoDB驱动程序

以root身份:


  1. export PHP_AUTOCEF = / usr / bin / autoconf

  2. export PHP_AUTOHEADER = / usr / bin / autoheader

  3. wget http://pecl.php.net/get/mongo- 1.0.9.tgz

  4. tar -xzf mongo-1.0.9.tgz

  5. cd mongo-1.0.9

  6. phpize

  7. ./ configure

  8. make& make install

  9. 至/etc/php.d/mongo.ini,添加:
    extension = mongo.so

  1. export PHP_AUTOCONF=/usr/bin/autoconf
  2. export PHP_AUTOHEADER=/usr/bin/autoheader
  3. wget http://pecl.php.net/get/mongo-1.0.9.tgz
  4. tar -xzf mongo-1.0.9.tgz
  5. cd mongo-1.0.9
  6. phpize
  7. ./configure
  8. make && make install
  9. To /etc/php.d/mongo.ini, add: extension=mongo.so

这篇关于如何在CentOS 5.3上安装php-mongo?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆