Magento Expert Forum - Improve your Magento experience

Results 1 to 6 of 6

How to install Nodejs on Ubuntu/CentOs by Full instruction?

  1. #1
    Administrator david's Avatar
    Join Date
    Nov 2012
    Posts
    261
    Thanks
    22
    Thanked 42 Times in 34 Posts

    Default How to install Nodejs on Ubuntu/CentOs by Full instruction?

    The first question is what node help for magento? And the answer is it doesn't help anything for magento, it 's just a platform/compiler what we need for some server tools. Sometimes you want to open a port and listen and return a very quick data then nodejs is the best way to do.

    Let 's focus to the main part of the article for how to install nodejs.

    Installing Node.js via package manager



    The packages on this page are maintained and supported by their respective packagers, not the node.js core team. Please report any issues you encounter to the package maintainer. If it turns out your issue is a bug in node.js itself, the maintainer will report the issue upstream.


    Gentoo



    Node.js is available in the portage tree.




    Code:
    # emerge nodejs


    Debian, LMDE



    Node.js is available in official repo for Debian Sid(unstable).


    For Debian Wheezy, you have two options:


    Build from source



    Code:
    sudo apt-get install python g++ make checkinstall
    mkdir ~/src && cd $_
    wget -N http://nodejs.org/dist/node-latest.tar.gz
    tar xzvf node-latest.tar.gz && cd node-v 
    ./configure
    checkinstall -y --install=no --pkgversion 0.10.24 # Replace with current version number.
    sudo dpkg -i node_

    Uninstall





    Code:
    sudo dpkg -r node


    Backports



    Alternatively, you can install nodejs from wheezy-backports. If you rely on having node as an executable, install nodejs-legacy as well.


    If you need npm as well, you can get it through the installer




    Code:
    curl https://npmjs.org/install.sh | sudo sh


    Ubuntu, Mint, elementary OS



    At Least from Ubuntu 12.04, an old version (0.6.x) of Node is in the standard repository. To install, just run:




    Code:
    sudo apt-get install nodejs


    Obtaining a recent version of Node or installing on older Ubuntu and other apt-based distributions may require a few extra steps. Example install:




    Code:
    sudo apt-get update
    sudo apt-get install -y python-software-properties python g++ make
    sudo add-apt-repository -y ppa:chris-lea/node.js
    sudo apt-get update
    sudo apt-get install nodejs
    It installs current stable Node on the current stable Ubuntu. Quantal (12.10) users may need to install the software-properties-commonpackage for the add-apt-repository command to work: sudo apt-get install software-properties-common


    As of Node.js v0.10.0, the nodejs package from Chris Lea's repo includes both npm and nodejs-dev.


    There is a naming conflict with the node package (Amateur Packet Radio Node Program), and the nodejs binary has been renamed fromnode to nodejs. You'll need to symlink /usr/bin/node to /usr/bin/nodejs or you could uninstall the Amateur Packet Radio Node Program to avoid that conflict.


    openSUSE & SLE



    Node.js stable repos list. Also node.js is available in openSUSE:Factory repository.


    Available RPM packages for: openSUSE 11.4, 12.1, Factory and Tumbleweed; SLE 11 (with SP1 and SP2 variations).


    Example install on openSUSE 12.1:




    Code:
    sudo zypper ar http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_12.1/ NodeJSBuildService 
    sudo zypper in nodejs nodejs-devel


    Fedora


    Node.js and npm are available in Fedora 18 and later. Just use your favorite graphical package manager or run this on a terminal to install both npm and node:


    Code:
    sudo yum install npm

    RHEL/CentOS/Scientific Linux 6



    Node.js and npm are available from the Fedora Extra Packages for Enterprise Linux (EPEL) repository. If you haven't already done so, firstenable EPEL.


    To check if you have EPEL, run




    Code:
    yum repolist


    if you don't see epel, download it (At the time of this writing, the last version is 6.8.)




    Code:
    curl -O http://download-i2.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm


    then install it




    Code:
    sudo rpm -ivh epel-release-6-8.noarch.rpm


    And then run the following command to install node and npm:




    Code:
    sudo yum install npm --enablerepo=epel


    Arch Linux



    Node.js is available in the Community Repository.




    Code:
    pacman -S nodejs


    FreeBSD and OpenBSD



    Node.js is available through the ports system.




    Code:
    /usr/ports/www/node


    Development versions are also available using ports




    Code:
    cd /usr/ports/www/node-devel/ && make install clean


    or packages on FreeBSD




    Code:
    pkg_add -r node-devel


    Using pkg-ng on FreeBSD




    Code:
    pkg install node


    or the development versions




    Code:
    pkg install node-devel


    OSX



    Using a package




    Simply download Macintosh Installer.




    Using homebrew:




    Code:
    brew install node


    Using macports:




    Code:
    port install nodejs


    Windows



    Using a package




    Simply download Windows Installer.




    Using chocolatey to install Node:




    Code:
    cinst nodejs


    or for full install with NPM:




    Code:
    cinst nodejs.install


    Using Scoop to install Node:




    Code:
    scoop install nodejs
    Source: github.com

    View more threads in the same category:


  2. #2
    Junior Member
    Join Date
    Aug 2018
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks a lot mate, i just started with web development and i was looking for a solution where i can install Nodejs on an Nginx server. Finally, i got the answer i was looking for. Just one more thing, can you tell me how exactly can i make Nodejs work with caching?



    --------------------------------------------------------------------
    https://www.netguru.co/services/react-js

  3. #3
    Expert
    Join Date
    Apr 2017
    Location
    Ahmedabad, India
    Posts
    318
    Thanks
    3
    Thanked 3 Times in 2 Posts

    Default

    your posts help to all beginners

  4. #4
    Junior Member
    Join Date
    Sep 2018
    Location
    United Kingdom
    Posts
    228
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

    To introduce explicit nodejs variant, Visit our instructional exercise Install Specific Nodejs Version with NVM.

    Stage 1 – Add Node.js PPA. Node.js bundle is accessible in LTS discharge and the present discharge.

    Stage 2 – Install Node.js on Ubuntu.

    Stage 3 – Check Node.js and NPM Version.

    Stage 4 – Create Demo Web Server (Optional)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •