rpm --import  https://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL

cat << EOF >/etc/yum.repos.d/nodesource.repo
[nodesource]
name=Node.js Packages for Enterprise Linux 7 - \$basearch
baseurl=https://rpm.nodesource.com/pub_14.x/el/7/\$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL

[nodesource-source]
name=Node.js for Enterprise Linux 7 - \$basearch - Source
baseurl=https://rpm.nodesource.com/pub_14.x/el/7/SRPMS
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
gpgcheck=1
EOF

yum install nodejs nodejs-devel nodejs-docs
最后修改:2021 年 10 月 05 日 01 : 53 AM