Environmental Variable
Setup MongoDB – Linux
Copy the bin path where the mongo binaries are stored,
/home/ec2-user/mongodb-linux-x86_64-3.2.18/bin
Edit ~/.bashrc
file as shown below,
# vi ~/.bashrc
Just edit the export path
From export PATH=/usr/bin/:$PATH
To export PATH=/home/ec2-user/mongodb-linux-x86_64-3.2.18/bin/:$PATH
# :wq
We need the source bashrc to reload -
# source ~/.bashrc
Now start the server without giving the entire path,
# mongod
--dbpath /home/ec2-user/data/db
To start the client,
Open another command prompt, just type mongo –
# mongo
Done...
ExactInside's C1000-021 dumps study questions have been developed with a vision to make exam preparation easy and rewarding for our clients.
ReplyDelete