zoukankan      html  css  js  c++  java
  • 阿里云ubuntu12.04下安装使用mongodb

    阿里云ubuntu12.04下安装mongodb

      apt-get install mongodb

    阿里云ubuntu12.04下卸载mongodb,同时删除配置文件

        apt-get purge mongodb-server
    
    这样卸载mongodb的同时,/etc/mongodb.conf等配置文件也会同时删除

    阿里云ubuntu12.04下启动mongodb

        service mongodb start

    阿里云ubuntu12.04下停止mongodb

        service mongodb stop

    阿里云ubuntu12.04下查看mongodb是否已启动

    1. 可以直接输入命令:mongo,如果能进入mongo命令行界面,说明mongodb已成功启动

    2. 可以用如下命令

       ps aux | grep mongo

      如果显示结果里有

       mongodb    662  0.3  6.4 804540 32456 ?        Ssl  10:53   0:02 /usr/bin/mongod --config /etc/mongodb.conf

      也说明mongodb已启动。

    阿里云ubuntu12.04下查看mongodb相关文件

        locate mongo

    阿里云ubuntu12.04下备份mongodb

        mongodump -d 数据库名 -o 备份存放目录

    阿里云ubuntu12.04下还原mongodb

        mongorestore -d 数据库名 --directoryperdb 备份存放目录

    阿里云ubuntu12.04下mongodb日志所在位置

        /var/log/mongodb


    http://my.oschina.net/u/132822/blog/201039
  • 相关阅读:
    python中的各种排序
    python 实现求和、计数、最大最小值、平均值、中位数、标准偏差、百分比。
    python中的lambda
    python中有趣的函数
    python中的小技巧
    python 删除list中重复元素
    django-pagination的使用
    django-south
    ios复制到剪贴板
    iOS系统验证关闭
  • 原文地址:https://www.cnblogs.com/iack/p/3783275.html
Copyright © 2011-2022 走看看