Home  >  Article  >  Web Front-end  >  How to install nodejs and upgrade under ubuntu_node.js

How to install nodejs and upgrade under ubuntu_node.js

WBOY
WBOYOriginal
2016-05-16 16:00:152030browse

Because I recently planned to study nodejs, I found that there is no suitable installation and update tutorial for nodejs on the Internet

First execute under the command line of ubuntu:

apt-get install nodejs

Then we need to install npm, which is the version management tool for nodejs:

apt-get install nodejs

Then we can use node -v to check the version. If we find that the version is very low (as of the completion of this blog post, it is v0.12.2), go to the official website https://nodejs.org/download/ , download the Linux Binaries (.tar.gz) version of the compressed package from this page.

Then use administrator rights to replace the contents here to the default installation directory of apt-get.

Such as in the usr folder.

Execute node -v again and you will find that the version has been updated.

The above is all the content shared with you in this article. I hope you will like it.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn