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

Aus MattWiki
Keine Bearbeitungszusammenfassung
 
Zeile 42: Zeile 42:


https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages
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
https://github.com/nodesource/distributions/blob/master/README.md




[[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