截至 2021-01-12 最新 MongoDB 服务器单台环境搭建参考


文章目录

  • 1.下载服务器的rpm安装包
  • 2. 安装Python2
    • 2.1. 直接rmp安装 python2 is needed
    • 2.2. 安装并配置Python2
  • 3. 执行安装rpm
  • 4. 配置并启动mongod
    • 4.1. 处理异常code=exited, status=100
  • 5. 连接控制
    • 5.1. 下载mongo shell安装包
    • 5.2. 安装mongosh
    • 5.3. 连接mongo
  • 6. 建立用户,建应用库和应用用户
  • 6.1. 建库
    • 6.2. 配置用户
    • 6.3. 允许远程访问
  • 7. 远程GUI连接数据库
    • 7.1. 下载官方GUI工具compass
    • 7.2. 使用连接compass连接

MongoDB 高可用参考博客《 我们的一个已投产项目的高可用数据库实战 - mongo 副本集的搭建详细过程》。
本文验证环境:Centos8.1,64 位。

https://www.mongodb.com/try/download/community

mongodb-org-server-4.2.11-1.el8.x86_64.rpm

https://www.mongodb.com/try/download/shell

mongosh-0.6.1-x86_64.rpm

https://docs.mongodb.com/mongodb-shell/
  • https://docs.mongodb.com/mongodb-shell/install#std-label-mdb-shell-install
  • https://docs.mongodb.com/mongodb-shell/connect#std-label-mdb-shell-connect
  • https://docs.mongodb.com/manual/tutorial/create-users/

    https://medium.com/founding-ithaka/setting-up-and-connecting-to-a-remote-mongodb-database-5df754a4da89

    https://www.mongodb.com/try/download/compass
    mongodb-compass-1.24.6-win32-x64.msi
    使用管理员CMD执行之安装。

    7.2. 使用连接compass连接

    compass.png

    相关