You're viewing old version number 13. - Current version
MongoDB
On Oct 6, 2014, I installed MongoDB on my Digital Ocean droplet.
It installed a 32-bit version.
https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-12-04
Created and executed a bash script with the following:
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo "deb <a href="http://downloads-distro.mongodb.org/repo/ubuntu-upstart">http://downloads-distro.mongodb.org/repo/ubuntu-upstart</a> dist 10gen" | tee -a /etc/apt/sources.list.d/10gen.list
apt-get -y update
apt-get -y install mongodb-10gen
This install executed quickly and easily, as most fine things do.
It installed version 2.4.11.
The latest version available is 2.6.4, which was released on Aug 11, 2014.
Check for running process:
$ ps aux | grep mongo
mongodb 569 0.4 6.4 627676 15936 ? Ssl 22:54 0:02 /usr/bin/mongod --config /etc/mongodb.conf
Perl
Perl driver for MongoDB
http://search.cpan.org/dist/MongoDB/
https://github.com/mongodb/mongo-perl-driver
On Oct 6, 2014, I executed the following command:
perl -MCPAN -e 'install MongoDB'
That installed version MongoDB-v0.705.0.0 of the Perl driver. It took 8 to 10 minutes to install the module with all of its dependencies.
It must be a big or slow module. I executed a 'hello world' script that loads the module, and the only other thing the script did was execute the print command. When loading this module, it took the script over one second to execute.
http://docs.mongodb.org/v2.2/tutorial/getting-started-with-the-mongo-shell/
To launch shell, execute:
/usr/bin/mongo
MongoDB Shell Commands
To display the database you are using, type:> db
To switch databases, issue the use <db> command, as in the following example:
> use <database>
To list the available databases:
> show dbs
To see the list of collections in the current database:
> show collections
To see the help for methods available on the collection objects (e.g. db.<collection>), use the db.<collection>.help() method:
> db.collection.help()
http://docs.mongodb.org/manual/core/crud-introduction/
http://docs.mongodb.org/v2.2/tutorial/access-mongo-shell-help/#mongo-shell-help-collection
From JR's : articles
273 words - 2304 chars
- 1 min read
created on
updated on
- #
source
- versions
Related articles
MongoDB - Oct 06, 2014