Cannot be accessed after installing node, front-end deployment and deployment service under linux

linux centos7 64 bit build node environment

Run node -v if an error is reported bash: ./node: cannot execute binary file

It may be that the downloaded node version is wrong, please check whether it is the linux centos7 64-bit version of node

Install node as follows :

(Because it is a test environment, I first cd to the /home/greatwall folder, and then execute the following command)

1、wget  https://nodejs.org/dist/v8.11.1/node-v8.11.1-linux-x64.tar.xz

2、xz -d  node-v8.11.1-linux-x64.tar.xz 

3. ls (execute this command and you will find that the package name is node-v8.11.1-linux-x64.tar)

4、tar -xvf node-v8.11.1-linux-x64.tar

5, cd node-v8.11.1-linux-x64 / bin

6. Execute the pwd command to view the current directory as /home/greatwall/node/node-v8.11.1-linux-x64/bin

7. Execute the following two commands to install soft connection

ln -s /home/greatwall/node/node-v8.11.1-linux-x64/bin/node /usr/sbin/node

ln -s /home/greatwall/node/node-v8.11.1-linux-x64/bin/npm /usr/sbin/npm

(The execution of the above command may be because the folder does not exist, the operation is as follows: a new window needs to be opened)

Guess you like

Origin blog.csdn.net/weixin_47385625/article/details/114036571