定位 发表于 2023-6-27 19:47:25

Debian/Ubuntu/CentOS安装最新版的Node.js和NPM教程

说明:刚刚在通过Telegram机器人远程执行shell命令这个教程里谈到了npm命令,所以就说下。
按照官方(www.npmjs.com)的说法,npm与Node.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 nodejsDebian系统curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get install -y nodejsCentos系统curl -sL https://rpm.nodesource.com/setup_10.x | bash -
yum install nodejs -y检查Node.js和NPM版本node -v
npm -v
页: [1]
查看完整版本: Debian/Ubuntu/CentOS安装最新版的Node.js和NPM教程