markdown OS X上的mongo自动启动

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown OS X上的mongo自动启动相关的知识,希望对你有一定的参考价值。

### Install with Homebrew

    brew install mongodb

Set up launchctl to auto start `mongod`

    $ ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents

`/usr/local/opt/mongodb/` is a symlink to `/usr/local/Cellar/mongodb/x.y.z` (e.g., `2.4.9`)

You can use launchctl to start and stop `mongod`

    $ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
    $ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
    
You can also more conveniently use `brew` to start, stop, and verify service status

    $ brew services list | grep mongodb
    $ brew services start mongodb
    $ brew services stop mongodb

#### Notes

The default plist provided by homebrew stores the mongod configuration at `/usr/local/etc/mongod.conf`. This configuration specifies the `dbpath` to be `/usr/local/var/mongodb` instead of the default `/data/db`.

For more about `launchctl` see:

https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/launchctl.1.html#//apple_ref/doc/man/1/launchctl

http://launchd.info/

以上是关于markdown OS X上的mongo自动启动的主要内容,如果未能解决你的问题,请参考以下文章

markdown 使用dnsmasq在localhost开发中的OS X上的通配符DNS记录

Mongo DB install on windows 7 OS

Mac OS X Mojave 上的 XAMPP 错误

Mac OS X 上的焦点跟随鼠标(加上自动抬起)

在 Mac OS X Yosemite/El Capitan 上自动启动 MySQL 服务器

MAC OS X 优胜美地上 ejabberd 15.0.4 上的 mod_rest 未启动