1:192.168.108.111
setenforce 0
systemctl stop firewalld
iptables -F
2: docker安装
yum -y install wget
cd /etc/yum.repos.d/
wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
wget http://mirrors.aliyun.com/repo/Centos-7.repo
yum -y install centos-release-openstack-ocata
3:yum -y install mariadb-server
vim /etc/my.cnf
[client-server]
[mysqld]
symbolic-links=0
#禁止主机名解析
skip_name_resolve
!includedir /etc/my.cnf.d
systemctl start mariadb
systemctl enable mariadb
4:<span style="color: #4d4d4d">创建jumpserver数据库并授权</span>
mysql
MariaDB [(none)]> create database jumpserver default charset 'utf8';
#创建管理账号,密码必须是数字加字母
MariaDB [(none)]> grant all on jumpserver.* to 'jumpserver'@'%' identified by 'linux123';
yum install epel-release
yum -y install redis
5: vim /etc/redis.conf
61:bind 0.0.0.0
480:requirepass 123
systemctl start redis
systemctl enable redis
6: yum -y install docker-ce
systemctl start docker
docker run --name jms_all -d\
-v /opt/mysql:/var/lib/mysql\
-v /opt/jumpserver:/opt/jumpserver/data/media\
-p 80:80\
-p 2222:2222\
-e SECRET_KEY=PEHVdLzvZFtDQT733ntHDH1hglXQ9OQKoI1xxAfdDhpRGx3tg7\
-e BOOTSTRAP_TOKEN=YDzl55tZPTdclbUh\
-e DB_HOST=192.168.10.101 \ #当前主机IP
-e DB_PORT=3306\
-e DB_USER=jumpserver \ #数据库用户
-e DB_PASSWORD=ywz0207. \ #数据库密码
-e DB_NAME=jumpserver \ #数据库名称
-e REDIS_HOST=192.168.10.101\
-e REDIS_PORT=6379\
-e REDIS_PASSWORD=123 \ #Redis密码
jumpserver/jms_all:1.4.8
7:docker exec -it jms_all /bin/bash

8、mfa认证
通过JumpServer终端修改:

# docker exec -it jms_core /bin/bash

$ cd /opt/jumpserver/apps

$ python manage.py shell

**### 注意,下列命令每条均需要回车,不能一次性执行**

**### username为需要修改的用户,password为修改后的密码**

from users.models import User

u = User.objects.get(username='admin')

u.reset_password('password')

u.save()

标签: none

已有 5 条评论

  1. 不错不错,我喜欢看 https://www.jiwenlaw.com/

  2. 不错不错,我喜欢看 https://www.237fa.com/

  3. 不错不错,我喜欢看 www.jiwenlaw.com

  4. 你的文章总是能给我带来欢乐,谢谢你! https://www.yonboz.com/video/60416.html

  5. 你的文章内容非常用心,让人感动。 http://www.55baobei.com/1xjrWtgGIV.html

添加新评论