Installing CentOS7 NodeJS source compilation / v12.16.1 LTS

0. Installation environment (g ++ 6.3.x)

CentOS 7 has gcc version 4.8 installed by default. However, nodejs build environment requires version 6.3 or higher.
Please refer to the following link to install version 6.3.

 
Installing CentOS7 GCC 6.x devtoolset-6
Installing CentOS7 GCC 6.x Installing GCC on CentOS 7 will install version 4.8.5. In some cases, you may need to install a higher version. The following is how to install GCC, G ++ 6.x version. $ sudo yum install ..
lucidmaj7.tistory.com

 

1. Download NodeJS source

Connect to the NodeJS homepage and download the source of the LTS version using the wget command.

 
Download | Node.js
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
nodejs.org

[root@localhost ~]# wget https://nodejs.org/dist/v12.16.1/node-v12.16.1.tar.gz

2. Decompression

Unzip the source compressed file received as tar.gz.
[root@localhost ~]# tar xfz node-v12.16.1.tar.gz
You can see that the node-v12.16.1 folder is created. The contents of the file in the extracted folder are as follows.

3. configure


Run configure in the unzipped folder of nodejs.
[root@localhost node-v12.16.1]# ./configure

4. make

After running configure, run the make command to compile.
# make
Depending on the performance of your computer, it may take a very long time, so wait until it is over.
Compiling.
Build complete

5. make install

When the build is complete, install it in the installation path using the make install command.
# make install

6. Command confirmation

When install is complete, you can run npm and node commands as follows to view version information.

Comments

Popular posts from this blog

Enabling Com Port on Hyper-V 2nd Generation VM / Windbg

DLL Injection using CreateRemoteThread in Windows 10

Using Overlapped I / O in DeviceIoControl