linux machine for that. Now open your terminal and type
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
apt-get update
apt-get install -y mongodb-org
service mongod start
Use sudo if you are not super or root user.
After install type ps -xa | grep mongod on your terminal. If the output is like this then your connection is established.echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
apt-get update
apt-get install -y mongodb-org
service mongod start
Use sudo if you are not super or root user.
Now its time for check your port and connection.
open the terminal and type mongo in terminal.
Now type db.serverCmdLineOpts() and there is a output like
"parsed" : {
"config" : "/etc/mongod.conf",
"net" : {
"bindIp" : "127.0.0.1",
"port" : 27017
}
There is your ip and port which is listening.
0 Comments