jumpserver 使用教程_Jumpserver的部署和使用

[[email protected] ~]# docker pull mysql:5.7[[email protected]-no ~]# mkdir /iflytek/mysql/mysql.conf.d -pv

[[email protected]-no ~]# mkdir /iflytek/mysql/conf.d -p

[[email protected]-no ~]# mkdir /iflytek/mysql/data

[[email protected]-no mysql]# cat /iflytek/mysql/mysql.conf.d/mysqld.cnf

# Copyright (c)2014, 2016, Oracle and/or its affiliates. All rights reserved.

#

# This program isfree software; you can redistribute it and/or modify

# it under the terms of the GNU General Public License, version2.0,

# as published by the Free Software Foundation.

#

# This program is also distributed with certain software (including

# but not limited to OpenSSL) that is licensed under separate terms,

# as designatedin a particular file or component or inincluded license

# documentation. The authors of MySQL hereby grant you an additional

# permission to link the program and your derivative works with the

# separately licensed software that they have included with MySQL.

#

# This program is distributedinthe hope that it will be useful,

# but WITHOUT ANY WARRANTY; without even the implied warranty of

# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

# GNU General Public License, version2.0, for moredetails.

#

# You should have received a copy of the GNU General Public License

# along with this program;if not, writeto the Free Software

# Foundation, Inc.,51 Franklin St, Fifth Floor, Boston, MA 02110-1301USA

#

# The MySQL Server configurationfile.

#

# For explanations see

# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

[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

# By default we only accept connections from localhost

#bind-address = 127.0.0.1# Disabling symbolic-links is recommended to prevent assorted security risks

symbolic-links=0[[email protected]-no mysql]# cat /iflytek/mysql/conf.d/mysql.cnf

[mysql]

default-character-set=utf8

[[email protected]-no ~]# docker run -it -d -p 3306:3306 -v /iflytek/mysql/mysql.conf.d/mysqld.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf -v /iflytek/mysql/conf.d/mysql.cnf:/etc/mysql/conf.d/mysql.cnf -v /iflytek/mysql/data/:/var/lib/mysql -e MYSQL_ROOT_PASSWORD="[email protected]" mysql:5.79c7b2bc71c84137b10430d9f0e41f80ec63997e65390e1a64160dffcef853c64

[[email protected]-no mysql]# yum install mysql-client

[[email protected]-no mysql]# mysql -uroot [email protected]2020 -h172.31.242.80mysql: [Warning] Using a password on the command line interface can be insecure.

Welcome to the MySQL monitor. Commands end with ; or g.

Your MySQL connectionid is 2Server version:5.7.31MySQL Community Server (GPL)

Copyright (c)2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type‘help;‘ or ‘h‘ for help. Type ‘c‘ to clearthe current input statement.

mysql>show databases;+--------------------+

| Database |

+--------------------+

| information_schema |

| mysql |

| performance_schema |

| sys |

+--------------------+

4 rows in set (0.00sec)

mysql> show global variables where variable_name like ‘character%‘;+--------------------------+----------------------------+

| Variable_name | Value |

+--------------------------+----------------------------+

| character_set_client | latin1 |

| character_set_connection | latin1 |

| character_set_database | latin1 |

| character_set_filesystem | binary |

| character_set_results | latin1 |

| character_set_server | latin1 |

| character_set_system | utf8 |

| character_sets_dir | /usr/share/mysql/charsets/ |

+--------------------------+----------------------------+

8 rows in set (0.00sec)

mysql> create database jumpserver default charset ‘utf8‘ collate ‘utf8_bin‘;

Query OK,1 row affected (0.00sec)

mysql> grant all on jumpserver.* to ‘jumpserver‘@‘%‘ identified by ‘[email protected]‘;

Query OK,0 rows affected, 1 warning (0.00 sec)

您好!对于 JumpServer使用教程,我可以为您提供一些基本的信息。JumpServer 是一款开源的堡垒机/跳板机系统,用于管理和控制服务器访问权限。 以下是一个简要的 JumpServer 使用教程: 1. 安装和部署: - 首先,您需要在一台服务器上安装 JumpServer。您可以在 JumpServer 官方网站上找到详细的安装指南和文档。 - 您需要安装并配置 JumpServer 的依赖项,如 Docker、MySQL 等。 - 配置完成后,您可以通过浏览器访问 JumpServer 的管理界面。 2. 添加服务器: - 在 JumpServer 管理界面中,您可以添加需要管理的服务器。点击"资产",然后点击"新增主机"。 - 输入服务器的基本信息,如名称、IP 地址、SSH 端口等。 - 如果需要,您可以为服务器分配标签、组织等。 3. 添加用户: - 在 JumpServer 管理界面中,点击"用户",然后点击"新增用户"。 - 输入用户的基本信息,如用户名、密码等。 - 如果需要,您可以为用户分配角色、组织等。 4. 配置策略: - 在 JumpServer 管理界面中,点击"策略",然后点击"新增策略"。 - 为策略指定名称,并选择适用的服务器、用户和权限。 - 您可以定义不同的策略,以控制用户对服务器的访问权限。 5. 使用 JumpServer: - 用户可以通过浏览器登录 JumpServer,并根据其角色和权限访问受控服务器。 - 用户可以在 JumpServer 界面上执行命令、上传下载文件等操作。 请注意,以上仅为 JumpServer 的基本使用教程,具体的操作步骤和配置可能会有所不同。建议您参考 JumpServer 官方文档以获取更详细的指导和教程。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值