三、mongodb相关工具
###在安装文件下有README,描述了常用的mongodb相关命令行工具
# more /usr/local/mongodb/README
MongoDB README
Welcome to MongoDB!
COMPONENTS
bin/mongod - The database process.
bin/mongos - Sharding controller.
bin/mongo - The database shell (uses interactive javascript).
UTILITIES
bin/mongodump - MongoDB dump tool - for backups, snapshots, etc..
bin/mongorestore - MongoDB restore a dump
bin/mongoexport - Export a single collection to test (JSON, CSV)
bin/mongoimport - Import from JSON or CSV
bin/mongofiles - Utility for putting and getting files from MongoDB GridFS
bin/mongostat - Show performance statistics
RUNNING
For command line options invoke:
$ ./mongod --help
To run a single server database:
$ mkdir /data/db
$ ./mongod
$
$ # The mongo javascript shell connects to localhost and test database by default:
$ ./mongo
> help
DRIVERS
Client drivers for most programming languages are available at mongodb.org. Use the
shell ("mongo") for administrative tasks.
###获取单个命令用法
# <command> --help
# mongod --help|more
Options:
General options:
-h [ --help ] show this usage information
--version show version information
# mongod --version
db version v3.0.6
git version: 1ef45a23a4c5e3480ac919b28afcba3c615488f2
更多MongoDB相关内容可以看看以下的有用链接:
CentOS编译安装MongoDB
CentOS 编译安装 MongoDB与mongoDB的php扩展
CentOS 6 使用 yum 安装MongoDB及服务器端配置
Ubuntu 13.04下安装MongoDB2.4.3
《MongoDB 权威指南》(MongoDB: The Definitive Guide)英文文字版[PDF]
基于CentOS 6.5操作系统搭建MongoDB服务 uxidc.com/Linux/2014-11/108900.htm