Node.js 24 : Install2026/04/21 |
|
Install Node.js 24. |
|
| [1] | Confirm the current enabled version of Node.js and Install version 24. |
|
[root@dlp ~]# dnf module list nodejs CentOS Stream 9 - AppStream Name Stream Profiles Summary nodejs 18 common [d], development, minimal, s2i Javascript runtime nodejs 20 common [d], development, minimal, s2i Javascript runtime nodejs 22 common [d], development, minimal, s2i Javascript runtime nodejs 24 common [d], development, minimal, s2i Javascript runtime Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled # if other versions are enabled, reset once and switch to the version [root@dlp ~]# dnf module -y reset nodejs [root@dlp ~]# dnf module -y enable nodejs:24
# specify Node.js 24 and install [root@dlp ~]# dnf module -y install nodejs:24/common Dependencies resolved. ========================================================================================== Package Arch Version Repo Size ========================================================================================== Installing group/module packages: nodejs x86_64 1:24.13.0-1.module_el9+1312+8f77b0ff appstream 66 k npm noarch 1:11.6.2-1.24.13.0.1.module_el9+1312+8f77b0ff appstream 2.5 M Installing dependencies: nodejs-libs x86_64 1:24.13.0-1.module_el9+1312+8f77b0ff appstream 18 M Installing weak dependencies: nodejs-docs noarch 1:24.13.0-1.module_el9+1312+8f77b0ff appstream 4.9 M nodejs-full-i18n x86_64 1:24.13.0-1.module_el9+1312+8f77b0ff appstream 8.6 M Installing module profiles: nodejs/common Transaction Summary ========================================================================================== Install 5 Packages ..... .....[root@dlp ~]# node -v v24.13.0 # verify to create test script
[root@dlp ~]# cat > nodejs_test.js <<'EOF'
var http = require('http');
var server = http.createServer(function(req, res) {
res.write("Hello, This is the Node.js Simple Web Server!\n");
res.end();
}).listen(8080);
EOF
[root@dlp ~]#
node nodejs_test.js & [1] 1563
[root@dlp ~]#
[root@dlp ~]# curl localhost:8080 Hello, This is the Node.js Simple Web Server! kill 1563 |
| Sponsored Link |
|
|