让前端飞Web前端之路

MongoDB 的安装

2020-09-20  本文已影响0人  ComfyUI

项目地址:https://github.com/Ewall1106/mall

Mac 安装

1. 安装 HomeBrew

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

# 报错了?
$ curl: (7) Failed to connect to raw.githubusercontent.com port 443: Operation timed out

# 使用中科院的镜像源重试一下
$ /usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"

$ brew -v
> Homebrew 2.4.12

2. 安装 MongoDB

$ brew install mongodb

$ brew tap mongodb/brew
$ brew install mongodb-community
$ mongod -version

3. 启动服务

# 启动
$ brew services restart mongodb-community

$ mongo
$ show dbs
admin   0.000GB
config  0.000GB
local   0.000GB

# 重启
$ brew services restart mongodb-community

# 停止
$ brew services stop mongodb-community

Windows 安装

上一篇下一篇

猜你喜欢

热点阅读