{"id":13311,"date":"2023-10-02T12:26:39","date_gmt":"2023-10-02T16:26:39","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=13311"},"modified":"2023-10-02T12:26:42","modified_gmt":"2023-10-02T16:26:42","slug":"how-to-install-node-js-18-lts-on-centos-7-8-or-fedora-38-34","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/how-to-install-node-js-18-lts-on-centos-7-8-or-fedora-38-34\/","title":{"rendered":"How to Install Node.js 18 LTS on CentOS 7\/8 or Fedora 38-34"},"content":{"rendered":"\n
Node.js is a popular runtime environment for JavaScript applications, widely used for building server-side applications, web applications, and more. Node.js 18, being a Long Term Support (LTS) version, provides stability and long-term support for developers. In this blog post, we’ll guide you through the steps to install Node.js 18 LTS on CentOS 7\/8 or Fedora 38-34.<\/p>\n\n\n\n
Before we get started, ensure that you have the following:<\/p>\n\n\n\n
Now, let’s begin the installation process.<\/p>\n\n\n\n
First, open a terminal and update your system’s package repositories to ensure you have the latest information about available packages:<\/p>\n\n\n\n
For CentOS:<\/p>\n\n\n\n
$ sudo yum update -y<\/code><\/pre>\n\n\n\nFor Fedora:<\/p>\n\n\n\n
$ sudo dnf update -y<\/code><\/pre>\n\n\n\nStep 2: Install Node.js 12 on CentOS 7\/8 or Fedora 38-34<\/h2>\n\n\n\n
Node.js can be installed on CentOS and Fedora using the NodeSource repository, which provides up-to-date Node.js<\/a> versions. Follow these steps to add the NodeSource repository and install Node.js 18 LTS:<\/p>\n\n\n\nFor CentOS 7\/8:<\/h3>\n\n\n\n
1 Install the NodeSource repository by running the following command:<\/p>\n\n\n\n
$ sudo curl -sL https:\/\/rpm.nodesource.com\/setup_18.x | bash -<\/code><\/pre>\n\n\n\n2 After adding the repository, install Node.js 18 with npm (Node Package Manager) using the following command:<\/p>\n\n\n\n
$ sudo yum install -y nodejs<\/code><\/pre>\n\n\n\nFor Fedora 38-34:<\/h3>\n\n\n\n
1 Install the NodeSource repository by running the following command:<\/p>\n\n\n\n
$ sudo dnf install -y https:\/\/rpm.nodesource.com\/pub_12.x\/fc\/nodesource-release-fc38-1.noarch.rpm<\/code><\/pre>\n\n\n\nNote: Replace fc38<\/code> with your specific Fedora version (e.g., fc34<\/code>, fc35<\/code>, etc.).<\/p>\n\n\n\n2 Install Node.js 18 with npm using the following command:<\/p>\n\n\n\n
$ sudo dnf install -y nodejs<\/code><\/pre>\n\n\n\nStep 3: Verify the Installation<\/h2>\n\n\n\n
After Node.js and npm are installed, you can verify the versions by running the following commands:<\/p>\n\n\n\n
$ node -v\n$ npm -v<\/code><\/pre>\n\n\n\nYou should see the Node.js and npm version numbers printed to the terminal.<\/p>\n\n\n\n
Conclusion<\/h2>\n\n\n\n
You have successfully installed Node.js 18 LTS on your CentOS 7\/8 or Fedora 38-34 system. You can now start developing and running JavaScript applications with the latest features and long-term support provided by Node.js 18. If you encounter any issues or need additional information, refer to the official Node.js documentation<\/a> or community resources to help you get the most out of your Node.js environment.<\/p>\n","protected":false},"excerpt":{"rendered":"Node.js is a popular runtime environment for JavaScript applications, widely used for building server-side applications, web applications, and more. Node.js 18, being a Long Term Support (LTS) version, provides stability…<\/p>\n","protected":false},"author":1,"featured_media":13318,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,23,9,16],"tags":[121,1270,328,350,354,404,424,433,449,544,545,591,636,638],"yoast_head":"\n
How to Install Node.js 18 LTS on CentOS 7\/8 or Fedora 38-34<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n\n\n\n\n\n\t\n\t\n\t\n