使用tty.js 在浏览器上使用终端

  1. 下载node.js http://nodejs.org/download/
  2. 安装 node
    [root@li637-23 data]# wget http://nodejs.org/dist/v0.10.32/node-v0.10.32-linux-x64.tar.gz
--2014-10-14 13:30:21--  http://nodejs.org/dist/v0.10.32/node-v0.10.32-linux-x64.tar.gz
Resolving nodejs.org... 165.225.133.150
Connecting to nodejs.org|165.225.133.150|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5643126 (5.4M) [application/octet-stream]
Saving to: “node-v0.10.32-linux-x64.tar.gz”

100%[===============================================================================================================================>] 5,643,126    129K/s   in 64s     

2014-10-14 13:31:26 (86.1 KB/s) - “node-v0.10.32-linux-x64.tar.gz” saved [5643126/5643126]

[root@li637-23 data]# tar -vxf node-v0.10.32-linux-x64.tar.gz 

vim ~/.bashrc 
export PATH="${PATH}:/root/data/node-v0.10.32-linux-x64/bin"

安装gcc tty.js

yum install gcc-c++
[root@li637-23 ~]# npm install tty.js

编写tty.js
“`

    原文作者:timger
    原文地址: https://segmentfault.com/a/1190000000722829
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞