Graphical tutorial for installing nodejs in Linux environment
1. Download nodejs from the official website and select the one on the left.
2. Select the file, right-click and click extract here to decompress
3. Enter the bin directory, right-click and select properties, the decompressed file can be placed anywhere in the system. Copy the path in the location
4. Add the path. Enter the .bashrc file and add the path in the location in step three at the end.
6. Enter source .bashrc in the terminal, press Enter, and then output the path: echo $PATH to check whether the path has been added successfully.
#7. Check whether nodejs is successfully installed. Right-click in the js file directory, then click open in terminal, enter the terminal, enter the node file name (the file name was qishuixian.js when I installed it)
consloe.log("1111")
8. Test in the browser: server.js source code:
var http = require('http'); http.createServer(function (request, response) { response.writeHead(200, {'Content-Type':'text/html;charset=utf-8'}); if(request.url!=="/favicon.ico"){ console.log('访问'); response.write('hello,world'); response.end('你好,世界'); } }).listen(8000); console.log('Server running at http://127.0.0.1:8000/');
All of the above This is the graphic tutorial for installing nodejs in the Linux environment introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank you all for your support of the PHP Chinese website!
For more graphic tutorials on nodejs installation in Linux environment, please pay attention to the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

