在RedHatEnterpriseServer 6.1下安装mongodb(一)
操作系统信息如下:
LSB Version: :core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServerDescription: Red Hat Enterprise Linux Server release 6.1 (Santiago)
Release: 6.1
Codename: Santiago
首先下载安装程序
wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-2.4.9.tgz
然后解压到当前目录:
tar zxvf mongodb-linux-i686-2.4.9.tgz
[test@rh6t133 opensource]$ ls
mongodb-linux-i686-2.4.9 mongodb-linux-i686-2.4.9.tgz
[test@rh6t133 opensource]$ cd mongodb-linux-i686-2.4.9
[test@rh6t133 mongodb-linux-i686-2.4.9]$ ls
bin GNU-AGPL-3.0 README THIRD-PARTY-NOTICES
[test@rh6t133 mongodb-linux-i686-2.4.9]$ ll
total 64
drwxrwxr-x 2 test test 4096 Feb 25 17:27 bin
-rw------- 1 test test 34520 Mar 8 2013 GNU-AGPL-3.0
-rw------- 1 test test 1359 Mar 8 2013 README
-rw------- 1 test test 18436 Mar 8 2013 THIRD-PARTY-NOTICES
[test@rh6t133 mongodb-linux-i686-2.4.9]$ cd bin/
[test@rh6t133 bin]$ ls
bsondump mongo mongod mongodump mongoexport mongofiles mongoimport mongooplog mongoperf mongorestore mongos mongosniff mongostat mongotop
在上一级目录下建立存放数据的目录
mkdir -p ../data/db
启动mongodb进程:
./mongod --dbpath=../data/db/ --rest
输出日志最后几行如下:
Tue Feb 25 17:48:27.544 [initandlisten] allocator: system
Tue Feb 25 17:48:27.544 [initandlisten] options: { dbpath: "../data/db/", rest: true }
Tue Feb 25 17:48:27.589 [initandlisten] waiting for connections on port 27017
Tue Feb 25 17:48:27.589 [websvr] admin web console waiting for connections on port 28017
在浏览器中输入http://ip:28017/即可访问mongodb的web管理界面。
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。