Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MongoDB远程部署 #24

Open
rico-c opened this issue Sep 6, 2019 · 0 comments
Open

MongoDB远程部署 #24

rico-c opened this issue Sep 6, 2019 · 0 comments

Comments

@rico-c
Copy link
Owner

rico-c commented Sep 6, 2019

  1. 从官网下载最新版本 [https://www.mongodb.com/download-center]
  2. 安装mongodb到服务器
  3. 此时mongodb默认使用127.0.0.1地址,需要加入参数 -bind_ip 0.0.0.0绑定到0.0.0.0以使外网访问
  4. 创建/data/db文件夹并chmod给予写权限
  5. 使用--fork --logpath=/data/db/log.log参数以守护进程的方式运行mongodb
  6. 全部命令行代码为mongod -bind_ip 0.0.0.0 --fork --logpath=/data/db/log.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant