一,先安装mongo数据库,本机ubuntu18.04

    1. # 确保包最新
    2. sudo apt update && sudo apt upgrade -y
    3. # 安装
    4. sudo apt install mongodb
    5. sudo systemctl status mongodb
    6. sudo systemctl stop mongodb
    7. sudo systemctl start mongodb
    8. sudo systemctl restart mongodb
    9. # 是否随系统启动
    10. sudo systemctl disable mongodb
    11. sudo systemctl enable mongodb
    12. # 编辑数据库
    13. mongo

    二,安装可视化工具,robo3t

    1. # 下载安装包
    2. # 解压
    3. tar -xvzf robo3t-1.1.1-linux-x86_64-c93c6b0.tar.gz
    4. # 创建一个目录,将解压包里的所有内容移动过去
    5. sudo mkdir /usr/local/bin/robomongo
    6. sudo mv robo3t-1.1.1-linux-x86_64-c93c6b0/* /usr/local/bin/robomongo
    7. # 加权限
    8. cd /usr/local/bin/robomongo/bin
    9. sudo chmod +x robo3t
    10. # 加快捷启动
    11. vim ~/.bashrc --> alias robomongo="/usr/local/bin/robomongo/bin/robo3t"
    12. source ~/.bashrc
    13. # 启动
    14. robomongo