Linux installation of "Nodejs" Nodejs (RPM)

Source: Internet
Author: User

(a) Compiled files

Simply said that after decompression, in the Bin folder already exist node and NPM, if you go into the corresponding file in the execution of the command line a bit of a problem is not, but not the overall, so set this as the global good.

./node-v

This will be completed, the node folder where the specific, what is the name of whatever you decide. Then set the global:

ln -s /xxxx/node-v0.10.33-linux-x64/bin/node /usr/local/bin/node ln -s /xxxx/node-v0.10.33-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.

(ii) compiling by source code

This way you download the file is source code, I don't like this way very much ... It's mainly trouble.

#  tar xvf node-v0.10.33.tar.gz  #  cd node-v0.10.33 #  ./configure  # make  # make install  # cp /usr/local/bin/node /usr/sbin/  查看当前安装的Node的版本  # node -v  v0.10.33

(c) Apt-get

There is also a shell hint of the apt-get way, I was this way before the pit ... Strongly not recommended.

sudo apt-get install nodejs sudo apt-get install npmwhen you're done, you'll find that the node command works, and the Nodejs command can be used ...

Linux installation of "Nodejs" Nodejs (RPM)

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.