MongoDB 服务未在 RedHat 上启动 - 缺少 'service_uri'

标签 mongodb redhat

我在 Red Hat Enterprise Linux Client 5.4 (Tikanga) 机器上

我像这样创建了我的 /etc/yum.repos.d/10gen.repo:

[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1

我用以下命令安装了 MongoDB:sudo yum install mongo-10gen mongo-10gen-server

但是当我运行:sudo service mongod start

我得到:缺少 SERVICE_URI 环境变量

救命啊! :)

最佳答案

您在 PATH 中有一个名为 service 的可执行文件,它不是启动服务的标准实用程序。使用 /sbin/service 而不是 service

关于MongoDB 服务未在 RedHat 上启动 - 缺少 'service_uri',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17374790/

相关文章:

javascript - 更新数组对象会创建一个新的空对象

mongodb - 使用 MongoDB 时存储大量文档的生产最佳实践是什么?

linux - 如何为 Azure 上运行的虚拟机启用 ping?

linux - 拉拉维尔 5.6 "failed to open stream: Permission denied in filesystem.php"

Linux - 网络配置

node.js - mongodb日期范围问题

json - 来自 Powershell 的 Mongodb Find() 查询

node.js - 更新 mongoose 模型中的一个字段 (node.js)

ruby - 无法在 Redhat Linux 服务器上安装 RVM

redhat - 完全卸载旧的 unixODBC 并在 redhat 6.3 中安装 2.3.2 unixODBC