安装MongoDB的(子进程失败,错误号为100退出) [英] install mongoDB (child process failed, exited with error number 100)

查看:127
本文介绍了安装MongoDB的(子进程失败,错误号为100退出)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的MacBook Air安装MongoDB的.

I tried to install mongoDB on my macbook air.

我从官方网站下载提取压缩文件,该文件并移动到根目录下. 在此之后,该目录下,我做了/数据/db和/日志文件夹.

I've downloaded zipped file from official website and extract that file and move to root directory. After that, under that directory, I've made /data/db and /log folder.

下面是我其描述了基本配置为我的DB.

Here is my mongodb.config which describes the basic config for my DB.

dbpath = /mongodb/data/db
logpath = /mongodb/log/mongo.log
logappend = true
#bind ip = 127.0.0.1
port = 27017

fork = true
rest = true
verbose = true
#auth = true
#noauth = true

此外,我想知道#在配置文件中的含义.

Additionally, I want to know what the # means in the config file.

我把这个文件以是我提取文件到目录中.

I put this file to /mongodb/bin, /mongodb is the directory I extracted the files into.

我打开终端,并进入和我得到这个回来.

I opened terminal and entered ./mongod --config mongodb.config and I got this back.

Juneyoung-ui-MacBook-Air:bin juneyoungoh$ ./mongod --config mongodb.config
about to fork child process, waiting until server is ready for connections.
forked process: 1775
all output going to: /mongodb/log/mongo.log
ERROR: child process failed, exited with error number 100

我如何处理这个错误,这意味着什么?

How can I handle this error and what this means?

推荐答案

在创建的文件夹中的数据是非常有可能与创建的,是吗?它们是由<6>拥有和不被你的普通用户可写的.如果你是你的MacBook的唯一用户,然后更改目录的所有权转让给你:

The data folders you created were very likely created with sudo, yes? They are owned by root and are not writable by your normal user. If you are the only user of your macbook, then change the ownership of the directories to you:

sudo chown juneyoungoh /data
sudo chown juneyoungoh /data/db
sudo chown juneyoungoh /data/log

如果您计划在公共机器或某个合法上安装这一点,那么阅读更多关于蒙戈其他地方的安全做法.我只是让你在你的MacBook上运行.

If you plan on installing this on a public machine or somewhere legit, then read more about mongo security practices elsewhere. I'll just get you running on your macbook.

这篇关于安装MongoDB的(子进程失败,错误号为100退出)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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