syntax.us Let the syntax do the talking
Blog Contact Posts Questions Tags Hire Me

Question:
On Ubuntu How to Install Node.js?

I often encounter Node.js applications during my development efforts.

I use the steps below to install Node.js in new Ubuntu virtual machines:
  • Install Ubuntu (if not installed yet):
    linux101_cclud_instance
    http://www.google.com/search?q=how+to+install+ubuntu+on+virtualbox
  • Install Ubuntu Packages
    apt-get install autoconf build-essential libssl-dev libyaml-dev \
    libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 \
    libgdbm-dev libsqlite3-dev gitk emacs wget curl chromium-browser openssh-server
  • Install Node.js
    cd ~
    wget https://nodejs.org/dist/v0.12.7/node-v0.12.7-linux-x64.tar.gz
    tar zxf node-v0.12.7-linux-x64.tar.gz
    ln -s   node-v0.12.7-linux-x64 node
    echo 'export PATH=${HOME}/node/bin:${PATH}' >> ${HOME}/.bashrc
    bash
    which node
    node -v
    node -e 'console.log("hello")'
    npm install coffee-script -g
    coffee -e 'console.log "Hello"'
Notice above, that I made a call to: 'npm'.

After I use npm to install coffeescript and then use coffeescript to print "Hello", I consider that sufficient evidence that I have Node.js installed on my new Ubuntu instance.


syntax.us Let the syntax do the talking
Blog Contact Posts Questions Tags Hire Me