CentOS 7 安装 GateOne

https://pip.pypa.io/en/latest/installing/
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py

pip install 'tornado>2.4,<2.5'
or
pip install 'tornado==2.4.1'

pip install Pillow

wget https://github.com/downloads/liftoff/GateOne/gateone-1.1.tar.gz
tar -zxvf gateone-1.1.tar.gz
cd GateOne
python setup.py install

cd /opt/gateone
./gateone.py

如果你想让其后台运行
systemctl start gateone

开机自动启动服务
systemctl enable gateone

查看操作记录(需会话结束之后才能显示):
/opt/gateone/logviewer.py /opt/gateone/users/ANONYMOUS/logs/20161130103312565927.golog
直接访问:
出于安全性考虑,最好修改一下端口和URL后缀
vi /opt/gateone/server.conf
port = xxx
url_prefix = "/xxx/"
"log_file_max_size": 104857600 // Which is the result of: 100 * 1024 * 1024 = 100MB
"log_file_num_backups": 10 // The maximum number of backups to keep of Gate One's web server logs.

若出现Access denied for origin
vi /opt/gateone/server.conf
在 origins = 行引号中追加 ;https://服务器当前IP地址或域名:端口
session_timeout = "20m"

防火墙放行
iptables -I INPUT -p tcp --dport 端口 -j ACCEPT
通过Nginx访问:
vi /opt/gateone/server.conf
#不允许外网访问GateOne
address = "127.0.0.1"
#禁用自带证书
disable_ssl = True
#要与Nginx转发端口一致
port=10443
#要与Nginx路径一致
url_prefix="/gateone/"
#允许使用Nginx listen port端口登录
origins = "...;http://127.0.0.1:nginxport"
session_timeout = "20m"

使用Basic HTTP Authentication:
yum install httpd-tools
htpasswd -c /etc/nginx/.htpasswd_gateone gateone
# 输入8位密码

vi /etc/nginx/conf.d/default.conf
server {
...
	# GateOne
	# 与GateOne中的url_prefix要一致
	location /gateone/ {
            auth_basic "Private Property";
            auth_basic_user_file /etc/nginx/.htpasswd_gateone;

	    #与GateOne中的port要一致
	    proxy_pass http://127.0.0.1:10443;

	    proxy_redirect off;
	    proxy_pass_header Server;
	    proxy_set_header Host $http_host;
	    proxy_set_header X-Real-IP $http_address;
	    proxy_set_header X-Scheme $scheme;

	    proxy_http_version 1.1;
	    proxy_set_header Upgrade $http_upgrade;
	    proxy_set_header Connection "upgrade";
	}
}