首页 > 代码库 > 新手玩个人server(阿里云)续二

新手玩个人server(阿里云)续二

       小二班一番厮杀:那英四强诞生:大家闺秀,小家碧玉。窈窕淑女,妍姿俊俏 。不解释!

?不行!

陈冰,李嘉格,刘明湘。张碧晨。大多数的时候,仅仅要脸好看,一切都那么自热而然的顺理成章。

尽管网上骂声四起,黑压压一片,总有那么一片不满。忆往昔。快女十强美女寥寥无几。众人云云,不也发出过中性一片,大扫雅兴。

迎合往往活的心力憔悴。从第一届的梁博。张玮。多亮。张赫宣。次奥,我竟然还记得。红果果四个汉子,仅仅能佐证那英也喜欢汉子。

          昨晚我仍旧没能装上node,由于报错

Traceback (most recent call last):  
  File "../../tools/js2c.py", line 36, in <module>  
    import bz2  
ImportError: No module named bz2  
make[1]: *** [/home/softs/node-v0.8.12/out/Release/obj/gen/libraries.cc] Error 1  
make[1]: Leaving directory `/home/softs/node-v0.8.12/out'  
make: *** [node] Error 2  
一番折腾。原来装Python的时候,忘记装了bz2
yum -y install bzip2*  
cd /usr/local/src/Python-2.7.5/Modules/zlib
./configure ;  
make;  
make install  
cd /usr/local/src/Python-2.7.5
python setup.py install

然后回到/usr/local/src/node-v0.10.24

cd /usr/local/src/node-v0.10.24

make 

make install

node -v

v0.10.24

node成功安装。


參考: http://flyer2010.iteye.com/blog/1699946

http://hxl2009.blog.51cto.com/779549/1031320

http://blog.csdn.net/liubo2012/article/details/8367603


npm -v
1.3.21

可见node包管理器npm也安装好了。

 node
> console.log("hello Nodejs ");
hello Nodejs
測试成功


接着安装express框架

 npm install express -g

express@4.8.6 /usr/local/lib/node_modules/express
├── merge-descriptors@0.0.2
├── utils-merge@1.0.0
├── cookie@0.1.2
├── escape-html@1.0.1
├── cookie-signature@1.0.4
├── finalhandler@0.1.0
├── range-parser@1.0.0
├── fresh@0.2.2
├── vary@0.1.0
├── media-typer@0.2.0
├── parseurl@1.3.0
├── methods@1.1.0
├── serve-static@1.5.3
├── buffer-crc32@0.2.3
├── path-to-regexp@0.1.3
├── depd@0.4.4
├── qs@2.2.0
├── debug@1.0.4 (ms@0.6.2)
├── proxy-addr@1.0.1 (ipaddr.js@0.1.2)
├── type-is@1.3.2 (mime-types@1.0.2)
├── accepts@1.0.7 (negotiator@0.4.7, mime-types@1.0.2)
└── send@0.8.3 (destroy@1.0.3, ms@0.6.2, mime@1.2.11, on-finished@2.1.0)

突然想起我熟悉3的框架,当前装了最新版4,于是卸载

npm uninstall express

又一次装 指定版本号

npm install express@3.5.* -g
express@3.5.3 /usr/local/lib/node_modules/express
├── methods@0.1.0
├── merge-descriptors@0.0.2
├── cookie@0.1.2
├── debug@0.8.1
├── cookie-signature@1.0.3
├── fresh@0.2.2
├── range-parser@1.0.0
├── buffer-crc32@0.2.1
├── mkdirp@0.4.0
├── commander@1.3.2 (keypress@0.1.0)
├── send@0.3.0 (debug@0.8.0, mime@1.2.11)
└── connect@2.14.5 (response-time@1.0.0, pause@0.0.1, method-override@1.0.0, connect-timeout@1.0.0, vhost@1.0.0, qs@0.6.6, basic-auth-connect@1.0.0, bytes@0.3.0, raw-body@1.1.4, static

新手玩个人server(阿里云)续二