NODEJS installation process under Linux system

Source: Internet
Author: User

Download the appropriate version first. I'm using node v.10.36 here.

The detailed procedures for compiling the installation are described first.

Download this version:

wget http://nodejs.org/dist/v0.10.36/node-v0.10.36-linux-x64.tar.gz

Unzip:

tar XF node-v0. 10.36-linux-x64. tar. gz
#更改目录名称 MV Node-v0. 10.36-linux-x64 nodejs# move to the specified directory mv nodejs/data//data/nodejs/set Soft links LN -s/data/nodejs/bin/node/usr/local/bin/nodeLN -s/data/nodejs/bin/npm/usr/local/bin/ Npm

To view the version of node that is currently installed:

Node-v

By the time this compilation is installed, you will install some third-party libraries:

Install -G node-gyp Async Machina Express express-session ejs body-parser cookie-parser connect-busboy Debug PA Ssport passport-local flags Log4js Morgan MongoDB Redis protobufjs nodejs-websocket CRC Serve-favicon Socket.io

Of course, the installation is optional according to your situation.

The following is a description of how Yum is installed.

#搜索一下系统是否有nodejs Yum Search Nodejs

If there is, you can install, in general, the system comes with a lower version, you can choose Yum.repo Way to install.

Create a new file Epel.repo in the/etc/yum.repos.d/directory (if present, update)

1 [Epel]2Name=extra Packages forEnterprise Linux6-$basearch3Baseurl=http://mirrors.aliyun.com/epel/6/$basearch4http//mirrors.aliyuncs.com/epel/6/$basearch5#mirrorlist =https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch= $basearch6Failovermethod= Priority7Enabled=18gpgcheck=09gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-epel-6Ten   One[epel-Debuginfo] AName=extra Packages forEnterprise Linux6-$basearch-Debug -Baseurl=http://mirrors.aliyun.com/epel/6/$basearch/debug -http//mirrors.aliyuncs.com/epel/6/$basearch/debug the#mirrorlist =https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch= $basearch -Failovermethod= Priority -Enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-epel-6 +gpgcheck=0 -   +[epel-Source] AName=extra Packages forEnterprise Linux6-$basearch-Source atBaseurl=http://Mirrors.aliyun.com/epel/6/srpms -http//Mirrors.aliyuncs.com/epel/6/srpms -#mirrorlist =https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch= $basearch -Failovermethod= Priority -Enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-epel-6 ingpgcheck=0

Save again after Yum

#清理一下: Yum Clean all# and then install Nodejs: Yum Install  -V

NODEJS installation process under Linux system

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.