Debian/Ubuntu快速安装Node.js v8.x及其它版本方法

说明:有时候我们运行某个软件需要用到Node.js环境,而系统也没有装,这时候我们需要自己安装了,这里说下快速安装方法。

1、升级系统源和安装需要的软件

apt-get update -y
apt-get install -y build-essential curl

2、安装Node.js最新版本v8.x
Node.js官方GitHub地址:https://github.com/nodesource/distributions

# Ubuntu系统
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

# Debian系统
curl -sL https://deb.nodesource.com/setup_8.x | bash -
apt-get install -y nodejs

3、查看当前Node.js版本

node -v

通过查看,我们可以看到当前Node.js是最新的v8.x版本。



给TA打赏
共{{data.count}}人
人已打赏
cj

LNMP中一些隐藏的安装脚本及目录详解

2019-12-14 12:15:46

cj

Linux VPS性能/网络测试综合脚本

2019-12-15 7:53:34

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索