说明:刚刚在TeleShellBot:通过Telegram机器人远程执行shell命令这个教程里谈到了npm命令,所以就说下。按照官方(www.npmjs.com)的说法,npmNode.js一起存在,这意味着当您下载并安装Node.js时,您会自动在计算机上安装npm。所以这里我们只需要安装Node.js即可。其实之前发过这样的教程,只是没有写Centos系统,所以这里又拿出来说一次,包括Centos系统,目前最新的Node.js版本为10.x这里说下安装方法。

安装

Node.js官方GitHub地址:https://github.com/nodesource/distributions

Ubuntu系统

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs

Debian系统

curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get install -y nodejs

Centos系统

curl -sL https://rpm.nodesource.com/setup_10.x | bash -
yum install nodejs -y

检查Node.jsNPM版本

node -v
npm -v
's

本文链接:https://www.wxiou.cn/archives/328/

最后修改:2018 年 09 月 01 日 11 : 59 PM

【腾讯云】星星海SA2云服务器618钜惠,1核2G 首年95元【点击查看】。


文章: 《Debian/Ubuntu/CentOS安装最新版的Node.js和NPM教程》
联系方式:
文章链接:https://wxiou.cn/index.php/archives/575/
除特别注明外,文章均为Literature原创,转载时请注明本文出处及文章链接
Last modification:April 20th, 2021 at 01:01 pm
如果觉得我的文章对你有用,请随意赞赏