免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2014年11月25日 星期二

install nodejs on ubuntu


//=== https://github.com/joyent/node/wiki/Installation
"""...
You can install a pre-built version of node.js via the downloads page available in a .tar.gz.
..."""

$ sudo apt-get remove nodejs

$ wget http://nodejs.org/dist/v0.12.0/node-v0.12.0-linux-x64.tar.gz
$ sudo tar -C /usr/local/ --strip-components=1 -zxvf node-v0.12.0-linux-x64.tar.gz
$ sudo ln -s /usr/local/bin/node /usr/bin/node
$ node --version
$ npm --version [newer nodejs should already include npm in its package]






//===
1.  quick way to install nodejs on ubuntu
$ sudo apt-get update
$ sudo apt-get install nodejs
$ sudo apt-get install npm

$ mkdir ~/nodejs
$ cd ~/nodejs
$ npm install node-static
-->  ~/nodejs/node_modules/node-static
...


2.  build from source

//=== http://iconof.com/blog/how-to-install-setup-node-js-on-amazon-aws-ec2-complete-guide/#installNode

$ git clone git://github.com/joyent/node.git
$ cd node

$ git tag -l
[ view available Node tags (versions)  ]

$ git checkout v0.6.8
$ ./configure
$ make      [需要30分鐘以上?]
$ sudo make install
[ how to change name to nodejs to avoid conflict ?]


[ install NPM(Node package manager) ]
$ git clone https://github.com/isaacs/npm.git
$ cd npm
???
$ sudo make install





沒有留言:

張貼留言