OS X NodeJS 开发环境配置

安装 nvm

curl -o- https://raw.githubusercontent/creationx/nvm/v0.33.2.install.sh | bash

安装默认版本NODE

nvm install node

安装其它版本node

nvm install node --version

安装 brew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

安装 mongodb

brew install mongodb

## 修改配置文件
vi /usr/local/etc/mongod.conf

## 创建数据存储目录

mkdir -p ~/workspace/database/mongodb

## 设置读取权限

sudo chown USERNAME -u ~/workspace/database/mongodb

mkdir -p ~/Library/LaunchAgents
cd ~/Library/LaunchAgents/
cp /usr/local/Cellar/mongodb/3.4.4/homebrew.mxcl.mongodb.plist .
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist

安装 docker

brew install docker
brew install docker-machine
brew install docker-compose

标签: osx, nodejs

评论已关闭