Nodejs installation Method under Linux (Debian)
One: Install node. js
1. Download on the official website http://www.nodejs.org/download/
After downloading, the /home/hongwei has a file node-v0.10.32-linux-x86.tar.gz , unzip it after the folder is Node-v0.10.32-linux-x86,
2. View version
CD node-v0.10.32-linux-x86
Ls
./node-v
View version is v0.10.32
3. Establish a link to establish it
Ln-s/home/hongwei/node-v0.10.32-linux-x86/bin/node/usr/local/bin/node
Ln-s/HOME/HONGWEI/NODE-V0.10.32-LINUX-X86/BIN/NPM/USR/LOCAL/BIN/NPM
This will be installed so that you can view the relevant information by entering node in the terminal.
Description: installing with apt-get is strongly not recommended because the information is not displayed after installation.
sudo apt-get install Nodejs
sudo apt-get install NPM
Two: Install Express
1. The official website of Express is http://expressjs.com/ , but the official git address is Https://github.com/strongloop/express.git , git it down first
git clone Https://github.com/strongloop/express.git
So there is a local Express directory.
2. when installing Express , be sure to follow The Git method to install, do not install according to the relevant prompts, otherwise the version is not. This is the official installation.
$ NPM Install Express
$ NPM install-g [email protected]
$ Express/tmp/foo && Cd/tmp/foo
$ NPM Install
$ NPM Start
So let's look at version express-v (This is capital V ) and see the version is 4.9.0
3. establish the basic structure of the website
$ express-t Ejs Microblog
$ cd Microblog && NPM install
After a few seconds, run again
$ debug=microblog./bin/www
So you can see the Basic website of our Express ,
Nodejs installation method under Linux (Debian)