Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to build Node.js environment for CVM

Shulou Source: shulou.com Published: 2022-06-01 10:29:12 10月13日 Update

This article focuses on "how to build a Node.js environment on a cloud server". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to build a Node.js environment on a cloud server.

Install Node.js

First, connect to the CVM in putty

Then, download Node.js to the server using the command line and demonstrate it in version 10.6.0, using wget https://npm.taobao.org/

Mirrors/node/v10.6.0/node-v10.6.0-l

Download the Node.js installation package by inux-x64.tar.xz

The third step is to extract the installation package, which can be extracted using the name of tar-xvf + Node.js package. Type tar-xvf node-v10.6.0-linux-x64.tar.xz here to start decompressing the package.

The default entry to the CVM is in the root folder. After the decompression is successful, we can move the installation package to another folder, and then we need to take the final step: set up a soft connection.

To set up a soft connection on the linux system, you only need one command: ln-s Node.js

Installation folder / bin/node / usr/sbin/node

For example, if I install Node.js in the usr/local folder, the command to set the soft connection is: ln-s usr/local/node-v10.6.0-linux-x64/bin/node / usr/sbin/node, you can set the Node.js soft connection.

After setting up the node soft connection, we also need to set the npm soft connection. Similarly, the command to set the npm soft connection is: ln-s usr/local/node-v10.6.0-linux-x64/bin/npm / usr/sbin/npm.

After setting up the soft connection, we can test whether the soft connection is set up successfully.

At this point, I believe you have a deeper understanding of "how to build a Node.js environment on a cloud server". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Server service command file folder environment success content learning utility deeper host interest name utility practicality that is simple operation method is in Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Shulou Technology vpn macOS OPPO Reno