Since we mainly use the front-end and Node backend, we deploy Node first. There are two ways to install Node: yum directly or wGET.

Yum install nodejs-y yum install nodejs-y I found it very slow, may be the package source did not switch to domestic.

I used wGET. Wget is a bit like axios in code, which can be used to request a web page or download a file. First, install wGET

yum install -y wget
Copy the code

Switch the directory to ~

cd ~
Copy the code

Download nodeJS, the address can be found in F12 through the A tag

Wget HTTP: / / https://npm.taobao.org/mirrors/node/v14.16.0/node-v14.16.0-linux-x64.tar.xzCopy the code

Unzip the package

Xz - d node - v14.16.0 - Linux - x64. Tar. XzCopy the code

You can go through each step, ls to see the current directory

The tar xf - node - v9.3.0 - Linux - x64. TarCopy the code

Create soft links, similar to shortcuts in Windows

Ln -s ~/node-v9.3.0- Linux -x64/bin/node /usr/bin/node ln -s ~/node-v9.3.0- Linux -x64/bin/npm /usr/bin/npm ln -s ~ / node - v9.3.0 - Linux - x64 / bin/NPX/usr/bin/NPXCopy the code

test

node -v
npm -v
npx -v
Copy the code

See someone said to set the environment variable, anyway, I did it is successful. Oh, it’s too deep.

My rule is to run first and optimize later. The downloaded compressed package can be deleted when used up

The rm node - v14.16.0 - Linux - arm64. Tar. Gz - f lsCopy the code