rhel6.4部署gateone

rhel6.4部署GateOne


GateOne简介

GateOne是一款基于HTML5的开源终端模拟器/SSH客户端,同时内置强大的插件功能。它自带的插件使其成为一款令人惊艳的SSH客户端,但是,它可以用于运行任何终端应用。用户可以将GateOne嵌入其他应用程序从而提供各类终端访问界面,它也支持各类基于Web的管理界面……后面的大家自己看吧~~

因为内部临时需要这么一套系统,所以搜搜查查,搞定了系统部署,使用pam认证的配置,做了个简单的管理界面。


检查python版本

 
 
1
2
[ root@ kurolz  gateone ]python  - V
Python  2.6.6


获取pip并安装

 
 
1
[ root@ kurolz  gateone ]wget  -- no - check - certificate  https: // bootstrap. pypa. io / get - pip. py
 
 
1
[ root@ kurolz  gateone ]python  get - pip. py


安装tornado

 
 
1
[ root@ kurolz  gateone ]pip  install  tornado
 
 
1
2
[ root@ kurolz  gateone ]python  - c  "import tornado; print(tornado.version)"
4.5.1


到官网下载git

https://www.kernel.org/pub/software/scm/git/


上传到服务器,解压到当前目录

 
 
1
2
3
[ root@ kurolz  ~ ]ls  git *
git - 2.9.1. tar. gz
[ root@ kurolz  ~ ]tar  - zxvf  git - 2.9.1. tar. gz


编译时出错,提示没有c语言编译器

 
 
1
2
3
4
5
6
7
8
9
10
[ root@ kurolz  git - 2.9.1 ]# . / configure
configureSetting  lib  to  ' lib '  ( the  default )
configureWill  try  - pthread  then  - lpthread  to  enable  POSIX  Threads.
configureCHECKS  for  site  configuration
checking  for  gcc...  no
checking  for  cc...  no
checking  for  cl. exe...  no
configureerrorin ` / root / git - 2.9.1 ' :
configure: error: no acceptable C compiler found in $PATH
See `config.log '  for  more  details


先安装gcc,把系统盘挂载上,在里面找安装包,如有网络可通过yum安装

 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
[ root@ kurolz  mnt ]mkdir  / mnt / cdrom
[ root@ kurolz  mnt ]mount  - t  iso9660  / dev / cdrom  / mnt / cdrom
mountblock  device  / dev / sr0  is  write - protectedmounting  read - only
[ root@ kurolz  mnt ]cd  / mnt / cdrom /
[ root@ kurolz  cdrom ]ls
EFI       EULA_pt            README                     RELEASE - NOTES - it - IT. html   RELEASE - NOTES - ru - RU. html   RPM - GPG - KEY - redhat - release
EULA      EULA_zh            RELEASE - NOTES - as - IN. html   RELEASE - NOTES - ja - JP. html   RELEASE - NOTES - si - LK. html   ScalableFileSystem
EULA_de   GPL                RELEASE - NOTES - bn - IN. html   RELEASE - NOTES - kn - IN. html   RELEASE - NOTES - ta - IN. html   Server
EULA_en   HighAvailability   RELEASE - NOTES - de - DE. html   RELEASE - NOTES - ko - KR. html   RELEASE - NOTES - te - IN. html   TRANS. TBL
EULA_es   images             RELEASE - NOTES - en - US. html   RELEASE - NOTES - ml - IN. html   RELEASE - NOTES - zh - CN. html
EULA_fr   isolinux           RELEASE - NOTES - es - ES. html   RELEASE - NOTES - mr - IN. html   RELEASE - NOTES - zh - TW. html
EULA_it   LoadBalancer       RELEASE - NOTES - fr - FR. html   RELEASE - NOTES - or - IN. html   repodata
EULA_ja   media. repo         RELEASE - NOTES - gu - IN. html   RELEASE - NOTES - pa - IN. html   ResilientStorage
EULA_ko   Packages           RELEASE - NOTES - hi - IN. html   RELEASE - NOTES - pt - BR. html   RPM - GPG - KEY - redhat - beta


依次安装

 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[ root@ kurolz  Packages ]rpm  - ivh  glibc - common - 2.12 - 1.107. el6. x86_64. rpm      
[ root@ kurolz  Packages ]rpm  - ivh  kernel - headers - 2.6.32 - 358. el6. x86_64. rpm 
[ root@ kurolz  Packages ]rpm  - ivh  libgcc - 4.4.7 - 3. el6. x86_64. rpm       
[ root@ kurolz  Packages ]rpm  - ivh  glibc - 2.12 - 1.107. el6. x86_64. rpm       
[ root@ kurolz  Packages ]rpm  - ivh  libgomp - 4.4.7 - 3. el6. x86_64. rpm        
[ root@ kurolz  Packages ]rpm  - ivh  nscd - 2.12 - 1.107. el6. x86_64. rpm
[ root@ kurolz  Packages ]rpm  - ivh  glibc - headers - 2.12 - 1.107. el6. x86_64. rpm 
[ root@ kurolz  Packages ]rpm  - ivh  glibc - devel - 2.12 - 1.107. el6. x86_64. rpm 
[ root@ kurolz  Packages ]rpm  - ivh  mpfr - 2.4.1 - 6. el6. x86_64. rpm 
[ root@ kurolz  Packages ]rpm  - ivh  ppl - 0.10.2 - 11. el6. x86_64. rpm 
[ root@ kurolz  Packages ]rpm  - ivh  cloog - ppl - 0.15.7 - 1.2. el6. x86_64. rpm 
[ root@ kurolz  Packages ]rpm  - ivh  cpp - 4.4.7 - 3. el6. x86_64. rpm 
[ root@ kurolz  Packages ]rpm  - ivh  gcc - 4.4.7 - 3. el6. x86_64. rpm 
[ root@ kurolz  Packages ]rpm  - ivh  libstdc ++- 4.4.7 - 3. el6. x86_64. rpm 
[ root@ kurolz  Packages ]rpm  - ivh  libstdc ++- devel - 4.4.7 - 3. el6. x86_64. rpm 
[ root@ kurolz  Packages ]which  gcc
/ usr / bin / gcc
[ root@ kurolz  Packages ]rpm  - q  gcc
gcc - 4.4.7 - 3. el6. x86_64


重新编译安装git

 
 
1
2
3
4
5
6
7
8
[ root@ kurolz  ~ ]cd  git - 2.9.1    
[ root@ kurolz  git - 2.9.1 ]# . / configure 
configureSetting  lib  to  ' lib '  ( the  default )
configureWill  try  - pthread  then  - lpthread  to  enable  POSIX  Threads.
configureCHECKS  for  site  configuration
checking  for  gcc...  gcc
checking  whether  the  C  compiler  works...  yes
......


make时又报错,原因:缺少zlib头文件,开发包没安装

 
 
1
2
3
4
5
In  file  included  from  credential - store. c: 1:
cache. h: 21: 18warningzlib. hNo  such  file  or  directory
In  file  included  from  credential - store. c: 1:
cache. h: 23errorexpected  specifier - qualifier - list  before ‘ z_stream
make***  [ credential - store. o ]  Error  1


解决方法(依然挂载系统盘,找到下面2个安装包安装):

 
 
1
2
[ root@ kurolz  Packages ]rpm  - ivh  zlib - 1.2.3 - 29. el6. x86_64. rpm 
[ root@ kurolz  Packages ]rpm  - ivh  zlib - devel - 1.2.3 - 29. el6. x86_64. rpm


重新make成功

 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
[ root@ kurolz  git - 2.9.1 ]make
     GEN  config. status
/ bin / shautoconfcommand  not  found
     CC  credential - store. o
     *  new  link  flags
     CC  abspath. o
     CC  advice. o
     CC  alias. o
     CC  alloc. o
    ......
     GEN  bin - wrappers / test - urlmatch - normalization
     GEN  bin - wrappers / test - wildmatch
     GEN  git - remote - testgit
 
 
1
2
[root@kurolz git-2.9.1]# sudo make install


 
 
1
git

 
 
1
2
[ root@ kurolz  ~ ]git  -- version
git  version  2.9.1


下面获取gateone源码进行安装,报错,因为git环境没有安装完全

 
 
1
2
3
4
[root@kurolz ~]# git clone https://github.com/liftoff/GateOne.git
 'GateOne'...
fatal: Unable to find remote helper for 'https'

解决方法,暂时用git代替https:

 
 
1
2
[ root@ kurolz  ~ ]git  clone  git: // github. com / liftoff / GateOne. git
[ root@ kurolz  ~ ]cd  GateOne


发现这个包执行不下去报错原因没找到,我到

https://github.com/downloads/liftoff/GateOne/gateone-1.1-1.noarch.rpm

重新下了个包

 
 
1
2
[ root@ kurolz  ~ ]tar  - zxvf  gateone - 1.1 - 1. noarch. rpm
[ root@ kurolz  ~ ]cd  gateone



报错,原因tornado版本不对:

 
 
1
2
3
4
5
6
7
[ root@ kurolz  gateone ]# . / gateone. py 
Traceback  ( most  recent  call  last ):
   File  "./gateone.py"line  289in 
     tornado. options. enable_pretty_logging()
AttributeError' module '  object  has  no  attribute  ' enable_pretty_logging '
[ root@ kurolz  gateone ]python  - c  "import tornado; print(tornado.version)"
4.4.1


解决方法,安装2.4版本的tornado:

 
 
1
[ root@ kurolz  ~ ] wget  https: // pypi. python. org / packages / 2 d / 9 a / 38 e855094bd11cba89cd2a50a54c31019ef4a45785fe12be6aa9a7c633de / tornado - 2.4. tar. gz
 
 
1
2
3
4
5
6
[ root@ kurolz  ~ ]tar  zxvf  tornado - 2.4. tar. gz
[ root@ kurolz  ~ ]cd  tornado - 2.4
[ root@ kurolz  tornado - 2.4 ]python   setup. py  build
[ root@ kurolz  tornado - 2.4 ]python2  setup. py  install
[ root@ kurolz  tornado - 2.4 ]python  - c  "import tornado; print(tornado.version)"
2.4


再启动gateone,成功:

 
 
1
2
3
4
5
6
7
8
9
[ root@ kurolz  gateone ]# . / gateone. py 
[ I  170518  19: 43: 11  gateone: 2748 ]  / opt / gateone / server. conf  not  found  or  missing  cookie_secret.   A  new  one  will  be  generated.
[ W  170518  19: 43: 11  gateone: 2893 ]  dtach  command  not  found.   dtach  support  has  been  disabled.
[ I  170518  19: 43: 11  gateone: 2917 ]  Connections  to  this  server  will  be  allowed  from  the  following  origins' http://localhost https://localhost http://127.0.0
     .1 https://127.0.0.1 '
[ I  170518  19: 43: 11  gateone: 2957 ]  No  SSL  private  key  found.   One  will  be  generated.
[ I  170518  19: 43: 13  gateone: 2307 ]  No  authentication  method  configuredAll  users  will  be  ANONYMOUS
[ I  170518  19: 43: 13  gateone: 2404 ]  Loaded  pluginsbookmarksconvenienceexamplehelplogginglogging_pluginmobilenoticeplaybackssh
[ I  170518  19: 43: 13  gateone: 3054 ]  Listening  on 
[ I   170518   19: 43: 13   gateone: 3060 ]   Process  running  with  pid  2630


发现用WAN的ip访问不了,Ctrl+C,编辑配置文件,修改允许访问的IP地址,以‘;’隔开

 
 
1
2
[ root@ kurolz  gateone ]vim  server. conf
origins  =  "http://localhost;https://localhost;http://127.0.0.1;https://127.0.0.1;https://192.168.20.128;https://192.168.10.10"


重新启动gateone

 
 
1
2
3
4
5
6
7
[ root@ kurolz  gateone ]# . / gateone. py 
[ W  170518  19: 57: 01  gateone: 2893 ]  dtach  command  not  found.   dtach  support  has  been  disabled.
[ I  170518  19: 57: 01  gateone: 2917 ]  Connections  to  this  server  will  be  allowed  from  the  following  origins' http://localhost https://localhost http://127.0.0.1 https
     ://127.0.0.1 https://192.168.20.128 https://192.168.10.10 '
[ I  170518  19: 57: 01  gateone: 2307 ]  No  authentication  method  configuredAll  users  will  be  ANONYMOUS
[ I  170518  19: 57: 01  gateone: 2404 ]  Loaded  pluginsbookmarksconvenienceexamplehelplogginglogging_pluginmobilenoticeplaybackssh
[ I  170518  19: 57: 01  gateone: 3054 ]  Listening  on  https: //*: 443 /
[ I  170518  19: 57: 01  gateone: 3060 ]  Process  running  with  pid  2630


浏览器连接成功:

wKiom1kdjPCAjvCIAABbC_G0miQ395.png-wh_50

 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[ root@ kurolz  gateone ]# . / gateone. py 
[ W  170518  19: 57: 01  gateone: 2893 ]  dtach  command  not  found.   dtach  support  has  been  disabled.
[ I  170518  19: 57: 01  gateone: 2917 ]  Connections  to  this  server  will  be  allowed  from  the  following  origins' http://localhost https://localhost http://127.0.0
     .1 https://127.0.0.1 https://192.168.20.128 https://192.168.10.10 '
[ I  170518  19: 57: 01  gateone: 2307 ]  No  authentication  method  configuredAll  users  will  be  ANONYMOUS
[ I  170518  19: 57: 01  gateone: 2404 ]  Loaded  pluginsbookmarksconvenienceexamplehelplogginglogging_pluginmobilenoticeplaybackssh
[ I  170518  19: 57: 01  gateone: 3054 ]  Listening  on  https: //*: 443 /
[ I  170518  19: 57: 01  gateone: 3060 ]  Process  running  with  pid  2630
[ I  170518  19: 57: 11  web: 1462 ]  302  GET  /  ( 192.168.10.1 )  1.16 ms
[ I  170518  19: 57: 11  auth: 181 ]  Creating  user  directory/ opt / gateone / users / ANONYMOUS
[ I  170518  19: 57: 11  web: 1462 ]  302  GET  / auth? next=% 2 F  ( 192.168.10.1 )  4.19 ms
[ I  170518  19: 57: 11  web: 1462 ]  200  GET  /  ( 192.168.10.1 )  31.56 ms
[ I  170518  19: 57: 11  web: 1462 ]  200  GET  / static / gateone. css  ( 192.168.10.1 )  55.38 ms
[ I  170518  19: 57: 11  web: 1462 ]  200  GET  / static / gateone. js  ( 192.168.10.1 )  53.57 ms
[ I  170518  19: 57: 11  web: 1462 ]  200  GET  / combined_js  ( 192.168.10.1 )  58.23 ms
[ I  170518  19: 57: 11  web: 1462 ]  200  GET  / static / favicon. ico  ( 192.168.10.1 )  1.53 ms
[ I  170518  19: 57: 11  web: 1462 ]  200  GET  / auth? check= True  ( 192.168.10.1 )  2.47 ms
[ I  170518  19: 57: 11  gateone: 1063 ]  WebSocket  opened  ( ANONYMOUS ).
[ I  170518  19: 57: 12  web: 1462 ]  200  GET  / static / bookmarks / images / star. svg  ( 192.168.10.1 )  5.14 ms
[ I  170518  19: 57: 12  web: 1462 ]  200  GET  / static / ubuntumono - normal. woff  ( 192.168.10.1 )  8.31 ms


一旦Ctrl+c就不能连接登录了,所以我们需要后台运行,启动gateone的服务,并且开机启动

 
 
1
2
3
[ root@ kurolz  gateone ]service  gateone  start
Starting  Gate  One:                                          [ ]
[ root@ kurolz  gateone ]chkconfig  gateone  on


此gateone部署完成。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值