S
S
safenoob2016-05-02 07:59:02
MongoDB
safenoob, 2016-05-02 07:59:02

Why can't he see mongodb commands?

I install mongo on Debian 7 with four commands:
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb 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
We look, everything seems to be installed:
mongo
MongoDB shell version: 3.2.6
connecting to: test
Files in place:
/etc/init.d/mongod restart
/var/log/mongodb/mongod.log
/etc/mongod.conf
Further oddities:
mongostat command works, but mongotop outputs:
2016-05-02T00:21:30.474 -0400 E QUERY [thread1] ReferenceError: mongotop is not defined :
@(shell):1:1
The show dbs command says:
-bash: show: command not found
The instructions say:

If you have added the /bin to the PATH environment variable, you can just type mongo instead of ./bin/mongo.

It is clear that the path must be specified in the environment variable. But I can’t understand in any way where the monga was put, i.e. what is its installation dir? In the bin folder, mongo is currently missing. Which way to prescribe?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lega, 2016-05-02
@lega

You are trying to run them from the wrong place,
mongo, monostat, mongotop... are applications, they need to be run from bash (console)
show dbs is a mongodb command, it needs to be run from mongo shell (mongo)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question