nodejs installation usually has two ways, many people have used the compiled files to install nodejs when there are a lot of problems, the following small series will introduce you to Linux installation nodejs The three methods that interested friends can come to understand.
First go to the official website to download the code, here must pay attention to the installation of two kinds, one is the Source Code source code, one is the compiled file. I just follow the installation method of the online source code to operate the compiled file, and the result has been pitted for a long time.
Be careful about what files you downloaded! ! ! The corresponding installation method is different.
(a) the compiled file
It simply is unpacked, already node and npm, if you go to the corresponding file execute command lines in the bin folder There is no problem at all, but it is not global, so setting this to global is fine.
cd node-v0.10.28-linux-x64/bin
ls
. /node -v
This is all right, the node folder is placed specifically, what name is what you decide. 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
Here /home/kun/mysofltware/this path is your own, Where do you extract the node file?
(2) Compiled by source code
This way, the file you downloaded 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 current installation Node version
# node -v
v0.10.28
(3) apt-get
There is also a shell prompt apt-get Way, strongly not recommended.
sudo apt-get install nodejs
sudo apt-get install npm
The above is the Linux installation of Nodejs method, three methods can install Nodejs, use the source code Installation is the easiest way, and the latter two are more troublesome, not very recommended.
We all know that the mail command can be used for the regular processing of mail lo
There are a lot of Linux users who use the Firefox browser, and the silent request
In the Linux system, you can freely send mail through the command line. You can use
Raid is divided into software Raid and hardware Raid. Because the hardware Raid is
How to install Guake terminal to Ubuntu system
What should I do if I get an error when compiling PARSEC 2.1 under Ubuntu?
Linux method for building pipe pipeline functions
CentOS sets the three skills of system time
Linux System Using Docker to Develop Django Projects
How to convert UTF8 encoding into GB2312 encoding in Linux
The difference between Linux and Windows systems
How to modify the default timeout time of sudo in Ubuntu system?
Linux system safely delete files skills
Introduction to the syntax and parameters of the Linux system xlsclients command
How Linux uses the kill command to force a process to terminate
Windows environment Apache server stress test
Win10 new preview before push User feedback suggestions are deleted
How to create a home user group using the win10 system
The solution that the mouse can't wake up after vista sleeps
Linux statistical data software WhatPulse User Guide
Microsoft's release of Windows8 makes the Linux desktop operating system a step closer to us.
Win7 open page prompts Antiphishingengine has stopped working how to do
Win8 system uses file history to back up important files.