ubuntu 安装node

安装node

由于项目使用node 16.x开发,因此在Jenkins上,安装node 16.x

使用curl下载NodeSource的安装脚本:

curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -

安装Node.js:

sudo apt-get install -y nodejs

验证Node.js是否正确安装:

node --version

安装yarn

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -

添加yarn的仓库到你的系统:

echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list

更新你的包管理器:

apt update

安装yarn:

apt install -y yarn

确认安装成功并检查版本:

yarn --version

相关推荐
Christal_pyy3 小时前
树莓派4基于Debian GNU/Linux 12 (Bookworm)添加多个静态ipv4网络
linux·网络·debian
csbDD4 小时前
2025年网络安全(黑客技术)三个月自学手册
linux·网络·python·安全·web安全
李狗蛋儿啊4 小时前
zero自动化框架搭建---Git安装详解
运维·git·自动化
小金的学习笔记5 小时前
如何在本地和服务器新建mysql用户和密码
运维·服务器·mysql
s_fox_5 小时前
nginx ngx_http_module(7) 指令详解
运维·nginx·http
EasyNVR5 小时前
EasyRTC智能硬件:实时畅联、沉浸互动、消音护航
运维·服务器·网络·安全·音视频·webrtc·p2p
CarryBest6 小时前
Jenkins 环境搭建---基于 Docker
运维·jenkins
若云止水6 小时前
Ubuntu 下 nginx-1.24.0 源码分析 - ngx_process_options
运维·nginx
s_fox_6 小时前
nginx ngx_http_module(9) 指令详解
运维·nginx·http
风口上的猪20156 小时前
thingboard告警信息格式美化
java·服务器·前端