Cloud host centos 7 (3.10.0) deploy Node.js

1. useradd user1

2. passwd user1

3. cd /home/user1

4. mkdir software

5. cd ./software

6. yum install gcc gcc-c++

After installation, the gcc version is 4.8.5, and the following upgrades gcc

7. wget https://ftp.gnu.org/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.xz

8. tar xvJf ./gcc-7.3.0.tar.gz

9. cd ./gcc-7.3.0

10. ./contrib/download_prerequisites (download the necessary libraries)

11. mkdir gcc_build_7.3.0

12. cd ./gcc_build_7.3.0

13.  ../configure --enable-checking=release --enable-languages=c,c++ --disable-multilib

14. make

It takes a long time, so be patient. . .

15. make install

16. reboot

After reboot, re-login remotely

17. gcc -v

The version prompt 7.3 indicates that the installation was successful

18. Redirect soft links under /usr/lib64: 

rm -f /usr/lib64/libstdc++.so.6

 ln -s /usr/local/lib64/libstdc++.so.6.0.24 /usr/lib64/libstdc++.so.6

rm -f /lib64/libstdc++.so.6

 ln -s /usr/local/lib64/libstdc++.so.6.0.24 /lib64/libstdc++.so.6

 

Install Node.js below

19. cd /home/user1/software

20. wget https://npm.taobao.org/mirrors/node/latest-v8.x/node-v8.11.1.tar.xz

21. tar xvJf ./node-v8.11.1.tar.xz

22. cd node-v8.11.1

23. ./configure

24. make

此时用时很长,耐心等待。。。

25. make install

26. node -v

出现v8.11.1说明安装Node成功。

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325339713&siteId=291194637