Install Mongodb on Fedora 23

To install Mongodb on Fedora 23 go to

https://www.mongodb.org/downloads

On the Linux tab go to version RHEL 7 Linux 64-bitmongodbSreenshot

$ wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-3.2.3.tgz

Untar the tarball

$ tar -zxvf mongodb-linux-x86_64-rhel70-3.2.3.tgz
$ echo $PATH
$ sudo ln -s ~/Downloads/mongodb-linux-x86_64-rhel70-3.2.3/bin/mongo /usr/local/bin/mongod
$ mongod --version
MongoDB shell version: 3.2.3
$ mongo --version
MongoDB shell version: 3.0.8

Make the directory /data/db

$ mkdir -p /data/db/

Change the permissions on both /data and /data/db

$ sudo chmod 777 /data
$ sudo chmod 777 /data/db

Make sure you are in the mongo directory in /Downloads, ~/Downloads/mongodb-linux-x86_64-rhel70-3.2.3/bin/mongo . Next copy all here to /usr/local/bin/

$ cp * /usr/local/bin

From anywhere run the server with

$ mongod

At the end of the output you should get

 ....... waiting for connections on port 27017

In your browser navigate to localhost:27017
Selection_005
I found that on Fedora both mongod and mongo start the server. mongo should start the Mongodb shell only.

$ mongo

Should run the mongo shell, however on fedora you will need to use,

 $ sudo mongod

And this only works when the Mongodb server is already running.
Continue to Basics of MongoDB Shell

Leave a Reply