简体   繁体   English

如何在QNAP(NAS)上安装node.js,nvm,npm

[英]How to install node.js, nvm, npm on QNAP (NAS)

in QNAP APP center has node.js 4.x and 0.8.X version 在QNAP APP中心的node.js 4.x和0.8.X版本

However, these two versions are too old, I hope we can install a newer version. 但是,这两个版本过旧,希望我们可以安装较新的版本。

I try to login linux system installed through the command 我尝试通过命令登录安装的linux系统

https://www.ostechnix.com/install-node-js-linux/ https://www.ostechnix.com/install-node-js-linux/

nas seems to have removed some of the command, I checked it is Ubuntu but no apt-get , I can not install node.js through these comman nas似乎已经删除了一些命令,我​​检查了它是Ubuntu但没有apt-get ,我无法通过这些comman安装node.js

cat   /proc/version

Linux version 3.4.6 (root@BuildServer36) (gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)) #1 SMP Thu Oct 26 11:01:49 CST 2017

like this 像这样

sudo apt-get install nodejs npm
-sh: sudo: command not found

apt-get install nodejs npm
apt-get: command not found

I have not tried to install the mongodb should have a similar problem 我没有尝试安装mongodb应该有类似的问题

My nas model is TS-439 Pro ii 我的NAS型号是TS-439 Pro II

Or just go to qnapclub.eu a repository of “unofficial apps” - download it and install through the GUI in app center... 或只是转到“非官方应用程序”存储库qnapclub.eu-下载它并通过应用程序中心中的GUI安装...

You have to select accept third party apps and you should be good to go.. 您必须选择接受第三方应用程序,并且应该可以使用。

I was straggling with the same issue on mine QNAP. 我在QNAP上遇到了同样的问题。

I found this tutorial: https://techblog.dorogin.com/running-nodejs-app-on-qnap-nas-via-pm2-3bdb838524e4 written by Sergei Dorogin. 我找到了本教程:Sergei Dorogin编写的https://techblog.dorogin.com/running-nodejs-app-on-qnap-nas-via-pm2-3bdb838524e4

Highly recommend you to install pm2 which is production manager for node.js https://github.com/Unitech/pm2 强烈建议您安装pm2 ,它是node.js的生产经理https://github.com/Unitech/pm2

It took me around 3hours to set up everything, because I'm not good with Linux 我花了大约3个小时才完成所有设置,因为我对Linux不太满意

I haven't played with this yet, but it seems like using Container Station to install an official Node.js Docker image is the way to go. 我还没有玩过,但是似乎要使用Container Station安装官方的Node.js Docker映像。 This gives you a complete preconfigured Linux environment to run Node in. 这为您提供了一个完整的预配置Linux环境以在其中运行Node。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM