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 failed
So 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:
  1. get username of the currently logged
    whoami
  2. 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 successful
finally, we have two ways to start and stop mongo server:

brew services start mongo
brew services stop mongo

mongod and stop it manual

Robomongo:

  1. Go to robomongo.org to download the latest Robomongo.
  2. Open mongodb services by brew.
  3. Then create a connection, named it as "Local":
create connection
  1. Save it and click connect.

[文集内容来源于udemy上Stephen Grider的The Complete Developers Guide to MongoDB,由本人整理翻译,作为学习用途]

上一篇下一篇

猜你喜欢

热点阅读