Created
January 15, 2019 09:58
-
-
Save BahiHussein/ffc52c15b3c1d1338d0a7a55c9f9bab9 to your computer and use it in GitHub Desktop.
install nodejs on Debian 9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With Sudo | |
$ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - | |
Without Sudo | |
$ cd Downloads | |
$ curl -sL https://deb.nodesource.com/setup_10.x > setup_10.x | |
$ chmod +x setup_10.x | |
# ./setup_10.x | |
Install NodeJS | |
So, now that you have the repository set up, you can install NodeJS normally through `apt`. | |
# apt install nodejs | |
Test NodeJS | |
Make sure that Node is installed and working properly. You can check that it's there with the `-v` flag. | |
$ node -v | |
Install With NPM | |
Before you get started with NPM, install some development packages so NPM won't have a problem when it encounters a source package. | |
# apt install build-essential libssl-dev | |
Now, you can install anything that's available in the NPM repositories. NPM is a NodeJS package manager, but it also handles loads of other JavaScript packages. Think of it like the JavaScript version of `pip` or Ruby gems. Try installing the Express. It's easily the most widely used NodeJS framwork, and it's a good place to start with Node. | |
$ npm install express | |
Like any package manager, NPM will pull in Express along with all of its dependencies. | |
source https://linuxconfig.org/how-to-install-nodejs-on-debian-9-stretch-linux |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment