Node.js installieren (Debian): Unterschied zwischen den Versionen

Aus MattWiki
Keine Bearbeitungszusammenfassung
 
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 2: Zeile 2:


== Node.js 6.1 auf Debian 8.x ==
== Node.js 6.1 auf Debian 8.x ==
=== Download ===
=== Download ===
  # cd /opt
  # cd /opt
  # wget https://nodejs.org/dist/xxx/node-xxx.tar.xz
  # wget https://nodejs.org/dist/xxx/node-xxx.tar.xz
Zeile 8: Zeile 10:


=== Installation ===
=== Installation ===
Zum "Installieren" reicht es einen Link auf die folgenden Programme in einem Pfad zu machen, der ausführbar ist:
Zum "Installieren" reicht es einen Link auf die folgenden Programme in einem Pfad zu machen, der ausführbar ist:
  # cd /usr/local/bin
  # cd /usr/local/bin
Zeile 16: Zeile 19:
Optional (Wird evtl. wegen Make für Anwendungen, die auf Node.js aufbauen) benötigt:
Optional (Wird evtl. wegen Make für Anwendungen, die auf Node.js aufbauen) benötigt:
  apt-get install build-essentials
  apt-get install build-essentials
== Node.js 10 auf Debian 9 ==
Node.js v10.x:
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get install -y nodejs
Optional: install build tools
To compile and install native addons from npm you may also need to install build tools:
# use `sudo` on Ubuntu or run this as root on debian
apt-get install build-essential
Quellen:
https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages
https://github.com/nodesource/distributions/blob/master/README.md




[[Category:Debian]]
[[Category:Linux]]
[[Category:Linux]]

Aktuelle Version vom 28. Dezember 2018, 00:20 Uhr

Anleitung für die Installation von Node.js und npm.

Node.js 6.1 auf Debian 8.x

Download

# cd /opt
# wget https://nodejs.org/dist/xxx/node-xxx.tar.xz
# tar -xvJf node-xxx.tar.xz

Installation

Zum "Installieren" reicht es einen Link auf die folgenden Programme in einem Pfad zu machen, der ausführbar ist:

# cd /usr/local/bin
# ln -s /opt/node-xxx/bin/node ./node
# ln -s /opt/node-xxx/lib/node_modules/npm/bin/npm-cli.js ./npm


Optional (Wird evtl. wegen Make für Anwendungen, die auf Node.js aufbauen) benötigt:

apt-get install build-essentials

Node.js 10 auf Debian 9

Node.js v10.x:

# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get install -y nodejs

Optional: install build tools

To compile and install native addons from npm you may also need to install build tools:

# use `sudo` on Ubuntu or run this as root on debian
apt-get install build-essential

Quellen:

https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages

https://github.com/nodesource/distributions/blob/master/README.md