56 openEuler搭建Mariadb数据库服务器-安装、运行和卸载

news2025/1/14 1:08:05

文章目录

    • 56 openEuler搭建Mariadb数据库服务器-安装、运行和卸载
      • 56.1 安装
      • 56.2 运行
      • 56.3 卸载

56 openEuler搭建Mariadb数据库服务器-安装、运行和卸载

56.1 安装

  1. 配置本地yum源,详细信息请参考《openEuler 22.03-LTS 搭建repo服务器》。

  2. 清除缓存。

    # dnf clean all
    

    例如示例命令如下:

    [root@superman-21 ~]# dnf clean all
    45 files removed
    [root@superman-21 ~]# 
    
  3. 创建缓存。

    # dnf makecache
    

    例如示例命令如下:

    [root@superman-21 ~]# dnf makecache
    OS                                                                                           6.5 MB/s | 3.4 MB     00:00    
    everything                                                                                    18 MB/s |  16 MB     00:00    
    EPOL                                                                                         5.4 MB/s | 2.6 MB     00:00    
    debuginfo                                                                                    3.2 MB/s | 3.9 MB     00:01    
    source                                                                                       3.9 MB/s | 1.7 MB     00:00    
    update                                                                                        15 MB/s |  29 MB     00:01    
    Metadata cache created.
    [root@superman-21 ~]# 
    
  4. 在root权限下安装mariadb服务器。

    # dnf install mariadb-server
    

    例如示例命令如下:

    [root@superman-21 ~]# dnf install mariadb-server
    Last metadata expiration check: 0:01:18 ago on 2022年12月19日 星期一 21时18分58秒.
    Dependencies resolved.
    =============================================================================================================================
     Package                             Architecture         Version                             Repository                Size
    =============================================================================================================================
    Installing:
     mariadb-server                      x86_64               4:10.5.16-1.oe2203                  update                    18 M
    Installing dependencies:
     mariadb                             x86_64               4:10.5.16-1.oe2203                  update                   6.0 M
     mariadb-common                      x86_64               4:10.5.16-1.oe2203                  update                    27 k
     mariadb-config                      x86_64               4:10.5.16-1.oe2203                  update                   8.0 k
     mariadb-errmsg                      x86_64               4:10.5.16-1.oe2203                  update                   231 k
     mysql-selinux                       noarch               1.0.0-2.oe2203                      everything                35 k
     perl-DBD-MariaDB                    x86_64               1.21-3.oe2203                       OS                       122 k
     perl-DBI                            x86_64               1.643-3.oe2203                      update                   462 k
    Installing weak dependencies:
     mariadb-backup                      x86_64               4:10.5.16-1.oe2203                  update                   6.6 M
     mariadb-gssapi-server               x86_64               4:10.5.16-1.oe2203                  update                    14 k
     mariadb-server-utils                x86_64               4:10.5.16-1.oe2203                  update                   1.1 M
    
    Transaction Summary
    =============================================================================================================================
    Install  11 Packages
    
    Total download size: 32 M
    Installed size: 168 M
    Is this ok [y/N]: y
    Downloading Packages:
    (1/11): mysql-selinux-1.0.0-2.oe2203.noarch.rpm                                              286 kB/s |  35 kB     00:00    
    (2/11): perl-DBD-MariaDB-1.21-3.oe2203.x86_64.rpm                                            617 kB/s | 122 kB     00:00    
    (3/11): mariadb-common-10.5.16-1.oe2203.x86_64.rpm                                           648 kB/s |  27 kB     00:00    
    (4/11): mariadb-config-10.5.16-1.oe2203.x86_64.rpm                                           205 kB/s | 8.0 kB     00:00    
    (5/11): mariadb-errmsg-10.5.16-1.oe2203.x86_64.rpm                                           2.7 MB/s | 231 kB     00:00    
    (6/11): mariadb-gssapi-server-10.5.16-1.oe2203.x86_64.rpm                                    328 kB/s |  14 kB     00:00    
    (7/11): mariadb-server-10.5.16-1.oe2203.x86_64.rpm                                            15 MB/s |  18 MB     00:01    
    (8/11): mariadb-server-utils-10.5.16-1.oe2203.x86_64.rpm                                     4.4 MB/s | 1.1 MB     00:00    
    (9/11): perl-DBI-1.643-3.oe2203.x86_64.rpm                                                   8.9 MB/s | 462 kB     00:00    
    (10/11): mariadb-backup-10.5.16-1.oe2203.x86_64.rpm                                          2.9 MB/s | 6.6 MB     00:02    
    (11/11): mariadb-10.5.16-1.oe2203.x86_64.rpm                                                 2.3 MB/s | 6.0 MB     00:02    
    -----------------------------------------------------------------------------------------------------------------------------
    Total                                                                                         12 MB/s |  32 MB     00:02     
    Running transaction check
    Transaction check succeeded.
    Running transaction test
    Transaction test succeeded.
    Running transaction
      Preparing        :                                                                                                     1/1 
      Running scriptlet: perl-DBI-1.643-3.oe2203.x86_64                                                                     1/11 
      Installing       : perl-DBI-1.643-3.oe2203.x86_64                                                                     1/11 
      Running scriptlet: perl-DBI-1.643-3.oe2203.x86_64                                                                     1/11 
      Installing       : mariadb-config-4:10.5.16-1.oe2203.x86_64                                                           2/11 
      Installing       : mariadb-common-4:10.5.16-1.oe2203.x86_64                                                           3/11 
      Installing       : mariadb-errmsg-4:10.5.16-1.oe2203.x86_64                                                           4/11 
      Installing       : perl-DBD-MariaDB-1.21-3.oe2203.x86_64                                                              5/11 
      Running scriptlet: mysql-selinux-1.0.0-2.oe2203.noarch                                                                6/11 
      Installing       : mysql-selinux-1.0.0-2.oe2203.noarch                                                                6/11 
      Running scriptlet: mysql-selinux-1.0.0-2.oe2203.noarch                                                                6/11 
    libsemanage.semanage_direct_install_info: Overriding mysql module at lower priority 100 with module at priority 200.
    
      Installing       : mariadb-4:10.5.16-1.oe2203.x86_64                                                                  7/11 
      Installing       : mariadb-backup-4:10.5.16-1.oe2203.x86_64                                                           8/11 
      Installing       : mariadb-gssapi-server-4:10.5.16-1.oe2203.x86_64                                                    9/11 
      Running scriptlet: mariadb-server-4:10.5.16-1.oe2203.x86_64                                                          10/11 
      Installing       : mariadb-server-4:10.5.16-1.oe2203.x86_64                                                          10/11 
      Running scriptlet: mariadb-server-4:10.5.16-1.oe2203.x86_64                                                          10/11 
      Installing       : mariadb-server-utils-4:10.5.16-1.oe2203.x86_64                                                    11/11 
      Running scriptlet: mysql-selinux-1.0.0-2.oe2203.noarch                                                               11/11 
      Running scriptlet: mariadb-server-utils-4:10.5.16-1.oe2203.x86_64                                                    11/11 
    /usr/lib/tmpfiles.d/pesign.conf:1: Line references path below legacy directory /var/run/, updating /var/run/pesign → /run/pesign; please update the tmpfiles.d/ drop-in file accordingly.
    
      Verifying        : perl-DBD-MariaDB-1.21-3.oe2203.x86_64                                                              1/11 
      Verifying        : mysql-selinux-1.0.0-2.oe2203.noarch                                                                2/11 
      Verifying        : mariadb-4:10.5.16-1.oe2203.x86_64                                                                  3/11 
      Verifying        : mariadb-backup-4:10.5.16-1.oe2203.x86_64                                                           4/11 
      Verifying        : mariadb-common-4:10.5.16-1.oe2203.x86_64                                                           5/11 
      Verifying        : mariadb-config-4:10.5.16-1.oe2203.x86_64                                                           6/11 
      Verifying        : mariadb-errmsg-4:10.5.16-1.oe2203.x86_64                                                           7/11 
      Verifying        : mariadb-gssapi-server-4:10.5.16-1.oe2203.x86_64                                                    8/11 
      Verifying        : mariadb-server-4:10.5.16-1.oe2203.x86_64                                                           9/11 
      Verifying        : mariadb-server-utils-4:10.5.16-1.oe2203.x86_64                                                    10/11 
      Verifying        : perl-DBI-1.643-3.oe2203.x86_64                                                                    11/11 
    
    Installed:
      mariadb-4:10.5.16-1.oe2203.x86_64                         mariadb-backup-4:10.5.16-1.oe2203.x86_64                        
      mariadb-common-4:10.5.16-1.oe2203.x86_64                  mariadb-config-4:10.5.16-1.oe2203.x86_64                        
      mariadb-errmsg-4:10.5.16-1.oe2203.x86_64                  mariadb-gssapi-server-4:10.5.16-1.oe2203.x86_64                 
      mariadb-server-4:10.5.16-1.oe2203.x86_64                  mariadb-server-utils-4:10.5.16-1.oe2203.x86_64                  
      mysql-selinux-1.0.0-2.oe2203.noarch                       perl-DBD-MariaDB-1.21-3.oe2203.x86_64                           
      perl-DBI-1.643-3.oe2203.x86_64                           
    
    Complete!
    [root@superman-21 ~]#
    
  5. 查看安装后的rpm包。

    # rpm -qa | grep mariadb
    

    例如示例命令如下:

    [root@superman-21 ~]# rpm -qa | grep mariadb
    mariadb-errmsg-10.5.16-1.oe2203.x86_64
    mariadb-common-10.5.16-1.oe2203.x86_64
    mariadb-gssapi-server-10.5.16-1.oe2203.x86_64
    mariadb-server-utils-10.5.16-1.oe2203.x86_64
    mariadb-backup-10.5.16-1.oe2203.x86_64
    mariadb-10.5.16-1.oe2203.x86_64
    mariadb-server-10.5.16-1.oe2203.x86_64
    mariadb-config-10.5.16-1.oe2203.x86_64
    mariadb-connector-c-3.1.13-2.oe2203.x86_64
    [root@superman-21 ~]# 
    

56.2 运行

  1. 设置mariadb数据库配置文件。

    /etc/my.cnf的[client-server]下添加socket,[mysqld]下添加datadir、log-error,pid-file、socket;

    /etc/my.cnf.d/mariadb-server.cnf的[mysqld]下添加datadir、log-error,pid-file、socket

    # vi /etc/my.cnf
    

    例如示例命令如下:

    [root@superman-21 ~]# cat /etc/my.cnf
    #
    # This group is read both both by the client and the server
    # use it for options that affect everything
    #
    [client-server]
    socket = /data/mariadb/tmp/mysql.sock
    
    #
    # This group is read by the server
    #
    [mysqld]
    datadir = /data/mariadb/data
    log-error = /data/mariadb/log/mariadberr.log
    pid-file = /data/mariadb/run/mariadb.pid
    socket = /data/mariadb/tmp/mysql.sock
    # Disabling symbolic-links is recommended to prevent assorted security risks
    symbolic-links=0
    
    #
    # include all files from the config directory
    #
    !includedir /etc/my.cnf.d
    
    [root@superman-21 ~]#
    [root@superman-21 ~]# cat /etc/my.cnf.d/mariadb-server.cnf
    #
    # These groups are read by MariaDB server.
    # Use it for options that only the server (but not clients) should see
    #
    # See the examples of server my.cnf files in /usr/share/mysql/
    #
    
    # this is read by the standalone daemon and embedded servers
    [server]
    
    # this is only for the mysqld standalone daemon
    # Settings user and group are ignored when systemd is used.
    # If you need to run mysqld under a different user or group,
    # customize your systemd unit file for mysqld/mariadb according to the
    # instructions in http://fedoraproject.org/wiki/Systemd
    [mysqld]
    datadir = /data/mariadb/data
    log-error = /data/mariadb/log/mariadberr.log
    pid-file = /data/mariadb/run/mariadb.pid
    socket = /data/mariadb/tmp/mysql.sock
    
    #
    # * Galera-related settings
    #
    [galera]
    # Mandatory settings
    #wsrep_on=ON
    #wsrep_provider=
    #wsrep_cluster_address=
    #binlog_format=row
    #default_storage_engine=InnoDB
    #innodb_autoinc_lock_mode=2
    #
    # Allow server to accept connections on all interfaces.
    #
    #bind-address=0.0.0.0
    #
    # Optional setting
    #wsrep_slave_threads=1
    #innodb_flush_log_at_trx_commit=0
    
    # this is only for embedded server
    [embedded]
    
    # This group is only read by MariaDB servers, not by MySQL.
    # If you use the same .cnf file for MySQL and MariaDB,
    # you can put MariaDB-only options here
    [mariadb]
    
    # This group is only read by MariaDB-10.5 servers.
    # If you use the same .cnf file for MariaDB of different versions,
    # use this group for options that older servers don't understand
    [mariadb-10.5]
    
    [root@superman-21 ~]# 
    
  2. 在root权限下启动mariadb服务器。

    # systemctl start mariadb
    

    例如示例命令如下:

    [root@superman-21 ~]# systemctl start mariadb.service
    [root@superman-21 ~]# 
    [root@superman-21 ~]# ll /data/mariadb/data/
    总用量 122920
    -rw-rw---- 1 mysql mysql     24576 1220 17:03 aria_log.00000001
    -rw-rw---- 1 mysql mysql        52 1220 17:03 aria_log_control
    -rw-rw---- 1 mysql mysql       972 1220 17:03 ib_buffer_pool
    -rw-rw---- 1 mysql mysql  12582912 1220 17:03 ibdata1
    -rw-rw---- 1 mysql mysql 100663296 1220 17:03 ib_logfile0
    -rw-rw---- 1 mysql mysql  12582912 1220 17:03 ibtmp1
    -rw-rw---- 1 mysql mysql         0 1220 17:03 multi-master.info
    drwx------ 2 mysql mysql      4096 1220 17:03 mysql
    -rw-rw---- 1 mysql mysql        16 1220 17:03 mysql_upgrade_info
    drwx------ 2 mysql mysql        20 1220 17:03 performance_schema
    [root@superman-21 ~]# 
    [root@superman-21 ~]# ll /data/mariadb/log/
    总用量 4
    -rw-rw---- 1 mysql mysql 1578 1220 17:03 mariadberr.log
    [root@superman-21 ~]# 
    [root@superman-21 ~]# ll /data/mariadb/run/
    总用量 4
    -rw-rw---- 1 mysql mysql 5 1220 17:03 mariadb.pid
    [root@superman-21 ~]# 
    [root@superman-21 ~]# ll /data/mariadb/tmp/
    总用量 0
    srwxrwxrwx 1 mysql mysql 0 1220 17:03 mysql.sock
    [root@superman-21 ~]# 
    
  3. 设置socket软连接。

    # ln -s /data/mariadb/tmp/mysql.sock /var/lib/mysql/mysql.sock
    

    例如示例命令如下:

    [root@superman-21 ~]# ln -s /data/mariadb/tmp/mysql.sock /var/lib/mysql/mysql.sock
    [root@superman-21 ~]# 
    
  4. 在root权限下安全初始化数据库。

    # /usr/bin/mysql_secure_installation
    

    命令执行过程中需要输入数据库的root设置的密码,若没有密码则直接按“Enter”。然后根据提示及实际情况进行设置。

    例如示例命令如下:

    [root@superman-21 ~]# /usr/bin/mysql_secure_installation
    
    NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
          SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
    
    In order to log into MariaDB to secure it, we'll need the current
    password for the root user. If you've just installed MariaDB, and
    haven't set the root password yet, you should just press enter here.
    
    Enter current password for root (enter for none): 
    OK, successfully used password, moving on...
    
    Setting the root password or using the unix_socket ensures that nobody
    can log into the MariaDB root user without the proper authorisation.
    
    You already have your root account protected, so you can safely answer 'n'.
    
    Switch to unix_socket authentication [Y/n] n
     ... skipping.
    
    You already have your root account protected, so you can safely answer 'n'.
    
    Change the root password? [Y/n] Y
    New password: 
    Re-enter new password: 
    Password updated successfully!
    Reloading privilege tables..
     ... Success!
    
    
    By default, a MariaDB installation has an anonymous user, allowing anyone
    to log into MariaDB without having to have a user account created for
    them.  This is intended only for testing, and to make the installation
    go a bit smoother.  You should remove them before moving into a
    production environment.
    
    Remove anonymous users? [Y/n] Y
     ... Success!
    
    Normally, root should only be allowed to connect from 'localhost'.  This
    ensures that someone cannot guess at the root password from the network.
    
    Disallow root login remotely? [Y/n] Y
     ... Success!
    
    By default, MariaDB comes with a database named 'test' that anyone can
    access.  This is also intended only for testing, and should be removed
    before moving into a production environment.
    
    Remove test database and access to it? [Y/n] Y
     - Dropping test database...
     ... Success!
     - Removing privileges on test database...
     ... Success!
    
    Reloading the privilege tables will ensure that all changes made so far
    will take effect immediately.
    
    Reload privilege tables now? [Y/n] Y
     ... Success!
    
    Cleaning up...
    
    All done!  If you've completed all of the above steps, your MariaDB
    installation should now be secure.
    
    Thanks for using MariaDB!
    [root@superman-21 ~]#
    
  5. 登录数据库。

    # mysql -u root -p
    

    命令执行后提示输入密码。密码为4中设置的密码。

    image-20221219190513462 说明:
    执行 \q 或者 exit 可退出数据库。

    例如示例命令如下:

    [root@superman-21 ~]# mysql -u root -p
    Enter password: 
    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 11
    Server version: 10.5.16-MariaDB MariaDB Server
    
    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    MariaDB [(none)]> 
    MariaDB [(none)]> \q
    Bye
    [root@superman-21 ~]# 
    [root@superman-21 ~]# mysql -u root -p
    Enter password: 
    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 12
    Server version: 10.5.16-MariaDB MariaDB Server
    
    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    MariaDB [(none)]> exit
    Bye
    [root@superman-21 ~]# 
    

56.3 卸载

  1. 在root权限下关闭数据库进程。

    # systemctl stop mariadb
    

    例如示例命令如下:

    [root@superman-21 ~]# systemctl stop mariadb
    [root@superman-21 ~]# 
    
  2. 在root权限下执行dnf remove mariadb-server命令卸载mariadb。

    # dnf remove mariadb-server
    

    例如示例命令如下:

    [root@superman-21 ~]# dnf remove mariadb-server
    Dependencies resolved.
    =============================================================================================================================
     Package                             Architecture         Version                            Repository                 Size
    =============================================================================================================================
    Removing:
     mariadb-server                      x86_64               4:10.5.16-1.oe2203                 @update                    91 M
    Removing unused dependencies:
     mariadb                             x86_64               4:10.5.16-1.oe2203                 @update                    38 M
     mariadb-backup                      x86_64               4:10.5.16-1.oe2203                 @update                    27 M
     mariadb-common                      x86_64               4:10.5.16-1.oe2203                 @update                   179 k
     mariadb-config                      x86_64               4:10.5.16-1.oe2203                 @update                   345  
     mariadb-errmsg                      x86_64               4:10.5.16-1.oe2203                 @update                   2.6 M
     mariadb-gssapi-server               x86_64               4:10.5.16-1.oe2203                 @update                    19 k
     mariadb-server-utils                x86_64               4:10.5.16-1.oe2203                 @update                   7.3 M
     mysql-selinux                       noarch               1.0.0-2.oe2203                     @everything                49 k
     perl-DBD-MariaDB                    x86_64               1.21-3.oe2203                      @OS                       356 k
     perl-DBI                            x86_64               1.643-3.oe2203                     @update                   1.6 M
    
    Transaction Summary
    =============================================================================================================================
    Remove  11 Packages
    
    Freed space: 168 M
    Is this ok [y/N]: y
    Running transaction check
    Transaction check succeeded.
    Running transaction test
    Transaction test succeeded.
    Running transaction
      Preparing        :                                                                                                     1/1 
      Running scriptlet: mariadb-gssapi-server-4:10.5.16-1.oe2203.x86_64                                                     1/1 
      Erasing          : mariadb-gssapi-server-4:10.5.16-1.oe2203.x86_64                                                    1/11 
      Erasing          : mariadb-backup-4:10.5.16-1.oe2203.x86_64                                                           2/11 
      Running scriptlet: mariadb-server-4:10.5.16-1.oe2203.x86_64                                                           3/11 
      Erasing          : mariadb-server-4:10.5.16-1.oe2203.x86_64                                                           3/11 
    警告:/etc/my.cnf.d/mariadb-server.cnf 已另存为 /etc/my.cnf.d/mariadb-server.cnf.rpmsave
    
      Running scriptlet: mariadb-server-4:10.5.16-1.oe2203.x86_64                                                           3/11 
      Erasing          : mariadb-4:10.5.16-1.oe2203.x86_64                                                                  4/11 
      Erasing          : mariadb-server-utils-4:10.5.16-1.oe2203.x86_64                                                     5/11 
      Erasing          : mariadb-errmsg-4:10.5.16-1.oe2203.x86_64                                                           6/11 
      Erasing          : mariadb-common-4:10.5.16-1.oe2203.x86_64                                                           7/11 
      Erasing          : mariadb-config-4:10.5.16-1.oe2203.x86_64                                                           8/11 
    警告:/etc/my.cnf 已另存为 /etc/my.cnf.rpmsave
    
      Erasing          : mysql-selinux-1.0.0-2.oe2203.noarch                                                                9/11 
      Running scriptlet: mysql-selinux-1.0.0-2.oe2203.noarch                                                                9/11 
    libsemanage.semanage_direct_remove_key: mysql module at priority 100 is now active.
    
      Erasing          : perl-DBD-MariaDB-1.21-3.oe2203.x86_64                                                             10/11 
      Running scriptlet: perl-DBI-1.643-3.oe2203.x86_64                                                                    11/11 
      Erasing          : perl-DBI-1.643-3.oe2203.x86_64                                                                    11/11 
      Running scriptlet: perl-DBI-1.643-3.oe2203.x86_64                                                                    11/11 
      Verifying        : mariadb-4:10.5.16-1.oe2203.x86_64                                                                  1/11 
      Verifying        : mariadb-backup-4:10.5.16-1.oe2203.x86_64                                                           2/11 
      Verifying        : mariadb-common-4:10.5.16-1.oe2203.x86_64                                                           3/11 
      Verifying        : mariadb-config-4:10.5.16-1.oe2203.x86_64                                                           4/11 
      Verifying        : mariadb-errmsg-4:10.5.16-1.oe2203.x86_64                                                           5/11 
      Verifying        : mariadb-gssapi-server-4:10.5.16-1.oe2203.x86_64                                                    6/11 
      Verifying        : mariadb-server-4:10.5.16-1.oe2203.x86_64                                                           7/11 
      Verifying        : mariadb-server-utils-4:10.5.16-1.oe2203.x86_64                                                     8/11 
      Verifying        : mysql-selinux-1.0.0-2.oe2203.noarch                                                                9/11 
      Verifying        : perl-DBD-MariaDB-1.21-3.oe2203.x86_64                                                             10/11 
      Verifying        : perl-DBI-1.643-3.oe2203.x86_64                                                                    11/11 
    
    Removed:
      mariadb-4:10.5.16-1.oe2203.x86_64                         mariadb-backup-4:10.5.16-1.oe2203.x86_64                        
      mariadb-common-4:10.5.16-1.oe2203.x86_64                  mariadb-config-4:10.5.16-1.oe2203.x86_64                        
      mariadb-errmsg-4:10.5.16-1.oe2203.x86_64                  mariadb-gssapi-server-4:10.5.16-1.oe2203.x86_64                 
      mariadb-server-4:10.5.16-1.oe2203.x86_64                  mariadb-server-utils-4:10.5.16-1.oe2203.x86_64                  
      mysql-selinux-1.0.0-2.oe2203.noarch                       perl-DBD-MariaDB-1.21-3.oe2203.x86_64                           
      perl-DBI-1.643-3.oe2203.x86_64                           
    
    Complete!
    [root@superman-21 ~]# 
    

👍 点赞,你的认可是我创作的动力!

⭐️ 收藏,你的青睐是我努力的方向!

✏️ 评论,你的意见是我进步的财富!

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/435843.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【SpringBoot】1、SpringBoot整合JWT实现Token验证

这里写目录标题 1.单点登录1.1 单系统登录1.1.1 单系统登录流程(使用Session实现单系统登录) 1.2 多系统(单点)登录1.2.1 单点登录实现方案1.2.1.1 Session跨域1.2.1.2 Spring Session共享 1.3 Token机制1.3.1 传统身份认证1.3.2 基于Token的身份认证 1.4 JWT机制1.4.1 JWT数据…

Redis集群部署详解

文章目录 集群环境集群搭建测试集群故障转移集群扩容集群缩容 集群环境 集群介绍 1.什么是集群 所谓的集群,就是通过增加服务器的数量,提供相同的服务,从而让服务器达到一个稳定、高效的状态。 2.使用redis集群的必要性 单个redis存在不稳定…

9.6 数组的指针和指向数组的指针变量 - 3

9.6 数组的指针和指向数组的指针变量 - 3 一.回顾二维数组和多维数组的概念二.指向多维数组的指针和指针变量探究1.a:二维数组名,也是整个二维数组的首地址。我们可以认为是第0行的首地址是10002.a1 , a2 分别代表第一行首地址和第二行首地址。3.这表示a[0],a[1],a[…

Mapbox-gl.js v2.13.0 扩展支持4326,4490坐标系

mapbox-gl.js新版本中,支持多种projection 显示效果也不错,根据tiles grid可以看到,还是web_mercator的格网,基于图片做了一定的拉伸形变,想要加载4326的切片格网,依然无法实现。 后来在网上搜索加载4326切…

【JavaWeb】后端(Maven+SpringBoot+HTTP+Tomcat)

目录 一、Maven1.什么是Maven?2.Maven的作用?3.介绍4.安装5.IDEA集成Maven6.IDEA创建Maven项目7.IDEA导入Maven项目8.依赖配置9.依赖传递10.依赖范围11.生命周期 二、SpringBoot1.Spring2.SpringBoot3.SpringBootWeb快速入门 二、HTTP1.HTTP-概述2.HTTP-请求协议3.HTTP-响应协…

【转行互联网】转行互联网必看答疑

课程 追忆寻梦-转行互联网必备知识 https://edu.csdn.net/course/detail/31180 2023年,迟来的编程私教服务 https://bbs.csdn.net/topics/613231237 优先 必读文章 初学者,打算改行学编程,怎么学习java?求指教。https://bb…

如何抓住IT行业最后的红利?网络安全为什么是风口行业?

前言 “没有网络安全就没有国家安全”。当前,网络安全已被提升到国家战略的高度,成为影响国家安全、社会稳定至关重要的因素之一。 网络安全行业特点 1、就业薪资非常高,涨薪快 2021年猎聘网发布网络安全行业就业薪资行业最高人均33.77万…

C语言指针及数组的运行原理

C语言指针及数组的运行原理 文章目录 C语言指针及数组的运行原理一. 指针(汇编角度)二. 数组(汇编角度)2.1 数组的定义2.2 指针与数组结合 三. 指令解释参考3.1 nop3.2 leave3.3 ret 这里涉及汇编,虚拟机这边采用的是6…

如何在 Google Cloud 上部署 EMQX 企业版

Google Cloud 的 IoT Core 产品将于 2023 年 8 月 16 日停止服务,随着这一日期的临近,许多用户正在为他们现有的物联网业务寻找新的解决方案,而 EMQX 企业版是实现这一目标的理想选择。 EMQX 企业版是一款大规模分布式 MQTT 消息服务平台&am…

【设计模式】深入浅出--外观模式

文章目录 前言一、外观模式介绍二、案例场景三、外观模式优缺点四、外观模式应用场景总结 前言 不知道大家有没有比较过自己泡茶和去茶馆喝茶的区别,如果是自己泡茶需要自行准备茶叶、茶具和开水,而去茶馆喝茶,最简单的方式就是跟茶馆服务员…

高效的配置文件读取工具支持properties和yaml

JefConfig 前言 日常工作中不知道到大家有没有遇到以下几种情况: 1、在程序启动时需要加载配置文件,但是发现程序只能从固定位置读取配置文件。 2、程序在集成了spring框架后,想从配置文件中获取某个配置,但是发现当前程序并未交…

并查集原理及代码实现

并查集 首先要明确的是并查集是森林。由多棵树组成。 并查集 (英文:Disjoint-set data structure,直译为不交集数据结构),用于处理一些 不交集 (Disjoint sets,一系列没有重复元素的集合&…

android framework-SystemServer进程

SystemServer进程信息 一、SystemServer整体时序图 涉及源码路径: android-10.0.0_r41\frameworks\base\core\java\com\android\internal\os\ZygoteInit.java android-10.0.0_r41\frameworks\base\core\java\com\android\internal\os\Zygote.java android-10.0.0_r4…

JAVAWeb07-WEB 开发通信协议-HTTP 协议-关联篇

1. 概述 1.1 官方文档及示例说明 1.1.1 请求头 1.1.2 响应头 1.1.3 HTTP 响应状态码 HTTP状态码 当浏览者访问一个网页时,浏览者的浏览器会向网页所在服务器发出请求。当浏览器接收并显示网页前,此网页所在的服务器会返回一个包含HTTP状态码的信息头&a…

leetcode 1372. Longest ZigZag Path in a Binary Tree(二叉树中最长的之字形路径)

找出最长的之字型路径长度。 可以选择从二叉树的任意一个节点出发。 路径长度为路径中的节点数-1. 思路: 符合DFS的特征。 方向是左右交替的,可以定义0,1两个方向。 如果当前方向是左,下一方向就是右,反之亦然。每次…

FinClip|小程序云开发的那点事儿

在开发一个小程序时,除了考虑界面功能逻辑外,还需要后端的数据支持,开发者需要提前考虑服务器、存储和数据库等相关需求的支持能力,此外还可能需要花费时间精力在部署应用、和依赖服务的建设上。 因此,微信小程序为了…

dolphinscheduler3.1.3版本代码编译运行方法

说明 该文档适用于dolphinscheduler 3.1.3-release版本。 一 环境准备 需要使用的环境包括JDK1.8,以及Maven 3.6以上的版本,这里使用低于3.6版本的Maven也可以调试运行,不过在打包的时候会有报错,最好使用高版本的maven。 二 …

数字IC笔试面试常考问题及答案汇总(内含各岗位大厂题目)

经历了无数的笔试面试之后,不知道大家有没有发现数字IC的笔试面试还是有很多共通之处和规律可循的。所以一定要掌握笔试面试常考的问题。 数字IC笔试面试常考问题及答案汇总(文末可领全部哦~) 验证方向(部分题目) Q1…

android studio APP工程的项目结构说明及创建

目录 1.APP工程的项目结构图 2.功能说明 2.1app 2.2Gradle Scripts 3.创建新的APP页面 补充: 1.APP工程的项目结构图 2.功能说明 该项目下两个分类:一个是app(代表app模块);另一个是Gradle Scripts。 2.1app app下面有3个…

虚拟机安装Centos7,ping不通百度

虚拟机安装Centos7,ping不通百度 一、虚拟机网络配置 网络适配器选择桥接模式,不勾选复制物理网络连接状态。 同时虚拟机使用默认配置都是桥接。 二、配置静态IP 1、首先,查看宿主机的IP和网关 2、配置静态ip的文件地址及修改命令如下&…