docker安装jumpserver
注意MySQL的密码设置要有复杂度,否则jumpserver用不了
#先准备一台服务器安装MySQL和redis(注意官网版本要求) root@ubuntu:~# docker pull mysql:5.6.45 root@ubuntu:~# docker pull redis #:启动MySQL和redis root@ubuntu:~# docker run -v /data/mysql/conf/mysql.cnf:/etc/mysql/conf.d/mysql.cnf -v /data/mysql/conf/mysqld.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf -v /data/mysql/data:/var/lib/mysql -d -p 3306:3306 --name mysql -e MYSQL_ROOT_PASSWORD="magedu.com" mysql:5.6.45 5794e8c6e845587114ee3a4835b206d3f71e7f866b6dfb3489970b19561c3075 #:注意映射关系修改配置为支持utf8 root@ubuntu:~# vim /data/mysql/conf/mysql.cnf [mysql] default-character-set=utf8 root@ubuntu:~# vim /data/mysql/conf/mysqld.cnf [mysqld] pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock datadir = /var/lib/mysql #log-error = /var/log/mysql/error.log # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 character-set-server=utf8 #:启动redis root@ubuntu:~# docker run -id -d redis
#:根据官网jumpserver写启动信息 #注意先设置key 和torken $ if [ "$SECRET_KEY" = "" ]; then SECRET_KEY=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 50`; echo "SECRET_KEY=$SECRET_KEY" >> ~/.bashrc; echo $SECRET_KEY; else echo $SECRET_KEY; fi $ if [ "$BOOTSTRAP_TOKEN" = "" ]; then BOOTSTRAP_TOKEN=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 16`; echo "BOOTSTRAP_TOKEN=$BOOTSTRAP_TOKEN" >> ~/.bashrc; echo $BOOTSTRAP_TOKEN; else echo $BOOTSTRAP_TOKEN; fi #:启动jumpserver root@ubuntu:~# docker run --name jms_all -v /opt/jumpserver:/opt/jumpserver/data/media -p 80:80 -p 2222:2222 -e SECRET_KEY=bVBBD356Y98uzTYciIQqcbfKirxXkgElrYdIZviK8xL2UfPnF1 -e BOOTSTRAP_TOKEN=lPuQRIkYJlsTLUei -e DB_HOST=192.168.7.102 -e DB_PORT=3306 -e DB_USER=jumpserver -e DB_PASSWORD=magedu.com -e DB_NAME=jumpserver -e REDIS_HOST=192.168.7.102 -e REDIS_PORT=6379 -e REDIS_PASSWORD= jumpserver/jms_all:1.4.8
登录
#账号和密码都是admin
jumpserver使用
#步骤
创建组
创建用户
创建系统用户
创建管理用户
创建资产
权限管理
资产授权
回话管理中的历史回话可查看回放