Installation and some softwares
2017-08-22 本文已影响11人
黑山老水
softwares:
brew: for package manager
node: for tooling applications and packaging
mongodb: database
maybe Robomongo: gooey for browsing the contents of MongoDB, So we can look at all the data in mongodb(Visualization Tools)
installation:
brew:
go to homebrew, then paste the string at Terminal prompt.
node:
install:
brew install node
check version:
node -v
update:
brew upgrade node
Mongodb:
install:
brew install mongo
Then installation set up process:
command mongod
will start up a local mago server.
then we will get a exception like:
set up failedSo we should create this directory by command:
sudo mkdir -p /data/db
Then running
mongod
again,
and maybe will get another problem like: Permission denied or Unable to create/open lock file.
This is because of we don't have ownership of the directory.
So we need to take the ownership:
- get username of the currently logged
whoami
- take ownership: chown = change ownership, -Rv will print out the directory
sudo chown -Rv username /data/db
try mongod
again
it will be all set if we get:
set up successfulfinally, we have two ways to start and stop mongo server:
brew services start mongo
brew services stop mongo
mongod
and stop it manual
Robomongo:
- Go to robomongo.org to download the latest Robomongo.
- Open mongodb services by brew.
- Then create a connection, named it as "Local":
- Save it and click connect.
[文集内容来源于udemy上Stephen Grider的The Complete Developers Guide to MongoDB,由本人整理翻译,作为学习用途]