简体   繁体   English

如何在openVZ服务器中安装node.js及其依赖项

[英]How to install node.js and its dependency in openVZ server

I am new to openVZ and I want to install node.js and all its dependencies on openVZ server. 我是openVZ的新手,我想在openVZ服务器上安装node.js及其所有依赖项。
Suggestion is much appreciated, thank you. 建议非常感谢,谢谢。

To install nodejs on either OpenVZ server or OpenVZ container you would want to use whichever package manager that is provided with your distribution. 要在OpenVZ服务器或OpenVZ容器上安装nodejs,您将要使用发行版随附的任何软件包管理器。 The two most popular OpenVZ server distributions are CentOS (yum/rpm) and Debian (aptitude/apt-get/dpkg). 两种最受欢迎​​的OpenVZ服务器发行版是CentOS(yum / rpm)和Debian(aptitude / apt-get / dpkg)。 If you are using an OpenVZ container, there are many more possibilities but chances are it is a distribution that supports either yum or apt. 如果您使用的是OpenVZ容器,则还有更多可能性,但有可能它是支持yum或apt的发行版。

For CentOS 7 (YUM/RPM) you first need to install the extra packages repository: 对于CentOS 7(YUM / RPM),您首先需要安装额外的软件包存储库:

yum install epel-release

Then you should be able to install nodejs: 然后,您应该能够安装nodejs:

yum install nodejs

For Debian Jessie (and also Ubuntu 16.04) it appears to be in the stable repositories so you can just install it: 对于Debian Jessie(以及Ubuntu 16.04),它似乎位于稳定的存储库中,因此您可以安装它:

aptitude update
aptitude install nodejs

EDIT: I just noticed a minimal Ubuntu did not have aptitude installed. 编辑:我只是注意到最小的Ubuntu没有安装aptitude。 Instructions for apt-get: apt-get的说明:

apt-get update
apt-get install nodejs

If that does not answer your question, please supply more information such as which distribution you are using and what version of nodejs you need to install so others will be able to assist you better. 如果那不能解决您的问题,请提供更多信息,例如您正在使用哪个发行版以及需要安装哪个版本的nodejs,以便其他人可以更好地为您提供帮助。

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

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