• MongoDB 4.4 以后版本安装Database Tools 工具


    MongoDB 4.4 开始Database Tools 是独立发布的,请参考链接:https://www.cndba.cn/dave/article/107951

    这些工具如下:

    Binary Import / Export
    mongodump
    mongorestore
    bsondump
    
    Data Import / Export
        mongoimport
        mongoexport
    
    Diagnostic Tools
        mongostat
    mongotop
    
    GridFS Tools
        mongofiles

    所以在4.4 之后的版本要想使用这些工具,需要安装。

    下载地址:https://www.mongodb.com/try/download/database-tools

    Database Tools的安装很简单,将文件解压缩后复制到MongoDB的安装目录即可:

    [dave@www.cndba.cn  mongodb]# cd /mongodb/
    [dave@www.cndba.cn  mongodb]# ls
    data  logs  mongodb-linux-x86_64-rhel70-4.4.13.tgz
    [dave@www.cndba.cn  mongodb]# ls
    data  logs  mongodb-database-tools-rhel70-x86_64-100.5.2.tgz  mongodb-linux-x86_64-rhel70-4.4.13.tgz
    
    [dave@www.cndba.cn  mongodb]# tar xzvf mongodb-database-tools-rhel70-x86_64-100.5.2.tgz
    mongodb-database-tools-rhel70-x86_64-100.5.2/LICENSE.md
    mongodb-database-tools-rhel70-x86_64-100.5.2/README.md
    mongodb-database-tools-rhel70-x86_64-100.5.2/THIRD-PARTY-NOTICES
    mongodb-database-tools-rhel70-x86_64-100.5.2/bin/bsondump
    mongodb-database-tools-rhel70-x86_64-100.5.2/bin/mongodump
    mongodb-database-tools-rhel70-x86_64-100.5.2/bin/mongoexport
    mongodb-database-tools-rhel70-x86_64-100.5.2/bin/mongofiles
    mongodb-database-tools-rhel70-x86_64-100.5.2/bin/mongoimport
    mongodb-database-tools-rhel70-x86_64-100.5.2/bin/mongorestore
    mongodb-database-tools-rhel70-x86_64-100.5.2/bin/mongostat
    mongodb-database-tools-rhel70-x86_64-100.5.2/bin/mongotop
    [dave@www.cndba.cn  mongodb]#
    [dave@www.cndba.cn  mongodb]#
    
    [dave@www.cndba.cn  mongodb]# which mongod
    /usr/local/mongodb/bin/mongod
    
    [dave@www.cndba.cn  mongodb]# ll /usr/local/mongodb/bin/
    total 197696
    -rwxr-xr-x. 1 root root    15205 Mar  2 23:24 install_compass
    -rwxr-xr-x. 1 root root 53691040 Mar  2 23:35 mongo
    -rwxr-xr-x. 1 root root 83347720 Mar  2 23:55 mongod
    -rwxr-xr-x. 1 root root 65380248 Mar  2 23:44 mongos
    
    [dave@www.cndba.cn  mongodb]# cd mongodb-database-tools-rhel70-x86_64-100.5.2/bin
    [dave@www.cndba.cn  bin]# ll
    total 127516
    -rwxr-xr-x. 1 root root 13997360 Feb  1 21:49 bsondump
    -rwxr-xr-x. 1 root root 16769896 Feb  1 21:49 mongodump
    -rwxr-xr-x. 1 root root 16425456 Feb  1 21:49 mongoexport
    -rwxr-xr-x. 1 root root 17310776 Feb  1 21:49 mongofiles
    -rwxr-xr-x. 1 root root 16701752 Feb  1 21:49 mongoimport
    -rwxr-xr-x. 1 root root 17151264 Feb  1 21:49 mongorestore
    -rwxr-xr-x. 1 root root 16268112 Feb  1 21:49 mongostat
    -rwxr-xr-x. 1 root root 15931944 Feb  1 21:49 mongotop
    
    [dave@www.cndba.cn  bin]# cp * /usr/local/mongodb/bin/
    
    [dave@www.cndba.cn  bin]#  ll /usr/local/mongodb/bin/
    total 325212
    -rwxr-xr-x. 1 root root 13997360 Apr 26 21:21 bsondump
    -rwxr-xr-x. 1 root root    15205 Mar  2 23:24 install_compass
    -rwxr-xr-x. 1 root root 53691040 Mar  2 23:35 mongo
    -rwxr-xr-x. 1 root root 83347720 Mar  2 23:55 mongod
    -rwxr-xr-x. 1 root root 16769896 Apr 26 21:21 mongodump
    -rwxr-xr-x. 1 root root 16425456 Apr 26 21:21 mongoexport
    -rwxr-xr-x. 1 root root 17310776 Apr 26 21:21 mongofiles
    -rwxr-xr-x. 1 root root 16701752 Apr 26 21:21 mongoimport
    -rwxr-xr-x. 1 root root 17151264 Apr 26 21:21 mongorestore
    -rwxr-xr-x. 1 root root 65380248 Mar  2 23:44 mongos
    -rwxr-xr-x. 1 root root 16268112 Apr 26 21:21 mongostat
    -rwxr-xr-x. 1 root root 15931944 Apr 26 21:21 mongotop
    [dave@www.cndba.cn  bin]#
  • 相关阅读:
    机器学习基石笔记12——机器可以怎样学习(4)
    机器学习基石笔记11——机器可以怎样学习(3)
    机器学习基石笔记10——机器可以怎样学习(2)
    机器学习基石笔记9——机器可以怎样学习(1)
    机器学习基石笔记8——为什么机器可以学习(4)
    机器学习基石笔记7——为什么机器可以学习(3)
    转)C++中extern “C”含义深层探索
    CNN图像定位与物体探测_七月算法5月深度学习班第6次课程笔记
    Python 学习之Virtualenv
    电脑使用小技巧
  • 原文地址:https://www.cnblogs.com/duyao/p/16355476.html
Copyright © 2020-2023  润新知