Gate One——用web展示Terminal(安装)

时间:2021-08-17 10:12:53

  Gate One可以用web来展示Terminal,虽然存在一些小缺陷,基本功能都还可以的,有兴趣的可以折腾一下。

  安装环境:

  系统:RHEL 6.1 ,系统自带python 2.6.6

  1. 下载需要安装用的gateone和tornado包
[root@systemdb app]# wget https://github.com/downloads/liftoff/GateOne/gateone-1.1-1.noarch.rpm
...
-- :: (82.5 KB/s) - “gateone-1.1-.noarch.rpm” saved [/] [root@systemdb app]# wget https://github.com/downloads/liftoff/GateOne/tornado-2.4-1.noarch.rpm
...
-- :: (72.9 KB/s) - “tornado-2.4-.noarch.rpm” saved [/]

  2.安装对应的包

[root@systemdb app]# rpm -ivh tornado-2.4-.noarch.rpm
Preparing... ########################################### [%]
:tornado ########################################### [%]
[root@systemdb app]# rpm -ivh gateone-1.1-.noarch.rpm
Preparing... ########################################### [%]
:gateone ########################################### [%]

  3.尝试执行发现还缺少一个包

[root@systemdb gateone]# ./gateone.py
[E :: terminal:] Error: Could not import OrderedDict. Please install it:
[E :: terminal:] sudo pip install ordereddict
[E :: terminal:] ...or download it from http://pypi.python.org/pypi/ordereddict

  对于python,使用常用的easy_install进行安装

[root@systemdb gateone]# easy_install ordereddict
Searching for ordereddict
Reading http://pypi.python.org/simple/ordereddict/
...
Installed /usr/lib/python2./site-packages/ordereddict-1.1-py2..egg
Processing dependencies for ordereddict
Finished processing dependencies for ordereddict

  4.配置文件根据需要进行修改

  gate on默认的安装位置在/opt/gateone/ 其中配置文件为server.conf

  port =   --->此为访问的端口号

  origins = "https://192.1.1.1:443"  --->此为访问的地址,根据自己需要进行修改

  5.启动gate one

[root@systemdb gateone]# ./gateone.py
[W :: gateone:] dtach command not found. dtach support has been disabled.
[I :: gateone:] Connections to this server will be allowed from the following origins: 'https://172.21.127.223:22443'
[I :: gateone:] No authentication method configured. All users will be ANONYMOUS
[I :: gateone:] Loaded plugins: bookmarks, convenience, example, help, logging, logging_plugin, mobile, notice, playback, ssh

  6.访问gateone

  可以在其它主机浏览器中输入第四步的地址(如:https://192.1.1.1:443)进行访问

  按照提示的命令输入相应的内容来用web连接其它的终端

[Press Shift-F1 for help]

Host/IP or ssh:// URL [localhost]: 192.1.1.1
Port []:
User: root
Connecting to ssh://root@192.1.1.1:22 root@192.1.1.1's password:
Last login: Tue Sep :: from 172.21.127.223
[root@DIP02 ~]#

  在页面右侧的工具栏可以进行对应的设置,来满足自己的要求。屏幕下方的进度条是可以播放,应该是用来录屏的吧:)