Nodejs installation method under Linux (Debian)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.