Centos 8安装gateone

烈酒焚心 提交于 2019-12-11 07:25:47
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

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!