How to install NodeJS, Bower and Gulp on Debian 8
What is NodeJS?
Node.js is an open-source, cross-platform runtime environment for developing server-side web applications. It uses an event-driven, non-blocking I/O model designed to optimize an application’s throughput and scalability for real-time web applications.
What is Bower?
Bower is a package management system for managing web frameworks, libraries, utilities, assets etc. It is a must-have tool for any web-developer out there.
What is Gulp?
Gulp is a streaming build system which is very fast, simple and efficient. It utilizes the power of node’s streams, so you get fast builds that don’t write intermediary files to disk. Gulp lets you automate tasks such as:
- Bundling and minifying libraries and stylesheets.
- Refreshing your browser when you save a file.
- Quickly running unit tests
- Running code analysis
- Less/Sass to CSS compilation
- Copying modified files to an output directory
We will be using our SSD 1 Linux VPS Hosting plan for this tutorial.
Login to your server via SSH
# ssh [email protected]_ip
You can check whether you have the proper version of Debian installed on your server with the below command:
# lsb_release -a
Which should give you the underneath output:
Distributor ID: Debian Description: Debian GNU/Linux 8.2 (jessie) Release: 8.2 Codename: jessie
UPDATE THE SYSTEM
Make sure your server is fully up to date.
# apt-get update && apt-get upgrade
The Node.js v4.x repository is located at https://deb.nodesource.com/node_4.x. However, we recommend you to use the setup script to activate it which will also ensure that your system is both compatible and set up properly, including installing the NodeSource GPG key. Enter the below command:
# curl -sL https://deb.nodesource.com/setup_4.x | sudo bash -
Then, install Node.js with:
# apt-get install --yes nodejs
If you want to compile and install native addons from npm you may also need to install build tools. Therefore, issue the following:
# apt-get install -y build-essential
You can check the installed Node.js version with:
# node -v
which should give you the following output:
Bower can be installed via the NodeJS package manager known as npm. To install Bower globally on your server run the underneath the command:
# npm install bower -g
Check Bower’s version:
# bower -v
Gulp can also be installed using npm. You can use the same command that you used for Bower, in the process changing bower with gulp of course:
# npm install gulp -g
# gulp -v
That’s it. You have successfully installed NodeJS, Bower and Gulp on your Debian 8 VPS. Next, you may want to check their official documentation to get more familiar with these great tools. For more information please check the below links:
Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install NodeJS, Bower and Gulp for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.