How to install MongoDB in FreeBSD
To install MongoDB in FreeBSD
MongoDB is an open-source, cross-platform, document-oriented database which stores data in JSON-like documents. The main features of MongoDB are Ahoc queries, indexing, load balancing and file storage. Installation of MongoDb in FreeBSD is explained in this article.
Installation of MongoDB
Run the following command to update the repository.
root@linuxhelp:~ # pkg update -f
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100% 944 B 0.9kB/s 00:01
Fetching packagesite.txz: 100% 5 MiB 411.6kB/s 00:14
Processing entries: 100%
FreeBSD repository update completed. 25366 packages processed.
Then install MongoDB by using “ pkg install” command.
root@linuxhelp:~ # pkg install mongodb
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):
.
.
.
Using existing group ' mongodb' .
===> Creating users
Using existing user ' mongodb' .
[1/1] Extracting mongodb-2.6.12: 100%
Enable the MongoDB service by adding the following line at the bottom of rc.conf file.
root@linuxhelp:~ # nano /etc/rc.conf
mongod_enable=” yes”
Start the MongoDB service by running the following command.
root@linuxhelp:~ # service mongod start
Starting mongod.
To launch MongoDB
Open the terminal and type MongoDB.
root@linuxhelp:~ # mongoDB MongoDB shell version: 2.6.12 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 > use linuxhelpdb switched to db linuxhelpdb > db linuxhelpdb > show dbs admin (empty) local 0.078GB > exit bye
Comments ( 0 )
No comments available