Simple
| The code is as follows: |
Copy code |
|
Sudo apt-get update
Sudo apt-get install python-software-properties python g ++ make
Sudo add-apt-repository ppa: chris-lea/node. js
Sudo apt-get update
Sudo apt-get install nodejs |
Quantal (12.10) users need to use the add-apt-repository command to install the software-properties-common package. The command is as follows.
| The code is as follows: |
Copy code |
|
Sudo apt-get install software-properties-common |
If you want to compile Node in C # mode, run the following command to install the nodejs-dev module.
| The code is as follows: |
Copy code |
|
Sudo apt-get install nodejs-dev |
Advantages of this method: simple.
Disadvantages of this method: it is too slow (based on the network speed ).
Introduction to node. js
Node. js is a set of JavaScript toolkit used to write high-performance network servers. A series of changes started from this. Specifically, Node. js assumes that Linux or Mac OS X is running in the POSIX environment. In Windows, MinGW must be installed to obtain a POSIX-like environment. In Node, Http is the first priority. Node is optimized to create an http server, so most examples and libraries on the Internet are concentrated on the web (http Framework, template library, etc ).