How to install NodeJS, Bower and Gulp on Debian 8


node.js bowerIn this article we will guide you through the steps of installing NodeJS, Bower and Gulp on a Debian 8 VPS.

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.

Node.js applications are written in JavaScript and can be run within the Node.js runtime on Linux, OS X, Microsoft Windows, FreeBSD, NonStop, IBM AIX, IBM System z and IBM i. Node.js contains a built-in library to allow applications to act as a stand-alone web server.

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

REQUIREMENTS

We will be using our SSD 1 Linux VPS Hosting plan for this tutorial.

Login to your server via SSH

# ssh root@server_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

INSTALL NODEJS

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:

v4.4.7

INSTALL BOWER

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

INSTALL GULP

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’s version:

# 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.

Tutorials
How to install Nginx, PHP5-fpm, MySQL, phpMyAdmin, Postfix on a Ubuntu server using Easy Engine shell script
Tutorials
How to install Nginx and set-up SSL certificate on an Ubuntu 14.04 VPS
Tutorials
Install Mezzanine CMS on a Debian VPS
  • CesarDraw

    CesarDrawCesarDraw

    Author Reply

    ================================================================================
    ================================================================================

    NODE.JS v0.12 DEPRECATION WARNING

    Node.js v0.12 will cease to be actively supported at the end of 2016.

    This means you will not continue to receive security or critical stability
    updates for this version of Node.js beyond that time.

    You should begin migration to a newer version of Node.js as soon as
    possible. Use the installation script that corresponds to the version of
    Node.js you wish to install. e.g.

    * https://deb.nodesource.com/setup_4.x — Node.js v4 LTS “Argon” (recommended)
    * https://deb.nodesource.com/setup_6.x — Node.js v6 Current

    Please see https://github.com/nodejs/LTS/ for details about which version
    may be appropriate for you.

    The NodeSource Node.js Linux distributions GitHub repository contains
    information about which versions of Node.js and which Linux distributions
    are supported and how to use the install scripts.
    https://github.com/nodesource/distributions

    ================================================================================
    ================================================================================


    • admin

      adminadmin

      Author Reply

      Thanks for your feedback. The post has been updated.