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

查看:36
本文介绍了如何在 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 会为这些发行版创建 » RPM(PHP Mongo).

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

我不熟悉 CentOS 和发行版上的 ssh 命令(它是什么?).谁能帮我安装这个 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 驱动程序

作为根:

  1. 导出 PHP_AUTOCONF=/usr/bin/autoconf
  2. 导出 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. php化
  7. ./配置
  8. 制作 &&进行安装
  9. 到/etc/php.d/mongo.ini,添加:extension=mongo.so

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

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