使用centos搭建jumpserver环境
一、设置防火墙和selinux
firewall-cmd --zone=public --add-port=80/tcp --permanent # nginx端口
firewall-cmd --zone=public --add-port=2222/tcp --permanent # 用户SSH登录端口coco
firewall-cmd --reload # 重新载入规则
setenforce 0
sed –i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config二、准备Python3和Python虚拟环境
1、安装依赖包
yum install epel-release -y
yum -y install git python-pip mariadb-devel gcc automake autoconf python-devel sshpass readline-devel mysql-devel2、安装Python3.6
yum -y install python36 python36-devel
# 如果下载速度很慢, 可以换国内源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum -y install python36 python36-devel3、建立Python虚拟环境
因为 CentOS 7 自带的是 Python2, 而 Yum 等工具依赖原来的 Python, 为了不扰乱原来的环境我们来使用 Python 虚拟环境。

三、安装JumpServer
1、下载或 Clone 项目
项目提交较多 git clone 时较大, 你可以选择去 Github 项目页面直接下载zip包
2、安装RPM依赖包
3、安装Python库依赖

4、安装 Redis
5、安装Mysql数据库
本教程使用 Mysql 作为数据库, 如果不使用 Mysql 可以跳过相关 Mysql 安装和配置
(1)、安装Mysql数据库
(2)、启动数据库并设置开机自启
(3)、创建JumpServer数据库并授权(切记不要自己设置密码)
6、修改jumpserver配置文件
(1)、修改配置文件
(2)、配置文件说明
(3)、运行Jumpserver

至此JumpServer安装告一段落 接下来进入其他服务安装
参考文档
Last updated
Was this helpful?