ubuntu install node0.8.9 to the current user
2012-09-24 10:37
288 查看
1.to the current user.
2.js check.
## log install node.0.8.9 to /home/zhng/devHome/node/0.8.9 #0. prepare sudo apt-get install g++ sudo apt-get install curl #1. download wget http://nodejs.org/dist/v0.8.9/node-v0.8.9.tar.gz #2. tar tar -zvxf http://nodejs.org/dist/v0.8.9/node-v0.8.9.tar.gz #3. before make, update configure cd node-v0.8.9 ./configrue --prefix=${HOME}/devHome/node/0.8.9 #4. make make #5. install make install #6. set current user's env echo 'export PATH=${HOME}/devHome/node/0.8.9/bin:${PATH}' >> ~/.bashrc #7. make the env come to force . ~/.bashrc #8. install npm ##https://npmjs.org/doc/README.html ##Fancy Install (Unix) ###here's a pretty robust install script at https://npmjs.org/install.sh. You can download that and run it curl https://npmjs.org.org/install.sh | sh #9. test npm npm install hexy
2.js check.
#1. douban-jslint ##https://github.com/kejun/Douban-JSLint ##without the option g. it's installed in the current directory. npm install -g http://github.com/kejun/Douban-JSLint/tarball/master #2 install closure-lint ## https://developers.google.com/closure/utilities/docs/linter_howto?hl=zh-TW ##2.1. python easy_install sudo apt-get install python-setuptools ##2.2 sudo easy_install http://closure-linter.googlecode.com/files/closure_linter-latest.tar.gz[/code]nodejs's Helloworld
3. Hello World.// Helloworld.js // nodejs's Helloworld.js console.log('Helloworld');
4.nodejs's simple http server.// server1.js // nodejs's simple server. var http = require('http'); http.createServer(function(request, response) { //reponse's head response.writeHead(200, {'Content-TYpe': 'text/html'}); response.write('<h1>Node.js</h1>'); //say it's the end. response.end('<p>a simple http server</p>'); } ).listen(3000); cnsole.log('http server is listending at port 3000.');
5.....
相关文章推荐
- XCode 4.3 Unable to load persistent store UserDictionary.sqlite 以及 ios simulator failed to install the application
- android Failed to install *.apk on device 'emulator-5554' timeout 或者 the user data image is used解决办法
- NLP--- How to install the tool NLTK in Ubuntu ?
- How to set the current user on the model instance in the admin:
- How to install Ubuntu form the ISO format in the GRUB
- [译]How to Install Node.js on Ubuntu 14.04 如何在ubuntu14.04上安装node.js
- How to install the latest Nvidia drivers on Ubuntu 14.04 Trusty Tahr
- How to install the latest Eclipse in Ubuntu 14+
- nodejs gyp WARN EACCES user "root" does not have permission to access the dev dir
- How to fix the bug 640*480 resolution only when install ubuntu 14.04 on a old laptop?
- How to Install the Latest Nvidia Driver on Ubuntu 12.04
- How to get the current user logged into Sharepoint
- How To Install Node.js on an Ubuntu 14.04 server
- Switch view in the InfoPath form according to the whether current user is in SharePoint group admin
- Common Tasks :Connecting to the Local Host as the Current User
- 安装Ubuntu server 时报错 "The 'grub-pc' package failed to install into /target/ 的解决方法
- How to Install the Latest Nvidia Driver on Ubuntu 12.04
- Using JavaScript to show the current time for the end user
- How to Install the Gnome Classic Desktop(Gnome2.x) in Ubuntu 14.04
- Android开发基础——真机测试错误,ADB启动不了,程序安装不了,the connection to adb is down,INSTALL_CANCELED_BY_USER...