root@oracle:/usr/local# wgethttp://fastdl.mongodb.org/sunos5/mongodb-sunos5-x86_64-2.4.6.tgz
2013-10-07 03:30:43 (256 KB/s) - 已保存 “mongodb-sunos5-x86_64-2.2.6.tgz” [76282876/76282876])
root@oracle:/usr/local# ls
bin lib mongodb-sunos5-x86_64-2.2.6.tgz tomcat
include make nginx
root@oracle:/usr/local# tar -zxvf mongodb-sunos5-x86_64-2.2.6.tgz
root@oracle:/usr/local/mongodb-sunos5-x86_64-2.2.6#
root@oracle:/usr/local/mongodb-sunos5-x86_64-2.2.6# bin/mongod --dbpath=/usr/local/mongodb-sunos5-x86_64-2.2.6/mogodata/ &
[1] 294
root@oracle:/usr/local/mongodb-sunos5-x86_64-2.2.6# Mon Oct 7 04:23:39 [initandlisten] MongoDB starting : pid=294 port=27017 dbpath=/usr/local/mongodb-sunos5-x86_64-2.2.6/mogodata/ 64-bit host=oracle
Mon Oct 7 04:23:39 [initandlisten]
Mon Oct 7 04:23:39 [initandlisten] ** NOTE: your operating system version does not support the method that MongoDB
Mon Oct 7 04:23:39 [initandlisten] ** uses to detect impending page faults.
Mon Oct 7 04:23:39 [initandlisten] ** This may result in slower performance for certain use cases
Mon Oct 7 04:23:39 [initandlisten]
Mon Oct 7 04:23:39 [initandlisten] db version v2.2.6, pdfile version 4.5
Mon Oct 7 04:23:39 [initandlisten] git version: d626379119a6de9f2fb390780cf2fc336dfd540d
Mon Oct 7 04:23:39 [initandlisten] build info: SunOS bs-smartos-x86-64-1.10gen.cc 5.11 joyent_20130322T181205Z i86pc BOOST_LIB_VERSION=1_49
Mon Oct 7 04:23:39 [initandlisten] options: { dbpath: "/usr/local/mongodb-sunos5-x86_64-2.2.6/mogodata/" }
Mon Oct 7 04:23:39 [initandlisten] journal dir=/usr/local/mongodb-sunos5-x86_64-2.2.6/mogodata/journal
Mon Oct 7 04:23:39 [initandlisten] recover begin
Mon Oct 7 04:23:39 [initandlisten] info no lsn file in journal/ directory
Mon Oct 7 04:23:39 [initandlisten] recover lsn: 0
Mon Oct 7 04:23:39 [initandlisten] recover /usr/local/mongodb-sunos5-x86_64-2.2.6/mogodata/journal/j._0
Mon Oct 7 04:23:39 [initandlisten] recover cleaning up
Mon Oct 7 04:23:39 [initandlisten] removeJournalFiles
Mon Oct 7 04:23:39 [initandlisten] recover done
Mon Oct 7 04:23:39 [initandlisten] waiting for connections on port 27017
Mon Oct 7 04:23:39 [websvr] admin web console waiting for connections on port 28017
http查看状态
root@oracle:/usr/local/mongodb-sunos5-x86_64-2.2.6# bin/mongo //连接
MongoDB shell version: 2.2.6
connecting to: test
Mon Oct 7 04:53:38 [initandlisten] connection accepted from 127.0.0.1:28418 #5 (1 connection now open)
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
> show dbs;
admin (empty)
local (empty)
#######################################
本文由笔者原创
作者:john
转载请注明出处