简体   繁体   中英

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.
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. The two most popular OpenVZ server distributions are CentOS (yum/rpm) and 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.

For CentOS 7 (YUM/RPM) you first need to install the extra packages repository:

yum install epel-release

Then you should be able to install 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:

aptitude update
aptitude install nodejs

EDIT: I just noticed a minimal Ubuntu did not have aptitude installed. Instructions for 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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