关闭selinux
[root@centos7 ~]#setenforce 0
[root@centos7 ~]#systemctl stop firewalld
[root@centos7 ~]#iptables -F
安装docker源
[root@centos7 ~]#yum -y install wget
[root@centos7 ~]#cd /etc/yum.repos.d/
[root@centos7 ~]#wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
[root@centos7 ~]#wget http://mirrors.aliyun.com/repo/Centos-7.repo
[root@centos7 ~]#yum -y install centos-release-openstack-ocata
安装mariadb
[root@centos7 ~]#yum -y install mariadb-server
修改配置文件
[root@centos7 ~]#vim /etc/my.cnf
[client-server]
[mysqld] symbolic-links=0 #禁止主机名解析
skip_name_resolve
启动服务
[root@centos7 ~]#systemctl start mariadb
[root@centos7 ~]#systemctl enable mariadb
创建jumpserver数据库并授权
[root@centos7 ~]#mysql
修改root密码
MariaDB [mysql]> UPDATE user SET password=password('Qwe123.com') WHERE user='root';
MariaDB [mysql]> flush privileges;
创建数据库
MariaDB [(none)]> create database jumpserver default charset 'utf8';
#创建管理账号,密码必须是数字加字母
MariaDB [(none)]> grant all on jumpserver.* to 'jumpserver'@'%' identified by 'linux123';
安装Redis
[root@centos7 ~]#yum install epel-release
[root@centos7 ~]#yum -y install redis
编辑配置文件
[root@centos7 ~]#vim /etc/redis.conf
61:bind 0.0.0.0
480:requirepass 123
安装docker
[root@centos7 ~]#yum -y install docker-ce
[root@centos7 ~]#systemctl start docker
[root@centos7 ~]#systemctl enable docker
下载jumpserver镜像,并运行
[root@centos7 ~]#docker run --name jms_all -d \
-v /opt/mysql:/var/lib/mysql \
-v /home/jumpserver:/opt/jumpserver/data/media \
-p 80:80 \
-p 2222:2222 \
-e SECRET_KEY=PEHVdLzvZFtDQT733ntHDH1hglXQ9OQKoI1xxAfdDhpRGx3tg7 \
-e BOOTSTRAP_TOKEN=YDzl55tZPTdclbUh \
-e DB_HOST=176.168.0.126 \ #当前主机IP
-e DB_PORT=3306 \
-e DB_USER=jumpserver \ #数据库用户
-e DB_PASSWORD=linux123 \ #数据库密码
-e DB_NAME=jumpserver \ #数据库名称
-e REDIS_HOST=176.168.0.126 \
-e REDIS_PORT=6379 \
-e REDIS_PASSWORD=123 \ #Redis密码
jumpserver/jms_all:1.4.8
查看状态
[root@centos7 ~]#docker logs -f jms_all
#看到如下几行即可
gunicorn is running: 57
celery is running: 73
beat is running: 75
guacd[98]: INFO: Guacamole proxy daemon (guacd) version 0.9.14 started
Starting guacd: SUCCESS
Tomcat started.
Use eventlet dispatch
Start coco process
Use eventlet dispatch
Start coco process
Use eventlet dispatch
Start coco process
Jumpserver ALL 1.4.8
有问题请参考 http://docs.jumpserver.org/zh/docs/faq.html
访问测试
登入web界面,初始密码账号均为admin
标签:部署,jumpserver,centos7,yum,install,docker,root From: https://www.cnblogs.com/fansshaopeng/p/17291791.html