在 Plesk Onyx 中安装其他节点版本 [英] Install additional node versions in Plesk Onyx

查看:71
本文介绍了在 Plesk Onyx 中安装其他节点版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个指南,不是要解决的问题,可以帮助那些和我有同样问题的人

在 Plesk Onyx 中启用节点支持:

Enable Node support in Plesk Onyx:

  1. 只需安装节点支持"从您的更新和更新"Plesk 界面.
  2. 转到您的节点扩展"页面启用/禁用您需要的节点版本
  1. Install the "Node support" simply from your "update and updates" Plesk interface.
  2. Go to your "Node extension" page enable/disable the node versions you need

如果您需要默认节点支持安装中未附带的其他节点版本:

In case you need additional node versions which does not come with the default node support installation:

  1. 安装Node V版本Manager 在您的服务器上
  2. 安装您需要的版本,例如nvm install v4.8.4
  3. 将节点版本复制粘贴到plesk cp -R ~/.nvm/versions/node/v4.8.4//opt/plesk/node/
  4. 然后通知您的 plesk 关于您的安装 plesk sbin nodemng register/opt/plesk/node/v4.8.4/bin/node
  5. 转到列出所有节点版本的节点扩展页面,点击刷新并瞧
  1. Install the Node Version Manager on your server
  2. Install the versions you need e.g. nvm install v4.8.4
  3. Copy paste the node version to plesk cp -R ~/.nvm/versions/node/v4.8.4/ /opt/plesk/node/
  4. Then notify your plesk about your installation plesk sbin nodemng register /opt/plesk/node/v4.8.4/bin/node
  5. Go to your node extension page where all node versions are listed, hit refresh and voilá

我在将其他节点版本安装到 Plesk 中以在我的服务器上运行我的meteorJS 应用程序而不是他们的托管服务时遇到了一些麻烦.

I had some troubles installing additional node versions into Plesk to run my meteorJS app on my server instead of their hosting service.

推荐答案

感谢提问 :)有些人在使用这种方法时,遇到了这个问题:

Thanks for the question :) As some people were using this method, they ran into this problem:

/opt/plesk/node/v12.13.1/bin/npm install
/usr/bin/env: 'node': No such file or directory

NPM 脚本通过请求 env 来寻找默认节点位置.NPM 文件的 plesk 版本稍作修改以指向正确的节点版本.

The NPM script is looking for the default node location by asking it to env. The plesk-version of the NPM files are slightly modified to point to the correct node version.

要解决此问题,请对 npm 文件进行小幅

To fix this, make a small edit to the npm file:

  • 在第 3 步之后,编辑 /opt/plesk/node/[your_version]/bin/npm 文件.
  • 将第一行替换为 #!/opt/plesk/node/[your_version]/bin/node

这篇关于在 Plesk Onyx 中安装其他节点版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆