增加安装文档

This commit is contained in:
dushixiang
2020-12-27 23:01:19 +08:00
parent bbeed5344a
commit e841562188
6 changed files with 176 additions and 45 deletions

31
docs/install-docker.MD Normal file
View File

@ -0,0 +1,31 @@
# docker安装
默认使用`sqlite`存储数据
```shell
docker run -d \
-p 8088:8088 \
--name next-terminal \
--restart always dushixiang/next-terminal:0.0.2
```
## 环境变量
| 参数 | 含义 |
|---|---|
| DB | 数据库类型,默认 `sqlite`,可选`['sqlite','mysql']` |
| SQLITE_FILE | `sqlite`数据库文件存放地址,默认 `'next-terminal.db'` |
| MYSQL_HOSTNAME | `mysql`数据库地址 |
| MYSQL_PORT | `mysql`数据库端口 |
| MYSQL_USERNAME | `mysql`数据库用户 |
| MYSQL_PASSWORD | `mysql`数据库密码 |
| MYSQL_DATABASE | `mysql`数据库名称 |
| SERVER_ADDR | 服务器监听地址,默认`0.0.0.0:8088` |
## 其他
程序安装目录地址为:`/usr/local/next-terminal`
录屏文件存放地址为:`/usr/local/next-terminal/recording`
远程桌面挂载地址为:`/usr/local/next-terminal/drive`

100
docs/install-naive.MD Normal file
View File

@ -0,0 +1,100 @@
# 原生安装
## Centos
### 安装 Apache Guacamole-Server
安装Apache Guacamole-Server依赖文件
```shell
yum install -y gcc cairo-devel libjpeg-turbo-devel libpng-devel uuid-devel freerdp-devel freerdp-plugins pango-devel libssh2-devel libtelnet-devel libvncserver-devel pulseaudio-libs-devel openssl-devel libvorbis-devel libwebp-devel
```
下载&解压&configure
```shell
wget https://mirror.bit.edu.cn/apache/guacamole/1.2.0/source/guacamole-server-1.2.0.tar.gz
tar -xzf guacamole-server-1.2.0.tar.gz
cd guacamole-server-1.2.0
./configure --with-init-dir=/etc/init.d
```
如果安装的依赖文件没有缺失的话,会看到`RDP` `SSH` `VNC` 都是 `yes`
```shell
------------------------------------------------
guacamole-server version 1.2.0
------------------------------------------------
Library status:
freerdp2 ............ yes
pango ............... yes
libavcodec .......... no
libavformat.......... no
libavutil ........... no
libssh2 ............. yes
libssl .............. yes
libswscale .......... no
libtelnet ........... yes
libVNCServer ........ yes
libvorbis ........... yes
libpulse ............ yes
libwebsockets ....... no
libwebp ............. yes
wsock32 ............. no
Protocol support:
Kubernetes .... no
RDP ........... yes
SSH ........... yes
Telnet ........ yes
VNC ........... yes
Services / tools:
guacd ...... yes
guacenc .... no
guaclog .... yes
FreeRDP plugins: /usr/lib64/freerdp2
Init scripts: /etc/init.d
Systemd units: no
Type "make" to compile guacamole-server.
```
编译和安装
```shell
make && make install & ldconfig
```
建立软链接
```shell
ln -s /usr/local/lib/freerdp/guacsnd.so /usr/lib64/freerdp/
ln -s /usr/local/lib/freerdp/guacdr.so /usr/lib64/freerdp/
```
配置guacamole-server
```shell
cat <<EOF >> /etc/guacamole/guacd.conf
[daemon]
pid_file = /var/run/guacd.pid
log_level = info
[server]
bind_host = 127.0.0.1
bind_port = 4822
EOF
```
启动 guacamole-server
```shell
/etc/init.d/guacd start
```
### 安装 Next Terminal