How to Install the Latest Version of Node.js on Ubuntu

Node.js is a software platform commonly used to build large-scale server-side applications. Node.js uses JavaScript as its scripting language, which can deliver high performance due to its non-blocking I/O design and single-threaded event loop mechanism . Node.js includes Google V8  javascript engine, libuv library and core library are almost all written in JavaScript. The libuv library provides an abstraction for asynchronous event I/O and a cross-platform mechanism for Node.js. Node.js was originally created by Ryan Dahl and is currently being evolved and maintained by Isaac Schlueter. There are many articles on the Internet about compiling and installing Node.js from source, and I strongly recommend against this method. In most cases, the package maintainer has a very clear understanding of the software structure, and the developer does not need to compile the latest version of the source code from scratch. The method below works for the latest versions of Ubuntu, Ubuntu 12.04 LTS, Ubuntu 12.10, Ubuntu 13.04, etc. It helps developers install Node.js on Ubuntu without compiling and installing from scratch. You can execute the following commands on the cloud host:







 

# apt-get update  
# apt-get install -y python-software-properties software-properties-common  
# add-apt-repository ppa:chris-lea/node.js  
# apt-get update  
# apt-get install nodejs

 Add soft link:

ln -s /usr/bin/nodejs /usr/bin/node

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326488978&siteId=291194637