Last update at :2024-03-19,Edit by888u
Sometimes some frameworks have requirements for the version of Node.js. For example, the highest version of Node needs to be installed on the VPS host. This article shares how to install a specified version of Node.js from NodeSource. Naturally, you can also install the latest version of Node. js, supports CentOS/Ubuntu/Debian systems.
1. Get the latest Node.js version
Node.js official website: https://nodejs.org
Node.js official website has the latest Node version released, including LTS version and the latest version:
NodeSource will share the source corresponding to each major version number. For example, the source of Node 14 is https://deb.nodesource.com/setup_14.x.
The following uses Node 14 as an example to introduce how to install the latest version of Node.js and npm on CentOS/Ubuntu/Debain.
2. Install the latest version of Node.js on CentOS
1. Install the corresponding Node.js source
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -2. Install nodejs
sudo yum install -y nodejs3. Install the latest version of Node.js on Ubuntu/Debian
1. Install the corresponding Node.js source
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -2. Install nodejs
sudo apt-get install -y nodejs4. Check Node.js and npm versions
Finally, you can check the versions of Node.js and npm through the following commands:
node -v npm -vRecommended site search: ip proxy server, what is needed for website registration, virtual host, server space rental, .cn domain name registration, telecom host rental, domain name registration center, com domain name registration 1 yuan, mainland China proxy ip, large bandwidth server Rent,
发表评论