如何在 Plesk 上为 Node.js 管理器添加新的 node.js 版本? [英] How to add a new node.js version for the Node.js Manager on Plesk?
问题描述
Plesk Onyx 支持 Node.js.我的 Node.js 管理器(来自 Plesk 扩展)目前支持两个 nodejs 版本.
Plesk Onyx supports Node.js. My Node.js Manager (from the Plesk extensions) currently supports two nodejs Versions.
用 centos 包管理器 yum 安装新版本并没有改变任何东西.
Installing a new version with the centos package manager yum did not change anything.
复制已安装的版本之一并将它们放入新文件夹,例如4/在 Node.js Manager 使用的目录结构中也没有导致结果.
Copying one of the versions, that are installed and putting them to a new folder e.g. 4/ in the directory structure used by the Node.js Manager also did not lead to results.
我需要适用于 Meteor 1.4.x 应用程序的 Node 4.6.2 版本.
I need the version Node 4.6.2 for Meteor 1.4.x applications.
谢谢.
推荐答案
在 Plesk Onyx 中启用节点支持:
Enable Node support in Plesk Onyx:
- Install the "Node support" simply from your "update and updates" Plesk interface.
- 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:
- 安装 Node Version Manager 在您的服务器上
- 安装您需要的版本,例如
nvm install v4.8.4
- 复制粘贴节点版本到plesk
cp -R ~/.nvm/versions/node/v4.8.4//opt/plesk/node/
- 然后通知您的 plesk 您的安装
plesk sbin nodemng register/opt/plesk/node/v4.8.4/bin/node
- 转到列出所有节点版本的节点扩展页面,点击刷新,瞧
- Install the Node Version Manager on your server
- Install the versions you need e.g.
nvm install v4.8.4
- Copy paste the node version to plesk
cp -R ~/.nvm/versions/node/v4.8.4/ /opt/plesk/node/
- Then notify your plesk about your installation
plesk sbin nodemng register /opt/plesk/node/v4.8.4/bin/node
- Go to your node extension page where all node versions are listed, hit refresh and voilá
如果您在通过 Plesk 安装 NPM 包时遇到问题,请在 SSH shell 中使用您需要的流星专用节点版本进行安装.
If you have troubles installing the NPM packages through Plesk do it within the SSH shell with the dedicated node version you need for meteor.
nvm 使用 4.8.4
cd/bundle/programs/server
npm install
- 进入 Plesk GUI,选择您的域,点击 node.js
- 配置您的应用并运行它
为此打开了一个专用线程以帮助人们找到它.
Opened a dedicated thread for this to help people finding it.
这篇关于如何在 Plesk 上为 Node.js 管理器添加新的 node.js 版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!