您現在的位置是:首頁 > 舞蹈首頁舞蹈
史上最詳細的跳板機jumpserver搭建教程,值得收藏
跳板機如何登入伺服器
概述
前面已經介紹了jumpserver的一些概念,今天主要分享如何去搭建jumpserver跳板機,下面一起來看看吧~
元件說明
Jumpserver 為管理後臺, 管理員可以透過 Web 頁面進行資產管理、使用者管理、資產授權等操作, 使用者可以透過 Web 頁面進行資產登入, 檔案管理等操作
Coco 為 SSH Server 和 Web Terminal Server 。使用者可以使用自己的賬戶透過 SSH 或者 Web Terminal 訪問 SSH 協議和 Telnet 協議資產
Luna 為 Web Terminal Server 前端頁面, 使用者使用 Web Terminal 方式登入所需要的元件
Guacamole 為 RDP 協議和 VNC 協議資產元件, 使用者可以透過 Web Terminal 來連線 RDP 協議和 VNC 協議資產 (暫時只能透過 Web Terminal 來訪問)
埠說明
Jumpserver 預設埠為 8080/tcp 配置檔案 jumpserver/config。yml
Coco 預設 SSH 埠為 2222/tcp, 預設 Web Terminal 埠為 5000/tcp 配置檔案在 coco/config。yml
Guacamole 預設埠為 8081/tcp, 配置檔案 /config/tomcat8/conf/server。xml
Nginx 預設埠為 80/tcp
Redis 預設埠為 6379/tcp
Mysql 預設埠為 3306/tcp
ProtocolServer namePortTCPJumpserver8080TCPCoco2222, 5000TCPGuacamole8081TCPDb3306TCPRedis6379TCPNginx80
環境
系統: CentOS 7
IP: 172。16。10。123
目錄: /opt
資料庫: mariadb
代理: nginx
一、nginx代理部署
1、關閉防火牆和selinux
1。1、設定防火牆
systemctl stop firewalld。servicesystemctl disable firewalld。servicesystemctl list-unit-files|grep firewalld
1。2、設定 selinux
setenforce 0sed -i “s/SELINUX=enforcing/SELINUX=disabled/g” /etc/selinux/config
2、配置yum並升級
for i in /etc/yum。repos。d/*。repo;do cp $i ${i%。repo}。bak;done;rm -rf /etc/yum。repos。d/*。repowget -P /etc/yum。repos。d/ http://mirrors。aliyun。com/repo/Centos-7。repo >/dev/null 2>&1yum clean all;yum repolist#安裝基本依賴yum update -y>/dev/null && yum install wget unzip epel-release gcc automake zlib-devel openssl-devel yum-utils git -y >/dev/null 2>&1
3、獲取 epel-release 源
yum -y install epel-release
4、安裝nginx
sudo rpm -Uvh http://nginx。org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0。el7。ngx。noarch。rpmyum -y install nginxsystemctl enable nginx
5、安裝luna
wget https://github。com/jumpserver/luna/releases/download/1。5。0/luna。tar。gz -O /opt/luna。tar。gztar -xvf /opt/luna。tar。gz -C /opt# 如果網路有問題導致下載無法完成可以使用下面地址#wget https://demo。jumpserver。org/download/luna/1。5。0/luna。tar。gz
二、資料庫部署
1、安裝mariadb
cat >/etc/yum。repos。d/mariadb。repo < 2、資料初始化 systemctl start mariadb #初始化mysql_secure_installation # 推薦設定 root 密碼, 其他選項可以全部 ysystemctl stop mariadb 3、建立 Jumpserver 資料庫及授權 systemctl start mariadbmysql -uroot -pcreate database jumpserver default charset ‘utf8’;grant all on jumpserver。* to ‘jumpserver’@‘*’ identified by ‘fswl@1234’;grant all on jumpserver。* to ‘jumpserver’@‘localhost’ identified by ‘fswl@1234’;flush privileges;quit 篇幅有限,這裡主要介紹nginx和mariadb部分,後面會分享更多jumpserver搭建方面的內容,感興趣的朋友可以關注一下~