systemctl stop firewalld
systemctl disable firewalld
sed -i 's/^SELINUX=enforcing\|^SELINUX=permissive/SELINUX=disabled/' /etc/selinux/config
shutdown -r now
dnf install python2
ln -s /usr/bin/python /usr/bin/python2
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install 'tornado==2.4.1'
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
cp /opt/gateone/server.conf{,.bak}
vi /opt/gateone/server.conf
# diff /opt/gateone/server.conf{,.bak}
7c7
< port = 50000
---
> port = 443
9c9
< url_prefix = "/ssh"
---
> url_prefix = "/"
23c23
< disable_ssl = True
---
> disable_ssl = False
32c32
< origins = "https://192.168.56.xxx"
---
> origins = "http://localhost;https://localhost;http://127.0.0.1;https://127.0.0.1;https://gateone;https://192.168.56.xxx"
#
dnf install httpd
systemctl enable --now httpd
cat << EOF > /etc/httpd/conf.d/r_proxy.conf
<ifModule mod_proxy.c>
ProxyRequests Off
<Proxy *>
Require all granted
</Proxy>
ProxyPass /ssh/ws ws://192.168.56.xxx:50000/ssh/ws
ProxyPassReverse /ssh/ws ws://192.168.56.xxx:50000/ssh/ws
ProxyPass /ssh http://192.168.56.xxx:50000/ssh
ProxyPassReverse /ssh http://192.168.56.xxx:50000/ssh
</IfModule>
EOF
systemctl restart httpd
/etc/init.d/gateone start
# /etc/init.d/gateone restart
chkconfig gateone on
来源:CSDN
作者:engchina
链接:https://blog.csdn.net/engchina/article/details/103457426