Debian and Ubuntu based Linux distributions
If you are using Ubuntu Precise or Debian Wheezy, you might want to read about running Node.js >= 4.x on older distros
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - sudo apt-get install -y nodejs
Optional: install build tools
To compile and install native addons from npm you may also need to install build tools:
sudo apt-get install -y build-essential
updat npm
npm install -g npm 首先安装n模块: npm install -g n 升级node到最新版本 n latest 升级node.js到最新稳定版 n stable npm -v #显示版本,检查npm 是否正确安装。 npm install express #安装express模块 npm install -g express #全局安装express模块 npm list #列出已安装模块 npm show express #显示模块详情 npm update #升级当前目录下的项目的所有模块 npm update express #升级当前目录下的项目的指定模块 npm update -g express #升级全局安装的express模块 npm uninstall express #删除指定的模块
install oraclejet
安装五个软件:yo、 grunt、 bower、 git、 grunt-cli 可以分别安装,安装yo时npm 》 3.0 npm -g install yo grunt bower git grunt-cli 安装jet npm -g install generator-oraclejet 创建jet项目 yo oraclejet <app name>