2014-08-17
官方網站
http://www.mongodb.org/
安裝參考
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux/
安裝
vi /etc/yum.repos.d/10gen.repo |
[10gen] name=10gen Repository baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64 gpgcheck=0 enabled=1 |
yum -y install mongo-10gen mongo-10gen-server service mongod start chkconfig mongod on |
其他:
啟動程式式 /etc/rc.d/init.d/mongod
設定檔案為 /etc/mongod.conf
檔案存放在 /var/lib/mongo
Log 存放在 /var/log/mongo
測試
[root@localhost ~]# mongo MongoDB shell version: 2.6.4 connecting to: test 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 > db.test.save( { a: 1 } ) WriteResult({ "nInserted" : 1 }) > db.test.find() { "_id" : ObjectId("53f026e8f978de73d66bae64"), "a" : 1 } > help db.help() help on db methods db.mycoll.help() help on collection methods sh.help() sharding helpers rs.help() replica set helpers help admin administrative help help connect connecting to a db help help keys key shortcuts help misc misc things to know help mr mapreduce show dbs show database names show collections show collections in current database show users show users in current database show profile show most recent system.profile entries with time >= 1ms show logs show the accessible logger names show log [name] prints out the last segment of log in memory, 'global' is default use <db_name> set current database db.foo.find() list objects in collection foo db.foo.find( { a : 1 } ) list objects in foo where a == 1 it result of the last line evaluated; use to further iterate DBQuery.shellBatchSize = x set default number of items to display on shell exit quit the mongo shell > exit bye [root@localhost ~]# |
(完)
[研究] MongoDB 2.6.4 文件型資料庫 安裝 (CentOS 7.0 x86_64)
http://shaurong.blogspot.com/2014/08/mongodb-264-centos-70-x8664.html
[研究] MongoDB 2.4.5 文件型資料庫 安裝 (CentOS 6.4 x64)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=80023
[研究] MongoDB 1.6.5 文件型資料庫 安裝 (CentOS 5.5 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=19357
[研究] MongoDB 1.6.5 文件型資料庫 安裝 (Windows x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=19395
開源雲計算技術系列三(10gen)安裝配置
http://forum.icst.org.tw/phpbb/viewtopic.php?t=19386
三十五個非主流開源數據庫 MongoDB領銜主演
http://forum.icst.org.tw/phpbb/viewtopic.php?t=19377
沒有留言:
張貼留言