Reprinted from http://my.oschina.net/reg/blog/289536
Ctrl + Alt + T, open terminal, enter the following command to install:
sudo apt-get install Nodejs
After the installation completes, the terminal input Nodejs, can enter node command;
But the normal should be input node into command instead of Nodejs;
In Ubuntu, node belongs to other applications, but continue to enter the following command installation, you can use node to enter the command after completion.
sudo apt-get install nodejs-legacy
Nodejs after installation, continue to install NPM;
sudo apt-get install NPM
sudo npm Install-g Express
-G is performing a global installation
sudo npm install-g [email protected]
After @ is the version to install
Note: After 4.x, also need to install express-generator, otherwise express cannot use
sudo npm install-g express-generator
Start is NPM start
When you install the package with NPM, you sometimes report 304, and this time you need to clear the cache:
NPM Cache Clean
Next install the database, MongoDB
sudo apt-get install mongodb-clients
sudo apt-get install Mongodb-server
After installing MongoDB, run MONGO start service under Terminal!
Ubuntu install node. js + Express + MongoDB