Node.js 如何在RHEL 7.5服务器上安装NodeJS

Node.js 如何在RHEL 7.5服务器上安装NodeJS,node.js,linux,centos,yum,rhel,Node.js,Linux,Centos,Yum,Rhel,如何在RHEL服务器7.5上安装NodeJS 我拥有root权限,并首先尝试: curl -sL https://rpm.nodesource.com/setup_8.x | bash - 然后: 出现错误: Loaded plugins: amazon-id, product-id, rhui-lb, search-disabled-repos, subscription-manager This system is not registered with an entitlement se

如何在RHEL服务器7.5上安装NodeJS

我拥有root权限,并首先尝试:

curl -sL https://rpm.nodesource.com/setup_8.x | bash -
然后:

出现错误:

Loaded plugins: amazon-id, product-id, rhui-lb, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
https://rpm.nodesource.com/pub_8.x/el/7/x86_64/repodata/repomd.xml: [Errno 14] curl#22 - "The requested URL returned error: 407"
Trying other mirror.
No package nodejs available.
Error: Nothing to do
建议在RHEL/CentOS服务器上安装NodeJS的方法是什么?如何解决上述问题


谢谢。

您是否尝试过编辑/etc/yum/pluginoff.d/subscription-manager.conf并将enabled设置为0:enabled=0刚刚尝试过:
cat/etc/yum/pluginoff.d/subscription-manager.conf[main]enabled=0
然后再次尝试了yum:
yum安装-y nodejs加载的插件:amazon id、产品id、rhui-lb、,搜索禁用的回购协议https://rpm.nodesource.com/pub_8.x/el/7/x86_64/repodata/repomd.xml: [Errno 14]curl#22-“请求的URL返回错误:407”正在尝试其他镜像。没有可用的包节点。错误:无事可做
您是否在代理之后?错误407通常是一个代理问题,我会使用yum检查您的代理配置,看看这是否是一个问题。您可以执行
cat/etc/yum.conf
并查看您的代理信息是否设置在那里,如果没有设置,您可以通过将以下行放在那里进行设置:
proxy=http://:proxy\u username=proxy\u password=
确保它们位于
[main]中
部分。在
/etc/yum.conf
中似乎设置了
http
代理。我是否也应该设置
https
?例如,我可以安装nano,但不能安装nodejs。我们可以尝试设置https!我会尝试导出https\u代理=https://user:password@serverproxy:端口,并查看是否有效。
Loaded plugins: amazon-id, product-id, rhui-lb, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
https://rpm.nodesource.com/pub_8.x/el/7/x86_64/repodata/repomd.xml: [Errno 14] curl#22 - "The requested URL returned error: 407"
Trying other mirror.
No package nodejs available.
Error: Nothing to do