组件说明
- Jumpserver 为管理后台, 管理员可以通过 Web 页面进行资产管理、用户管理、资产授权等操作, 用户可以通过 Web
页面进行资产登录, 文件管理等操作 - koko 为 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 默认 Web 端口为 8080/tcp, 默认 WS 端口为 8070/tcp, 配置文件
jumpserver/config.yml - koko 默认 SSH 端口为 2222/tcp, 默认 Web Terminal 端口为 5000/tcp 配置文件在
koko/config.yml - Guacamole 默认端口为 8081/tcp, 配置文件 /config/tomcat9/conf/server.xml
- Nginx 默认端口为 80/tcp
- Redis 默认端口为 6379/tcp
- Mysql 默认端口为 3306/tcp
Server name | Port |
---|---|
koko | 8070, 8080 |
Server name | 2222, 5000 |
Guacamole | 8081 |
Db | 3306 |
Redis | 6379 |
Nginx | 80 |
说明
- #开头的行表示注释
- 开头的行表示需要在 mysql 中执行
- $ 开头的行表示需要执行的命令
云服务器快速部署参考 极速安装
安装过程中遇到问题可参考 安装过程中常见的问题
环境
- 系统: CentOS 7
- IP: 192.168.244.144
- 目录: /opt
- 数据库: mariadb
- 代理: nginx
开始安装
$ yum update -y
防火墙 与 selinux 设置说明, 如果已经关闭了 防火墙 和 Selinux 的用户请跳过设置
$ systemctl start firewalld
$ firewall-cmd --zone=public --add-port=80/tcp --permanent # nginx 端口
$ firewall-cmd --zone=public --add-port=2222/tcp --permanent # 用户SSH登录端口 koko
–permanent 永久生效, 没有此参数重启后失效
$ firewall-cmd --reload # 重新载入规则
$ setenforce 0
$ sed -i “s/SELINUX=enforcing/SELINUX=disabled/g” /etc/selinux/config
安装依赖包
$ yum update -y
# 防火墙 与 selinux 设置说明, 如果已经关闭了 防火墙 和 Selinux 的用户请跳过设置
$ systemctl start firewalld
$ firewall-cmd --zone=public --add-port=80/tcp --permanent # nginx 端口
$ firewall-cmd --zone=public --add-port=2222/tcp --permanent # 用户SSH登录端口 koko
--permanent 永久生效, 没有此参数重启后失效
$ firewall-cmd --reload # 重新载入规则
$ setenforce 0
$ sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
# 安装依赖包
$ yum -y install wget gcc epel-release git
# 安装 Redis, Jumpserver 使用 Redis 做 cache 和 celery broke
$ yum -y install redis
$ systemctl enable redis
$ systemctl start redis
# 安装 MySQL, 如果不使用 Mysql 可以跳过相关 Mysql 安装和配置, 支持sqlite3, mysql, postgres等
$ yum -y install mariadb mariadb-devel mariadb-server MariaDB-shared # centos7下叫mariadb, 用法与mysql一致
$ systemctl enable mariadb
$ systemctl start mariadb
# 创建数据库 Jumpserver 并授权
$ DB_PASSWORD=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 24` # 生成随机数据库密码
$ echo -e "\033[31m 你的数据库密码是 $DB_PASSWORD \033[0m"
$ mysql -uroot -e "create database jumpserver default charset 'utf8'; grant all on jumpserver.* to 'jumpserver'@'127.0.0.1' identified by '$DB_PASSWORD'; flush privileges;"
# 安装 Nginx, 用作代理服务器整合 Jumpserver 与各个组件
$ vi /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1
$ yum -y install nginx
$ systemctl enable nginx
# 安装 Python3.6
$ yum -y install python36 python36-devel
# 配置并载入 Python3 虚拟环境
$ cd /opt
$ python3.6 -m venv py3 # py3 为虚拟环境名称, 可自定义
$ source /opt/py3/bin/activate # 退出虚拟环境可以使用 deactivate 命令
# 看到下面的提示符代表成功, 以后运行 Jumpserver 都要先运行以上 source 命令, 载入环境后默认以下所有命令均在该虚拟环境中运行