wetty=web+tty
一. 安装环境 nodejs和nvm
-
先安装 nvm , 即是Node Version Manager(Node版本管理器)
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
或者使用 wgetwget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
-
激活nvm:
source ~/.nvm/nvm.sh
-
安装node
nvm install node
-
安装完成后,切换到该版本
nvm use node
二. 安装 wetty
-
开始安装wetty
git clone https://github.com/krishnasrinivas/wetty
cd wetty
npm install
-
从 Web 浏览器启动 Wetty 并访问 Linux 终端
node app.js -p 8080
-
为 Wetty 安装 HTTPS 证书
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes
-
通过 HTTPS 来使用 Wetty
nohup node app.js --sslkey key.pem --sslcert cert.pem -p 8080 &
附录
-
- 详细安装参考README.md和官网说明
-
- 官网: