| Home » Categories » Multiple Categories |
How To Install an Upstream Version of Node.js on Ubuntu 12.04 |
|
Article Number: 223 | Rating: Unrated | Last Updated: Tue, Sep 23, 2025 at 11:22 PM
|
About Node.jsNode.js. is a system that uses event-driven (as opposed to thread-based) programming to build scalable applications and network programs. It is especially helpful for building web servers. Written in Javascript, node.js was created in 2009 and is currently the second most popular repository on github.SetupFeel free to skip this section if you have a compiler and curl installed on your droplet.These steps are included since both a compiler and curl are required for the node.js installation itself. Additionally, you will need to have sudo privileges on your virtual private server for the next three commands (the actual installation does not require them). Go ahead and run an apt-get update before starting to install any of the requirements. sudo apt-get updateOnce the update finishes, install a compiler on your server. sudo apt-get install build-essentialAdditionally, be sure to download curl, which we will need to perform the installation itself. sudo apt-get install curlOnce those two components have downloaded, you are all ready to install node.js. Install node.js and NPM (Node Package Manager)I found the method described below to be the easiest way to install node.js. According to their site, there are eight ways to install node.js, and you can check out the other possibilities if you prefer.This specific installation is very straightforward and installs node.js on the user's local system alone. Start by changing the path to include commands from the ~/local/bin directory. echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrcFollow up by sourcing the .bashrc file: . ~/.bashrcCreate two new directories for the installation: mkdir ~/local mkdir ~/node-latest-installSwitch into the latest-install folder: cd ~/node-latest-installRun curl to get the node.js tarball and subsequently untar it. curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1Once that has completed, you can go ahead and start the installation process, limiting it to the local user. This ensures that you will not need sudo later. ./configure --prefix=~/localRun make install, but be warned: it does take a while. make installFinish up by downloading the the node package manager through curl: curl https://npmjs.org/install.sh | shAfter you are all done, you can quickly check which version you have installed on your virtual private server. node -v |
Attachments
There are no attachments for this article.
|
How To Install And Run A Node.js App On Centos 6.4 64bit
Viewed 11134 times since Sun, Dec 29, 2013
Geddy.JS: A No-Brainer MVC Node.js Framework
Viewed 3973 times since Sun, Dec 29, 2013
How to Add a Swap File on an Arch Linux Cloud Server
Viewed 3410 times since Fri, Dec 27, 2013
How To Install Linux, Nginx, MySQL, PHP (LEMP) Stack on Debian 7
Viewed 4553 times since Fri, Dec 27, 2013
How To Install (LEMP) nginx, MySQL, PHP stack on Arch Linux
Viewed 14382 times since Sun, Dec 29, 2013
How To Install nginx on Ubuntu 12.04 LTS
Viewed 3438 times since Tue, Dec 24, 2013
How To Configure and Maintain Ghost from the Command Line
Viewed 7342 times since Sun, Dec 29, 2013
How To Write a Linux Daemon with Node.js
Viewed 10890 times since Sun, Dec 29, 2013
How To Use Traceroute and MTR to Diagnose Network Issues
Viewed 7413 times since Fri, Dec 27, 2013
How To Create a SSL Certificate on Apache for Ubuntu 12.04
Viewed 3971 times since Mon, Dec 23, 2013
|
