windows环境下安装mongodb(这里是用应用软件安装)

下载好后点击安装
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

因为每次启动Mongodb都要指定数据库,就是和bin目录同级的那个data文件夹, 所以接下来我们直接在环境变量中配置Mongodb
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
填写内容:

# mongod.conf

# for documentation of all options, see:
#   http://docs.mongodb.org/manual/reference/configuration-options/

# Where and how to store data.
storage:
  dbPath: F:\Mongodb\data\db
  journal:
    enabled: true
#  engine:
#  mmapv1:
#  wiredTiger:

# where to write logging data.
systemLog:
  destination: file
  logAppend: true
  path:  F:\Mongodb\log\mongod.log

# network interfaces
net:
  port: 27017
  bindIp: 127.0.0.1


#processManagement:

#security:

#operationProfiling:

#replication:

#sharding:

## Enterprise-Only Options:

#auditLog:

#snmp:
mp:

在这里插入图片描述

命令:
mongod --dbpath “F:\Mongodb\data” --logpath “F:\Mongodb\log\MongoDB.log” --install --serviceName “MongoDB”

在这里插入图片描述

命令:net start MongoDB
在这里插入图片描述
命令:sc delete MongoDB
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
如果遇见其他情况请看:https://blog.csdn.net/weixin_44064357/article/details/105323762

发布了7 篇原创文章 · 获赞 5 · 访问量 309

猜你喜欢

转载自blog.csdn.net/weixin_44064357/article/details/105325262
今日推荐