To install Node.js on AlmaLinux 9, follow these steps:
Step 1 : Update the System
First, update your system packages to ensure everything is up to date:
Step 2 : Download the NodeSource Setup Script
Use curl
to download the setup script for Node.js 23:
Step 3 : Run the Setup Script
Execute the downloaded script to enable the Node.js repository:
Step 4 : Install Node.js
Now, install Node.js and npm using the following command:
Step 5 : Verify Node.js Installation
Check if Node.js is installed correctly by running:
Step 6 : Verify npm Installation
Ensure npm is also installed by checking its version:
Congratulations! You have successfully installed Node.js and npm on AlmaLinux 9.