Hi, I have tried to install mongod from the apt-get install on my Kali Linux machine. However, it couldn’t find a package with that name. Hence, I decided to install mongod binaries specified at in their documentation as follows.
- Donwload mongod package and extract the content
- Add the location of mongod in the PATH variable
Goto home directory -> Ctrl+H -> Find the .bashrc file -> open and paste following-> Save
- Create data/db directory. (Since I use the root user not needed to set permissions)
mkdir -p /data/db
- Now open terminal and use mongod to start the server
- Use mongo command to use the database
Cheers ! 🙂
Pingback: Use MongoDB Cloud with Python on Kali 2020 | Tech Star
dear kulani, tkns for this article :),
I’m having an issue in finding the mongodb directory to add to path.
I’m on Kali 2020 as you.
can you please tell me how to find it on debian based distro?.
I’m using “locate ” but still get a mess of files
tanks a lot
@emixstream not sure if you still need it, refers to the path you downloaded and untar-ed the mongo files.
Say that you have un-tar the file in /home/kali/Desktop, your path would be /home/kali/Desktop/mongodb-linux-x86_64-3.6.17
Here’s an example:
[/home/kali/Desktop] # tar -xvf mongodb-linux-x86_64-3.6.17.tgz
[/home/kali/Desktop] # export PATH=/home/kali/Desktop/mongodb-linux-x86_64-3.6.17/bin:$PATH