In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to install Nodejs in Linux, for this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
First of all, go to the official website to download the code, here we must pay attention to the installation of two kinds, one is the Source Code source code, the other is the compiled file. I just operate the compiled files in accordance with the installation of the online source code, resulting in a pit for a long time.
Pay attention to what files you download! The corresponding installation methods are different.
(1) compiled documents
To put it simply, after decompression, node and npm already exist in the bin folder. If you enter the corresponding file and execute the command line, there is no problem at all, but it is not global, so set this to global.
Cd node-v0.10.28-linux-x64/bin
Ls
. / node-v
This is all right. You can choose the name of the node folder exactly where you want to put it. Then set the global:
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
You put this path here / home/kun/mysofltware/ on your own, and you unzip the node file wherever you go.
(2) compiling through source code
The file you download in this way is Source code, which is more troublesome.
# tar xvf node-v0.10.28.tar.gz
# cd node-v0.10.28
# . / configure
# make
# make install
# cp / usr/local/bin/node / usr/sbin/
View the currently installed version of Node
# node-v
V0.10.28
(3) apt-get
Another is the apt-get method of shell prompt, which is not highly recommended.
Sudo apt-get install nodejs
Sudo apt-get install npm
This is the answer to the question about how to install Nodejs in Linux. I hope the above content can be of some help to you. If you still have a lot of doubts to solve, you can follow the industry information channel for more related knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.