• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

在windows server 2012 R2上安装MongoDB

武飞扬头像
谭耀迪
帮助4

a) 首先下载三个补丁和MongoDB安装包:
KB2919445:Download Windows Server 2012 R2 更新程序 (KB2919442) from Official Microsoft Download Center
KB2919335:Download Windows 8.1 Update for x64-based Systems (KB2919355) from Official Microsoft Download Center
VC 2015:Download Visual C Redistributable for Visual Studio 2015 from Official Microsoft Download Center
MongoDB安装包:链接: https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-4.0.0-signed.msi
学新通
严格按照以下顺序进行安装
先安装KB2919442:
学新通
再继续安装KB2919355,此文件安装时间较长,且安装完成后需要重启:
学新通

最后安装vc_redist:
学新通
b) 安装MongoDB:双击打开mongodb-win32-x86_64-2008plus-ssl-4.0.0-signed:
学新通
学新通
学新通
这里更改一下安装地址,改为c:\mongodb(此目录需手动建立):
学新通
这里也稍作更改:
学新通

学新通
学新通

安装完成后,到本机浏览器输入:链接: http://127.0.0.1:27017,进行验证,如出现以下画面,则说明安装成功:
学新通

在桌面新建一个文本文档:mongodb.txt,写入以下内容:


# mongod.conf
# for documentation of all options, see:
#   http://docs.mongodb.org/manual/reference/configuration-options/
# Where and how to store data.
storage:
  dbPath: C:\mongodb\data\db
  journal:
    enabled: true
#  engine:
#  mmapv1:
#  wiredTiger:
# where to write logging data.
systemLog:
  destination: file
  logAppend: true
  path:  C:\mongodb\data\log\mongod.log
# network interfaces
net:
  port: 27017
  bindIp: 0.0.0.0
#processManagement:
#security:
#operationProfiling:
#replication:
#sharding:
## Enterprise-Only Options:
#auditLog:
#snmp:
学新通

保存,然后修改文件后缀为.cfg
学新通

复制该文件,到安装路径下的bin中(c:\mongodb\bin):替换目标中的文件、
学新通

完成后打开PowerShell使用以下命令来重新启动服务:
学新通

现在用内网的其他机器来测试一下是否能成功连接:(这里用的工具是Navicat):成功连接。

学新通

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhfichbg
系列文章
更多 icon
同类精品
更多 icon
继续加载