Home > Database > Mysql Tutorial > linux下mongodb安装和启动过程

linux下mongodb安装和启动过程

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 16:11:17
Original
1382 people have browsed it

一 转到目录解压缩下载的压缩包 lamp@QA-clg server$ tar -zxvf mongodb.tgz 二 安装后查看: [lamp@QA-clg mongodb-linux-x86_64-2.4.6]$ cd bin[lamp@QA-clg bin]$ lsbsondump mongodump mongoimport mongorestore mongostatmongo mongoexport mongooplog



一 转到目录解压缩下载的压缩包
lamp@QA-clg server$ tar -zxvf mongodb.tgz


二 安装后查看:
[lamp@QA-clg mongodb-linux-x86_64-2.4.6]$ cd bin
[lamp@QA-clg bin]$ ls
bsondump mongodump mongoimport mongorestore mongostat
mongo mongoexport mongooplog mongos mongotop
mongod mongofiles mongoperf mongosniff
Copy after login

bin下的mongod就是MongoDB的服务端进程,mongo就是其客户端,其它的命令用于MongoDB的其它用途如MongoDB文件导出等。


三 启动过程:


要先建立好MongoDB 存放数据文件和日志文件的目录,此处建立在/data下

[lamp@QA-clg mongodb-linux-x86_64-2.4.6]$ cd data
[lamp@QA-clg data]$ ls
db logs
[lamp@QA-clg data]$
Copy after login


在MongoDB安装目录下的bin下使用mongod启动MongoDB, ./mongod --dbpath=(自己安装路径)/data/mongodb_data/ --logpath=(自己安装路径)/data/mongodb_log/mongodb.log --logappend&


四 查看log,发现启动成功
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template