Install nodejs in ubuntu and how to upgrade it
This article describes how to install nodejs on the ubuntu 12.04 server and how to upgrade nodejs, how to install nodejs on ubuntu, and how to upgrade the instance. For more information, see.
Because I recently planned to study nodejs, I found that there is no installation and update tutorial for nodejs on the Internet.
First, run the following command in the ubuntu command line:
?
Then we need to install npm, which is the version management tool used by nodejs:
?
Next we can look at the version with node-v, if you find that the version is very low (by the end of this blog is v0.12.2), to the official website https://nodejs.org/download/, this page to download Linux Binaries (.tar.gz) version.
Then, use the Administrator permission to replace the above with the default installation directory of apt-get.
For example, in the usr folder.
Run node-v to check that the version has been updated.
The above is all the content shared in this article. I hope you will like it.