
root@localhost:~/xly# ps aux|grep nginx
root 5847 0.0 0.0 92428 1728 ?Ss 12月07 0:00 nginx: master process /usr/sbin/nginx
root 5848 0.0 0.0 93020 3036 ?S12月07 0:49 nginx: worker process
root 5849 0.0 0.0 93020 3036 ?S12月07 0:51 nginx: worker process
root 5851 0.0 0.0 93020 3032 ?S12月07 0:46 nginx: worker process
root 5852 0.0 0.0 93020 3036 ?S12月07 0:48 nginx: worker process
root 16635 0.0 0.0 13424 948 pts/5S+ 16:41 0:00 grep nginx
root@localhost:~/xly# lsof -p 5847
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nginx 5847 root cwdDIR8,3 4096 2 /
nginx 5847 root rtdDIR8,3 4096 2 /
nginx 5847 root txtREG8,3 873176 95168767 /usr/sbin/nginx
nginx 5847 root memREG8,3 101240 7081726 /lib/x86_64-linux-gnu/libresolv-2.19.so
nginx 5847 root memREG8,322952 7081730 /lib/x86_64-linux-gnu/libnss_dns-2.19.so
nginx 5847 root memREG8,310432 7078112 /lib/x86_64-linux-gnu/libnss_mdns4_minimal.so.2
nginx 5847 root memREG8,347712 7081728 /lib/x86_64-linux-gnu/libnss_files-2.19.so
nginx 5847 root memREG8,347760 7081748 /lib/x86_64-linux-gnu/libnss_nis-2.19.so
nginx 5847 root memREG8,397296 7081737 /lib/x86_64-linux-gnu/libnsl-2.19.so
nginx 5847 root memREG8,339824 7081736 /lib/x86_64-linux-gnu/libnss_compat-2.19.so
nginx 5847 root memREG8,322616 95164316 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
nginx 5847 root memREG8,314456 95164314 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
nginx 5847 root memREG8,3 125392 95164318 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
nginx 5847 root memREG8,358120 95160898 /usr/lib/x86_64-linux-gnu/libjbig.so.0
nginx 5847 root memREG8,3 1265072 95164321 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
nginx 5847 root memREG8,3 170064 7078077 /lib/x86_64-linux-gnu/libexpat.so.1.6.0
nginx 5847 root memREG8,318416 7078084 /lib/x86_64-linux-gnu/libgpg-error.so.0.10.0
nginx 5847 root memREG8,3 467208 95160899 /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.0
nginx 5847 root memREG8,3 1677008 95165486 /usr/lib/x86_64-linux-gnu/libvpx.so.1.3.0
nginx 5847 root memREG8,372776 95165705 /usr/lib/x86_64-linux-gnu/libXpm.so.4.11.0
nginx 5847 root memREG8,3 244704 95160956 /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.8.0
nginx 5847 root memREG8,3 666080 95164383 /usr/lib/x86_64-linux-gnu/libfreetype.so.6.11.1
nginx 5847 root memREG8,3 153936 7078141 /lib/x86_64-linux-gnu/libpng12.so.0.50.0
nginx 5847 root memREG8,3 281288 95160885 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
nginx 5847 root memREG8,3 520608 7078082 /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2
nginx 5847 root memREG8,3 1071552 7081727 /lib/x86_64-linux-gnu/libm-2.19.so
nginx 5847 root memREG8,3 137400 7078093 /lib/x86_64-linux-gnu/liblzma.so.5.0.0
nginx 5847 root memREG8,314664 7081731 /lib/x86_64-linux-gnu/libdl-2.19.so
nginx 5847 root memREG8,3 1840928 7081742 /lib/x86_64-linux-gnu/libc-2.19.so
nginx 5847 root memREG8,3 190648 95164297 /usr/lib/x86_64-linux-gnu/libGeoIP.so.1.6.0
nginx 5847 root memREG8,3 417992 95165855 /usr/lib/x86_64-linux-gnu/libgd.so.3.0.0
nginx 5847 root memREG8,383816 95165297 /usr/lib/x86_64-linux-gnu/libexslt.so.0.8.17
nginx 5847 root memREG8,3 247952 95165296 /usr/lib/x86_64-linux-gnu/libxslt.so.1.1.28
nginx 5847 root memREG8,3 1461496 95164257 /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.1
nginx 5847 root memREG8,3 100728 7078174 /lib/x86_64-linux-gnu/libz.so.1.2.8
nginx 5847 root memREG8,3 1930528 7078094 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
nginx 5847 root memREG8,3 383112 7078072 /lib/x86_64-linux-gnu/libssl.so.1.0.0
nginx 5847 root memREG8,3 252032 7078131 /lib/x86_64-linux-gnu/libpcre.so.3.13.1
nginx 5847 root memREG8,343368 7081734 /lib/x86_64-linux-gnu/libcrypt-2.19.so
nginx 5847 root memREG8,3 141574 7081743 /lib/x86_64-linux-gnu/libpthread-2.19.so
nginx 5847 root memREG8,3 149120 7081739 /lib/x86_64-linux-gnu/ld-2.19.so
nginx 5847 root DELREG0,4 321504351 /dev/zero
nginx 5847 root0u CHR1,3 0t0 1029 /dev/null
nginx 5847 root1u CHR1,3 0t0 1029 /dev/null
nginx 5847 root2w REG8,3 1406668 103297074 /var/log/nginx/error.log
nginx 5847 root3u unix 0xffff880109b2ad80 0t0 321502773 socket
nginx 5847 root4w REG8,3 1406668 103297074 /var/log/nginx/error.log
nginx 5847 root6u IPv4 321504347 0t0 TCP *:8090 (LISTEN)
nginx 5847 root7u IPv4 321504348 0t0 TCP *:http (LISTEN)
nginx 5847 root8u IPv6 321504349 0t0 TCP *:http (LISTEN)
nginx 5847 root9u IPv4 321504350 0t0 TCP *:843 (LISTEN)
nginx 5847 root 10u unix 0xffff880109b29f80 0t0 321502774 socket
nginx 5847 root 11u unix 0xffff880109b29180 0t0 321502775 socket
nginx 5847 root 12u unix 0xffff880109b29880 0t0 321502776 socket
nginx 5847 root 13u unix 0xffff880109b2bb80 0t0 321502777 socket
nginx 5847 root 14u unix 0xffff880109b2a680 0t0 321502778 socket
nginx 5847 root 15u unix 0xffff880109b29c00 0t0 321502779 socket
nginx 5847 root 16u unix 0xffff880109b28380 0t0 321502780 socket
nginx 5847 root 17w REG8,3 32341307 103296811 /var/log/nginx/access.log
node.js 是有windows实现版本的,请到它的官网node.org下载。有两种 exe和msi都可以使用。下载后安装和正常软件安装一样。使用方法:
在开始菜单打开,选择 Node.js command prompt ,它自动帮你加入了环境变量,直接可以使用 node 和npm命令。
node命令: node (空格)js程序,请用绝对地址。其他参数可以用node -h查看,有详细的解释
npm命令:npm是node安装第三方模块的命令,使用非常简单npm install 模块名即可。其他参数可以可以使用npm -h 查看
这里npm的模块都必须在npm.org上注册使用。
另外在提供一个中文社区 cnodejs.org不错的中文社区。也提供中文文档。
还有一点关于平台选择,其实并不是linux好,node的核心事件驱动机制在linux使用的是模拟的libev+libeio库模拟的,而windows则本身就提供了系统调用,性能据测试过的人数据是windows占大优势的。当然这并不影响你在windows和linux使用node.js,他是完全跨平台的!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)