Installing Nodejs with Yum under CentOS

Source: Internet
Author: User
Tags gz file

Installing Nodejs on the XenServer virtual machine

Try the failed method,

1. For example, unzip the compiled file and use LN to set the global variable, because no bin directory can be used to extract it.

Ln-s/home/kun/mysofltware/node-v0.10.28-linux-x64/bin/node/usr/local/bin/node

Ln-s/HOME/KUN/MYSOFLTWARE/NODE-V0.10.28-LINUX-X64/BIN/NPM/USR/LOCAL/BIN/NPM

Here/home/kun/mysofltware/this path is your own, you will extract node files to where is where

Perhaps there is no download for the. tar.xz file for the reason of the. tar.gz file you can try another method on the web to decompress and modify the ETC variable

TAR-XVF NODE-V4.5.0-LINUX-X64.TAR.XZ

then enter Vi/etc/profile

Add (Set environment variable) on last line

Export node_home=/mnt/software/node-v4.5.0-linux-x64
Export path= $PATH: $NODE _home/bin
Export Node_path= $NODE _home/lib/node_modules

Enter Source/etc/profile to make the settings effective

2. Compile the source code, gcc-g++ always upgrade failed

Last Successful method Yum install

Reference articles

https://nodejs.org/en/download/package-manager/#void-linux

If you install the standard version

| bash -

If you install the latest version

| bash -

使用root用户 命令
Yum Install-y Nodejs

下载安装包 

Automatic installation after download is complete

 

Installing Nodejs with Yum under CentOS

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.