How to install php-mongo on CentOS 5.3?(如何在 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 驱动程序
作为根:
- 导出 PHP_AUTOCONF=/usr/bin/autoconf
- 导出 PHP_AUTOHEADER=/usr/bin/autoheader
- wget http://pecl.php.net/get/mongo-1.0.9.tgz
- tar -xzf mongo-1.0.9.tgz
- cd mongo-1.0.9
- php化
- ./配置
- 制作 &&进行安装
- 到/etc/php.d/mongo.ini,添加:extension=mongo.so
这篇关于如何在 CentOS 5.3 上安装 php-mongo?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 CentOS 5.3 上安装 php-mongo?


- 没有作曲家的 PSR4 自动加载 2022-01-01
- 正确分离 PHP 中的逻辑/样式 2021-01-01
- 从 PHP 中的输入表单获取日期 2022-01-01
- 带有通配符的 Laravel 验证器 2021-01-01
- PHP Count 布尔数组中真值的数量 2021-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- SoapClient 设置自定义 HTTP Header 2021-01-01
- Mod使用GET变量将子域重写为PHP 2021-01-01
- 如何定位 php.ini 文件 (xampp) 2022-01-01
- Laravel 仓库 2022-01-01