您的位置:首页 > Web前端 > Node.js

Installing node.js on ubuntu server 15.10

2016-04-15 16:58 525 查看

Installing node.js

As mine was a clean Ubuntu installation, I needed to install certain libraries first.

sudo apt-get install g++ curl libssl-dev apache2-utils

The easiest way is to download node.js is to get a git clone. For that I needed to install the git package.

sudo apt-get install git-core

Now download node.js with git.

git clone git://github.com/ry/node.git

If you do not want to use git you could get the tar package instead.

wget http://nodejs.org/dist/node-v0.1.96.tar.gz gunzip node-v0.1.96.tar.gz
tar -xf node-v0.1.96.tar

Now you are ready to install node.js.

cd node
./configure
make
sudo make install

Example node.js code

Below is a simple program using node.js for translating text using google API.

来自:http://www.codediesel.com/linux/installing-node-js-on-ubuntu-10-04/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: