1、npm install -g n
通过npm 全局安装node
2、 sudo n 8.16.0
设置node版本
Password:
install : node-v8.16.0
mkdir : /usr/local/n/versions/node/8.16.0
fetch : https://nodejs.org/dist/v8.16.0/node-v8.16.0-darwin-x64.tar.gz
######################################################################## 100.0%
installed : v8.16.0
3、node -v
v8.16.0
二、安装mongodb
1、brew tap mongodb/brew
2、brew install mongodb-community
=>Installing mongodb-community from mongodb/brew
==>Downloading https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-4.2.5.tgz
######################################################################## 100.0%
==>Caveats
To have launchd start mongodb/brew/mongodb-community now and restart at login:
brew services start mongodb/brew/mongodb-community
Or, if you don't want/need a background service you can just run:
mongod --config /usr/local/etc/mongod.conf
==>Summary
欢迎分享,转载请注明来源:夏雨云
评论列表(0条)