Compile and install nodejs and yum in Centos8

Introduction:

Node.js is a JavaScript runtime environment based on Chrome V8 engine. Official website address https://nodejs.org/en/
Its advantage lies in the use of an event-driven, non-blocking I/O model, asynchronous programming, making it lightweight and efficient.
Of course, the shortcomings are also obvious. Single-process, single-threaded, only supports single-core cpu, and cannot make full use of multi-core cpu servers.

The installation environment of this tutorial is
1、 Centos8 x86 minimal installation system-virtual machine, 8-core 16G memory 500G storage

Let's start the formal installation:

The first way is to compile and install###

1、 Install node.js environment
Visit the official website to get the source code package of linux x64 https://nodejs.org/en/download/

cd /opt/
wget https://nodejs.org/dist/v12.16.1/node-v12.16.1-linux-x64.tar.xz
xz -d node-v12.16.1-linux-x64.tar.xz
tar -xf node-v12.16.1-linux-x64.tar
echo "export NODE_HOME=/opt/node-v12.16.1-linux-x64">>/etc/profile
echo "export PATH=\$NODE_HOME/bin:$PATH">>/etc/profile
source /etc/profile
rm -rf node-v12.16.1-linux-x64.tar

The second yum installation###

curl -sL https://rpm.nodesource.com/setup_12.x | bash -
yum install nodejs -y

Check version

node -v
npm -v

At this point, the nodejs installation is complete, and let's start using it.

Recommended Posts

Compile and install nodejs and yum in Centos8
CentOS Yum compile and install MySQL 5.6
CentOs7.3 compile and install Nginx 1.9.9
Centos7 compile and install ntp-4.2.8p11
CentOS 6.9 compile and install python
CentOS 6 compile and install python 3
CentOS7 yum install and start mysql
Compile and install LAMP under Centos 5.2
CentOS 6.x compile and install Nginx
CentOS7 compile and install L(A|N)MP environment
CentOS7 yum install and start mysql
Install and configure FreeIPA in Centos7
Linux CentOS6 compile and install Pyt
CentOS install nodejs 8
Compile and install libmodbus library under CentOS7
CentOS7.5 source code compile and install mysql5.7.29
Centos7 compile and install MySQL8 problem record
CentOS7.4 source code compile and install MySQL8.0
Install Docker CE in yum under CentOS 7
Install centos7 and connect
Centos7 YUM install MariaDB 10.0
Install MySQL5.7 in centos7
Nodejs install on centos7
CentOS6.8 install node.js npm
Install Node.js on Centos
CentOS 7.2 Yum install MySQL 5.6
Install redis5.0 in CentOS7
Centos7 YUM install MariaDB 10.0
How to install Node.js and npm on CentOS 8
Install svn and configuration through yum under CentOS
Centos7.2 compile and install way to build phpMyAdmin
centos7 install python3 and ipython
Know Linux and install CentOS
CentOS 7 install Mono and MonoDevelop
Ubuntu 16.04 compile and install PHP 7.2
CentOS6.5 install Java 8 and Tomcat8
Centos 6.10 reinstall python and yum
Centos6.5 install and configure mongodb
CentOS7 install python3 and pip3
CentOS7 install OracleJDK and JRE
CentOS6.5 install Java 8 and Tomcat8
CentOS6 install and crack Jira 7
Centos compile and install LAMP (apache-2.4.7 + mysql-5.5.35 + php 5.5.8) + Redis
CentOS6.5 install Java 8 and Tomcat8
CentOS6 install and crack confluence
Compile and install Lnmp shell script under Linux centos
CentOS6 install and crack Jira 7
CentOS 7 yum install PHP7.3 tutorial
How to compile and install PHP and Nginx in Ubuntu environment
Detailed steps to install and configure k8s cluster in centos 7
Centos 7 install jdk and package service service
Install and configure keepalived under CentOS 5.9
Install JDK8 in rpm on CentOS7
CentOS 8 install Git and basic configuration
Minimal install JDK 1.8 tutorial in CentOS 7
How to install PHP7.4 in CentOS
Install MySql with Docker in CentOS7
Install Percona Server database (in CentOS 8)
Install and configure Docker in Ubuntu
CentOS7.3 install iptables and detailed use
CentOS quickly install Python3 and pip3