Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
MongoDB is a free and open source database and uses a document-oriented data model.
Installation
# dnf install mongodb mongodb-server
# sudo service mongod start
Run mongoDB (standalone installation or virtual machine)
mongo
Output:
MongoDB shell version: 4.0.0
connecting to: test
Run mongoDB (Fedora Remix WSL on Windows)
STEP 1: create /data/db dir
sudo mkdir -p /data/db
sudo chown -R $USER /data/db
STEP 2: install tmux
sudo dnf install tmux
STEP 3: creating a new tmux session
tmux new -s backgroundsession
STEP 4: run mongod in this background task
nohup /usr/bin/mongod &
STEP 5: close WSL Window and open again
STEP 6: run mongo
/usr/bin/mongo
MongoUI installation
MongoUI is an open-source web and desktop app which allows to administer local and remote MongoDB instances via GUI. No need to type commands in a terminal anymore.
https://github.com/azat-co/mongoui
STEP 1: nodejs, npm installation
sudo dnf install nodejs npm
STEP 2: Make a directory for global installations:
mkdir /home/user/.npm-global
Configure npm to use the new directory path:
npm config set prefix '~/.npm-global'
Change ~/.bashrc file and add this line:
export PATH=~/.npm-global/bin:$PATH
Back on the command line, update your system variables:
source ~/.bashrc
Test: Download a package globally without using sudo.
npm install -g jshint
STEP 3: mongoui installation
node /home/user/.npm-global/bin/mongoui
npm i -g mongoui
STEP 4: mongoui execution
nohup mongoui &
Add Comment
Please, Sign In to add comment