在CentOS 8上安装Node.js 10(通过AppStream)
首先
使用Application Stream(AppStream)在CentOS8上安装Node.js 10
参考:RHEL8的软件包构建 – BaseOS和Application Stream – 红帽工程师博客
支持
若采用此方法进行部署,根据《Red Hat Enterprise Linux 8 Application Streams生命周期 – Red Hat客户门户》,可能认为2021年4月即将到期。
之后可能不会执行对于已报告的漏洞和问题的修复。
日志
安裝
# cat /etc/redhat-release
CentOS Linux release 8.1.1911 (Core)
# yum install -y @nodejs:10
... 略
确认的各种方式
# which node
/usr/bin/node
# node -v
v10.16.3
# yum module info nodejs:10
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:01:24 ago on Sat Jan 18 08:05:14 2020.
Name : nodejs
Stream : 10 [d][e][a]
Version : 8000020191007212731
Context : 55190bc5
Architecture : x86_64
Profiles : common [d] [i], development, minimal, s2i
Default profiles : common
Repo : AppStream
Summary : Javascript runtime
Description : Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
Artifacts : nodejs-1:10.16.3-2.module_el8.0.0+186+542b25fc.src
: nodejs-1:10.16.3-2.module_el8.0.0+186+542b25fc.x86_64
: nodejs-debuginfo-1:10.16.3-2.module_el8.0.0+186+542b25fc.x86_64
: nodejs-debugsource-1:10.16.3-2.module_el8.0.0+186+542b25fc.x86_64
: nodejs-devel-1:10.16.3-2.module_el8.0.0+186+542b25fc.x86_64
: nodejs-devel-debuginfo-1:10.16.3-2.module_el8.0.0+186+542b25fc.x86_64
: nodejs-docs-1:10.16.3-2.module_el8.0.0+186+542b25fc.noarch
: nodejs-nodemon-0:1.18.3-1.module_el8.0.0+14+a5a48e73.noarch
: nodejs-nodemon-0:1.18.3-1.module_el8.0.0+14+a5a48e73.src
: nodejs-packaging-0:17-3.module_el8.0.0+186+542b25fc.noarch
: nodejs-packaging-0:17-3.module_el8.0.0+186+542b25fc.src
: npm-1:6.9.0-1.10.16.3.2.module_el8.0.0+186+542b25fc.x86_64
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled, [a]ctive