User Tools

Site Tools


ubuntu:install_node.js

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ubuntu:install_node.js [2021/01/25 10:40] peterubuntu:install_node.js [2021/01/25 10:47] (current) peter
Line 3: Line 3:
 [[Ubuntu:Install node.js:Install from Source|Install from Source]] [[Ubuntu:Install node.js:Install from Source|Install from Source]]
  
 +----
 +
 +===== Update your system =====
 +
 +<code bash>
 +sudo apt-get update
 +sudo apt-get install git-core curl build-essential openssl libssl-dev python
 +</code>
 +
 +----
 +
 +===== Install Node.js =====
 +
 +==== Clone the Node.js repository: ====
 +
 +<code bash>
 +git clone https://github.com/nodejs/node.git
 +cd node
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  If you require a specific version of Node:
 +
 +<code bash>
 +git tag # Gives you a list of released versions
 +git checkout v13.10.1
 +</code>
 +
 +</WRAP>
 +
 +
 +==== Compile and install Node ====
 +
 +<code bash>
 +./configure
 +make
 +sudo make install
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  This might take a while, depending on your hardware.
 +</WRAP>
 +
 +
 +==== Check if node was installed correctly ====
 +
 +<code bash>
 +node -v
 +</code>
 +
 +----
 +
 +===== Install NPM =====
 +
 +<code bash>
 +curl -L https://npmjs.org/install.sh | sudo sh
 +</code>
 +
 +<WRAP important>
 +**WARNING:**  Running a script directly from the web can be dangerous, as it may contains trojans.
 +
 +Instead, you may want to download the script, and then review the contents before actually installing it.
 +
 +</WRAP>
 +
 +----
 +
 +==== Test ====
 +
 +<code bash>
 +npm -v
 +
 +</code>
  
ubuntu/install_node.js.1611571250.txt.gz · Last modified: 2021/01/25 10:40 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki