centos7单节点部署ceph(mon/mgr/osd/mgr/rgw)

news2024/11/16 19:25:49

使用ceph建议采用多节点多磁盘方式部署,本文章仅作为单节点部署参考,请勿用于生产环境

使用ceph建议采用多节点多磁盘方式部署,本文章仅作为单节点部署参考,请勿用于生产环境

使用ceph建议采用多节点多磁盘方式部署,本文章仅作为单节点部署参考,请勿用于生产环境

1. yum 配置文件添加如下相关源
[root@testserver01 ~]# cat /etc/yum.conf
[epel]
name=CentOS7-epel
baseurl=https://mirrors.aliyun.com/epel/7/x86_64/
gpgcheck=0
enabled=1

[base]
name=CentOS7-OS
baseurl=https://mirrors.aliyun.com/centos/7/os/x86_64/
gpgcheck=0
enabled=1

[nautilus-x86_64]
name=ceph-x86_64
baseurl=https://mirrors.aliyun.com/ceph/rpm-nautilus/el7/x86_64/
gpgcheck=0
enabled=1

[nautilus-noarch]
name=ceph-noarch
baseurl=https://mirrors.aliyun.com/ceph/rpm-nautilus/el7/noarch/
gpgcheck=0
enabled=1

2. 安装ceph mgr依赖的python2-Werkzeug包
[root@testserver01 ~]# rpm -ivh http://rpmfind.net/linux/opensuse/distribution/leap/15.3/repo/oss/noarch/python2-Werkzeug-1.0.1-1.10.noarch.rpm

3. [root@testserver01 ~]# yum install ceph chrony gdisk ceph-radosgw ceph-deploy ceph-mgr-dashboard -y

4. 修改系统参数
[root@testserver01 ~]# sysctl -w kernel.pid_max=4194303; echo 'kernel.pid_max=4194303' >> /etc/sysctl.conf; sysctl -p

5. 添加ceph配置文件
[root@testserver01 ~]# cat /etc/ceph/ceph.conf
[global]
fsid = b080bada-7f10-11ee-8f11-666666666666
mon initial members = testserver01
mon host = 192.168.1.128
public network = 192.168.1.0/24
auth cluster required = cephx
auth service required = cephx
auth client required = cephx
osd pool default pg num = 16
osd pool default pgp num = 16
osd crush update on start=false
osd_pool_default_min_size = 1
mon_osd_down_out_subtree_limit = host
osd_pool_default_size = 1
mon_warn_on_pool_no_redundancy = false
mon_warn_on_insecure_global_id_reclaim_allowed = false

[osd]
osd_scrub_begin_hour = 23
osd_scrub_end_hour = 7

6. 部署mon
[root@testserver01 ~]# ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'
creating /tmp/ceph.mon.keyring
[root@testserver01 ~]# ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *'  --cap mgr 'allow *'
creating /etc/ceph/ceph.client.admin.keyring
[root@testserver01 ~]# ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring
importing contents of /etc/ceph/ceph.client.admin.keyring into /tmp/ceph.mon.keyring
[root@testserver01 ~]# monmaptool --create --add testserver01 192.168.1.128 --fsid b080bada-7f10-11ee-8f11-666666666666 /tmp/monmap
monmaptool: monmap file /tmp/monmap
monmaptool: set fsid to b080bada-7f10-11ee-8f11-666666666666
monmaptool: writing epoch 0 to /tmp/monmap (1 monitors)
[root@testserver01 ~]# ceph-mon --mkfs -i testserver01 --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring
[root@testserver01 ~]# chown ceph.ceph /var/lib/ceph/mon -R
[root@testserver01 ~]# systemctl start ceph-mon@testserver01
system[root@testserver01 ~]# systemctl enable ceph-mon@testserver01
Created symlink from /etc/systemd/system/ceph-mon.target.wants/ceph-mon@testserver01.service to /usr/lib/systemd/system/ceph-mon@.service.
[root@testserver01 ~]# ceph mon enable-msgr2
[root@testserver01 ~]# ceph -s
  cluster:
    id:     b080bada-7f10-11ee-8f11-666666666666
    health: HEALTH_OK

  services:
    mon: 1 daemons, quorum testserver01 (age 43s)
    mgr: no daemons active
    osd: 0 osds: 0 up, 0 in

  data:
    pools:   0 pools, 0 pgs
    objects: 0 objects, 0 B
    usage:   0 B used, 0 B / 0 B avail
    pgs:


7. 部署mgr
[root@testserver01 ~]# mkdir -p /var/lib/ceph/mgr/ceph-testserver01
[root@testserver01 ~]# ceph auth get-or-create mgr.testserver01 mon 'allow profile mgr' osd 'allow *' mds 'allow *' >/var/lib/ceph/mgr/ceph-testserver01/keyring
[root@testserver01 ~]# chown ceph.ceph -R /var/lib/ceph/mgr/
[root@testserver01 ~]# systemctl start ceph-mgr@testserver01
[root@testserver01 ~]# systemctl enable ceph-mgr@testserver01
Created symlink from /etc/systemd/system/ceph-mgr.target.wants/ceph-mgr@testserver01.service to /usr/lib/systemd/system/ceph-mgr@.service.
[root@testserver01 ~]# ceph -s
  cluster:
    id:     b080bada-7f10-11ee-8f11-666666666666
    health: HEALTH_WARN
            OSD count 0 < osd_pool_default_size 1

  services:
    mon: 1 daemons, quorum testserver01 (age 4m)
    mgr: testserver01(active, since 70s)
    osd: 0 osds: 0 up, 0 in

  data:
    pools:   0 pools, 0 pgs
    objects: 0 objects, 0 B
    usage:   0 B used, 0 B / 0 B avail
    pgs:

8. 部署osd
[root@testserver01 ~]# ceph auth get client.bootstrap-osd -o /var/lib/ceph/bootstrap-osd/ceph.keyring
exported keyring for client.bootstrap-osd
[root@testserver01 ~]# sgdisk --zap-all /dev/vdb
Creating new GPT entries.
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
[root@testserver01 ~]# ceph-volume lvm create --bluestore --data /dev/vdb

9. 配置crushmap
[root@testserver01 ~]# ceph osd crush move osd.0 host=testserver01 root=default
moved item id 0 name 'osd.0' to location {host=testserver01,root=default} in crush map
[root@testserver01 ~]# ceph osd crush reweight osd.0 0.01
reweighted item id 0 name 'osd.0' to 0.01 in crush map

10. 创建块存储池
[root@testserver01 ~]# ceph osd pool create rbdpool01 32 32
pool 'rbdpool01' created
[root@testserver01 ~]# ceph osd pool application enable rbdpool01 rbd
enabled application 'rbd' on pool 'rbdpool01'
[root@testserver01 ~]# ceph osd pool ls detail
pool 1 'rbdpool01' replicated size 1 min_size 1 crush_rule 0 object_hash rjenkins pg_num 32 pgp_num 32 autoscale_mode warn last_change 10 flags hashpspool stripe_width 0 application rbd

11. 创建rbd存储块
[root@testserver01 ~]# rbd create rbdpool01/testimg --size 5G
[root@testserver01 ~]# rbd ls -p rbdpool01 -l
NAME    SIZE  PARENT FMT PROT LOCK
testimg 5 GiB          2


12. 添加mds服务
[root@testserver01 ~]# mkdir -p /var/lib/ceph/mds/ceph-testserver01
[root@testserver01 ~]# ceph-authtool --create-keyring /var/lib/ceph/mds/ceph-testserver01/keyring --gen-key -n mds.testserver01
creating /var/lib/ceph/mds/ceph-testserver01/keyring
[root@testserver01 ~]# ceph auth add mds.testserver01 osd 'allow rwx' mds 'allow *' mon 'allow profile mds' -i /var/lib/ceph/mds/ceph-testserver01/keyring
added key for mds.testserver01
[root@testserver01 ~]# chown -R ceph.ceph /var/lib/ceph/
[root@testserver01 ~]# systemctl enable ceph-mds@testserver01
Created symlink from /etc/systemd/system/ceph-mds.target.wants/ceph-mds@testserver01.service to /usr/lib/systemd/system/ceph-mds@.service.
[root@testserver01 ~]# systemctl start ceph-mds@testserver01

13. 添加cephfs存储池
[root@testserver01 ~]# ceph osd pool create cephfs-metadata 16 16
pool 'cephfs-metadata' created
[root@testserver01 ~]# ceph osd pool create cephfs-data 32 32
pool 'cephfs-data' created
[root@testserver01 ~]# ceph fs new cephfs cephfs-metadata cephfs-data
new fs with metadata pool 2 and data pool 3
[root@testserver01 ~]# ceph fs status
cephfs - 0 clients
======
+------+--------+--------------+---------------+-------+-------+
| Rank | State  |     MDS      |    Activity   |  dns  |  inos |
+------+--------+--------------+---------------+-------+-------+
|  0   | active | testserver01 | Reqs:    0 /s |   10  |   13  |
+------+--------+--------------+---------------+-------+-------+
+-----------------+----------+-------+-------+
|       Pool      |   type   |  used | avail |
+-----------------+----------+-------+-------+
| cephfs-metadata | metadata |  512k | 8697M |
|   cephfs-data   |   data   |    0  | 8697M |
+-----------------+----------+-------+-------+
+-------------+
| Standby MDS |
+-------------+
+-------------+
MDS version: ceph version 14.2.22 (ca74598065096e6fcbd8433c8779a2be0c889351) nautilus (stable)
[root@testserver01 ~]#

14. 部署rgw  (默认7480端口)
[root@testserver01 ~]# cp /etc/ceph/ceph.conf /tmp/
[root@testserver01 ~]# cd /tmp
[root@testserver01 tmp]# ceph auth get client.bootstrap-rgw -o ceph.bootstrap-rgw.keyring
exported keyring for client.bootstrap-rgw
[root@testserver01 tmp]# ceph-deploy --overwrite-conf rgw create testserver01
[ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf
[ceph_deploy.cli][INFO  ] Invoked (2.0.1): /usr/bin/ceph-deploy --overwrite-conf rgw create testserver01
[ceph_deploy.cli][INFO  ] ceph-deploy options:
[ceph_deploy.cli][INFO  ]  username                      : None
[ceph_deploy.cli][INFO  ]  verbose                       : False
[ceph_deploy.cli][INFO  ]  rgw                           : [('testserver01', 'rgw.testserver01')]
[ceph_deploy.cli][INFO  ]  overwrite_conf                : True
[ceph_deploy.cli][INFO  ]  subcommand                    : create
[ceph_deploy.cli][INFO  ]  quiet                         : False
[ceph_deploy.cli][INFO  ]  cd_conf                       : <ceph_deploy.conf.cephdeploy.Conf instance at 0x7fca20b03a28>
[ceph_deploy.cli][INFO  ]  cluster                       : ceph
[ceph_deploy.cli][INFO  ]  func                          : <function rgw at 0x7fca21148050>
[ceph_deploy.cli][INFO  ]  ceph_conf                     : None
[ceph_deploy.cli][INFO  ]  default_release               : False
[ceph_deploy.rgw][DEBUG ] Deploying rgw, cluster ceph hosts testserver01:rgw.testserver01
[testserver01][DEBUG ] connected to host: testserver01
[testserver01][DEBUG ] detect platform information from remote host
[testserver01][DEBUG ] detect machine type
[ceph_deploy.rgw][INFO  ] Distro info: CentOS Linux 7.9.2009 Core
[ceph_deploy.rgw][DEBUG ] remote host will use systemd
[ceph_deploy.rgw][DEBUG ] deploying rgw bootstrap to testserver01
[testserver01][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf
[testserver01][WARNIN] rgw keyring does not exist yet, creating one
[testserver01][DEBUG ] create a keyring file
[testserver01][DEBUG ] create path recursively if it doesn't exist
[testserver01][INFO  ] Running command: ceph --cluster ceph --name client.bootstrap-rgw --keyring /var/lib/ceph/bootstrap-rgw/ceph.keyring auth get-or-create client.rgw.testserver01 osd allow rwx mon allow rw -o /var/lib/ceph/radosgw/ceph-rgw.testserver01/keyring
[testserver01][INFO  ] Running command: systemctl enable ceph-radosgw@rgw.testserver01
[testserver01][WARNIN] Created symlink from /etc/systemd/system/ceph-radosgw.target.wants/ceph-radosgw@rgw.testserver01.service to /usr/lib/systemd/system/ceph-radosgw@.service.
[testserver01][INFO  ] Running command: systemctl start ceph-radosgw@rgw.testserver01
[testserver01][INFO  ] Running command: systemctl enable ceph.target
[ceph_deploy.rgw][INFO  ] The Ceph Object Gateway (RGW) is now running on host testserver01 and default port 7480
[root@testserver01 tmp]# radosgw-admin user create --uid=admin --display-name="admin user" --system
{
    "user_id": "admin",
    "display_name": "admin user",
    "email": "",
    "suspended": 0,
    "max_buckets": 1000,
    "subusers": [],
    "keys": [
        {
            "user": "admin",
            "access_key": "7DRHRKOVTQF0EBWHL7LZ",
            "secret_key": "01qnDj58DmWTjQZzCwDv9SLfC6x2bIsWgD2EgHri"
        }
    ],
    "swift_keys": [],
    "caps": [],
    "op_mask": "read, write, delete",
    "system": "true",
    "default_placement": "",
    "default_storage_class": "",
    "placement_tags": [],
    "bucket_quota": {
        "enabled": false,
        "check_on_raw": false,
        "max_size": -1,
        "max_size_kb": 0,
        "max_objects": -1
    },
    "user_quota": {
        "enabled": false,
        "check_on_raw": false,
        "max_size": -1,
        "max_size_kb": 0,
        "max_objects": -1
    },
    "temp_url_keys": [],
    "type": "rgw",
    "mfa_ids": []
}

15. 开启并配置mgr dashboard
[root@testserver01 ~]# ceph mgr module enable prometheus     (开启监控端口,9283端口,需要安装ceph-mgr-dashboard包)

[root@testserver01 ~]# ceph config set mgr mgr/dashboard/ssl false  
[root@testserver01 ~]# ceph mgr module enable dashboard    (关闭dashboard ssl,默认8080端口)
[root@testserver01 tmp]# echo 'passwordxxx' > password.txt
[root@testserver01 tmp]# ceph dashboard ac-user-create admin  administrator -i password.txt
{"username": "admin", "lastUpdate": 1709353417, "name": null, "roles": ["administrator"], "password": "$2b$12$FcEB.KYWVB8BCXaXxu5VJOQbUqwO0KCUOEfi2wgSnmlFPW3RqTQp2", "email": null}

监控端口:

访问mgr dashboard  http://192.168.1.128:8080


16. 配置rgw dashboard
[root@testserver01 tmp]# radosgw-admin user info --uid=admin   (查看ak和sk)

[root@testserver01 tmp]# cat /tmp/a.txt
7DRHRKOVTQF0EBWHL7LZ
[root@testserver01 tmp]# cat /tmp/s.txt
01qnDj58DmWTjQZzCwDv9SLfC6x2bIsWgD2EgHri
[root@testserver01 tmp]# ceph dashboard set-rgw-api-access-key -i a.txt
Option RGW_API_ACCESS_KEY updated
[root@testserver01 tmp]# ceph dashboard set-rgw-api-secret-key -i s.txt
Option RGW_API_SECRET_KEY updated

17. 查看健康状态,osd,pool,crush rule,端口等
[root@testserver01 ~]# ceph -s
  cluster:
    id:     b080bada-7f10-11ee-8f11-666666666666
    health: HEALTH_OK

  services:
    mon: 1 daemons, quorum testserver01 (age 33m)
    mgr: testserver01(active, since 11m)
    mds: cephfs:1 {0=testserver01=up:active}
    osd: 1 osds: 1 up (since 28m), 1 in (since 28m)
    rgw: 1 daemon active (testserver01)

  task status:

  data:
    pools:   7 pools, 144 pgs
    objects: 216 objects, 5.7 KiB
    usage:   1.0 GiB used, 9.0 GiB / 10 GiB avail
    pgs:     144 active+clean

[root@testserver01 ~]# ceph osd df
ID CLASS WEIGHT  REWEIGHT SIZE   RAW USE DATA    OMAP META  AVAIL   %USE  VAR  PGS STATUS
 0   hdd 0.00999  1.00000 10 GiB 1.0 GiB 4.9 MiB  0 B 1 GiB 9.0 GiB 10.05 1.00 144     up
                    TOTAL 10 GiB 1.0 GiB 4.9 MiB  0 B 1 GiB 9.0 GiB 10.05
MIN/MAX VAR: 1.00/1.00  STDDEV: 0
[root@testserver01 ~]# ceph osd pool ls detail
pool 1 'rbdpool01' replicated size 1 min_size 1 crush_rule 0 object_hash rjenkins pg_num 32 pgp_num 32 autoscale_mode warn last_change 28 flags hashpspool,selfmanaged_snaps stripe_width 0 application rbd
        removed_snaps [1~3]
pool 2 'cephfs-metadata' replicated size 1 min_size 1 crush_rule 0 object_hash rjenkins pg_num 16 pgp_num 16 autoscale_mode warn last_change 17 flags hashpspool stripe_width 0 pg_autoscale_bias 4 pg_num_min 16 recovery_priority 5 application cephfs
pool 3 'cephfs-data' replicated size 1 min_size 1 crush_rule 0 object_hash rjenkins pg_num 32 pgp_num 32 autoscale_mode warn last_change 17 flags hashpspool stripe_width 0 application cephfs
pool 4 '.rgw.root' replicated size 1 min_size 1 crush_rule 0 object_hash rjenkins pg_num 16 pgp_num 16 autoscale_mode warn last_change 20 flags hashpspool stripe_width 0 application rgw
pool 5 'default.rgw.control' replicated size 1 min_size 1 crush_rule 0 object_hash rjenkins pg_num 16 pgp_num 16 autoscale_mode warn last_change 22 flags hashpspool stripe_width 0 application rgw
pool 6 'default.rgw.meta' replicated size 1 min_size 1 crush_rule 0 object_hash rjenkins pg_num 16 pgp_num 16 autoscale_mode warn last_change 24 flags hashpspool stripe_width 0 application rgw
pool 7 'default.rgw.log' replicated size 1 min_size 1 crush_rule 0 object_hash rjenkins pg_num 16 pgp_num 16 autoscale_mode warn last_change 26 flags hashpspool stripe_width 0 application rgw

[root@testserver01 ~]# ceph osd crush rule dump
[
    {
        "rule_id": 0,
        "rule_name": "replicated_rule",
        "ruleset": 0,
        "type": 1,
        "min_size": 1,
        "max_size": 10,
        "steps": [
            {
                "op": "take",
                "item": -1,
                "item_name": "default"
            },
            {
                "op": "chooseleaf_firstn",
                "num": 0,
                "type": "host"
            },
            {
                "op": "emit"
            }
        ]
    }
]

[root@testserver01 ~]# netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 192.168.1.128:6809      0.0.0.0:*               LISTEN      2694/ceph-osd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      977/master
tcp        0      0 192.168.1.128:6810      0.0.0.0:*               LISTEN      3037/ceph-mds
tcp        0      0 192.168.1.128:6811      0.0.0.0:*               LISTEN      3037/ceph-mds
tcp        0      0 192.168.1.128:3300      0.0.0.0:*               LISTEN      1944/ceph-mon
tcp        0      0 192.168.1.128:6789      0.0.0.0:*               LISTEN      1944/ceph-mon
tcp        0      0 192.168.1.128:6800      0.0.0.0:*               LISTEN      4480/ceph-mgr
tcp        0      0 192.168.1.128:6801      0.0.0.0:*               LISTEN      4480/ceph-mgr
tcp        0      0 192.168.1.128:6802      0.0.0.0:*               LISTEN      2694/ceph-osd
tcp        0      0 192.168.1.128:6803      0.0.0.0:*               LISTEN      2694/ceph-osd
tcp        0      0 192.168.1.128:6804      0.0.0.0:*               LISTEN      2694/ceph-osd
tcp        0      0 192.168.1.128:6805      0.0.0.0:*               LISTEN      2694/ceph-osd
tcp        0      0 192.168.1.128:6806      0.0.0.0:*               LISTEN      2694/ceph-osd
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      873/sshd
tcp        0      0 192.168.1.128:6807      0.0.0.0:*               LISTEN      2694/ceph-osd
tcp        0      0 0.0.0.0:7480            0.0.0.0:*               LISTEN      3280/radosgw
tcp        0      0 192.168.1.128:6808      0.0.0.0:*               LISTEN      2694/ceph-osd
tcp6       0      0 ::1:25                  :::*                    LISTEN      977/master
tcp6       0      0 :::9283                 :::*                    LISTEN      4480/ceph-mgr
tcp6       0      0 :::8080                 :::*                    LISTEN      4480/ceph-mgr
tcp6       0      0 :::22                   :::*                    LISTEN      873/sshd
tcp6       0      0 :::7480                 :::*                    LISTEN      3280/radosgw
 

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

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

相关文章

2024年2月文章一览

2024年2月编程人总共更新了5篇文章&#xff1a; 1.2024年1月文章一览 2.Programming Abstractions in C阅读笔记&#xff1a;p283-p292 3.Programming Abstractions in C阅读笔记&#xff1a;p293-p302 4.Programming Abstractions in C阅读笔记&#xff1a;p303-p305 5.P…

如何在jupyter notebook 中下载第三方库

在anconda 中找到&#xff1a; Anaconda Prompt 进入页面后的样式&#xff1a; 在黑色框中输入&#xff1a; 下载第三方库的命令 第三方库&#xff1a; 三种输入方式 标准保证正确 pip instsall 包名 -i 镜像源地址 pip install pip 是 Python 包管理工具&#xff0c;…

2024年腾讯云优惠券领取页面_代金券使用方法_新老用户均可

腾讯云代金券领取渠道有哪些&#xff1f;腾讯云官网可以领取、官方媒体账号可以领取代金券、完成任务可以领取代金券&#xff0c;大家也可以在腾讯云百科蹲守代金券&#xff0c;因为腾讯云代金券领取渠道比较分散&#xff0c;腾讯云百科txybk.com专注汇总优惠代金券领取页面&am…

【IC前端虚拟项目】inst_buffer子模块DS与RTL编码

【IC前端虚拟项目】数据搬运指令处理模块前端实现虚拟项目说明-CSDN博客 需要说明一下的是,在我所提供的文档体系里,并没有模块的DS文档哈,因为实际项目里我也不怎么写DS毕竟不是每个公司都和HISI一样对文档要求这么严格的。不过作为一个培训的虚拟项目,还是建议在时间充裕…

PaddleOCR的部署教程(实操环境安装、数据集制作、实际应用案例)

文章目录 前言 PaddleOCR简介 一、PaddleOCR环境搭建 因为我之前安装过cuda和cudnn&#xff0c;查看cuda的版本根据你版本安装合适的paddlepaddle版本&#xff08;之前没有安装过cuda的可以看我这篇文章Ubuntu20.04配置深度学习环境yolov5最简流程&#xff09; 1.创建一个…

ESP32 partitions分区表的配置

由于在使用ESP32会遇到编译出来的bin文件大于分区表的时候&#xff0c;因此需要我们修改分区表或者使用自定义分区表的方式来解决。&#xff08;项目是使用VScode来搭建和调试的&#xff0c;VScode YYDS&#xff09; 具体分区标的含义这里就不讲了&#xff0c;网上有很多文档介…

【MySQL】:高效利用MySQL函数实用指南

&#x1f3a5; 屿小夏 &#xff1a; 个人主页 &#x1f525;个人专栏 &#xff1a; MySQL从入门到进阶 &#x1f304; 莫道桑榆晚&#xff0c;为霞尚满天&#xff01; 文章目录 &#x1f4d1;前言一. MySQL函数概论二. 字符串函数三. 数值函数四. 日期函数五. 流程函数&#x1…

C. Bitwise Operation Wizard

解题思路 可以相同先通过&#xff0c;找出最大值再通过每个数与取或&#xff0c;记录得值最大时的每个数其中的最小值与的最大 import java.io.*; import java.math.BigInteger; import java.util.Arrays; import java.util.BitSet; import java.util.HashMap; import java.ut…

StarRocks实战——携程酒店实时数仓

目录 一、实时数仓 二、实时数仓架构介绍 2.1 Lambda架构 2.2 Kappa架构 三、携程酒店实时数仓架构 3.1 架构选型 3.2 实时计算引擎选型 3.3 OLAP选型 四、携程酒店实时订单 4.1 数据源 4.2 ETL数据处理 4.3 应用效果 4.4 总结 原文大佬的这篇实时数仓建设案例有借…

代码随想录-回溯算法

组合 //未剪枝 class Solution {List<List<Integer>> ans new ArrayList<>();Deque<Integer> path new LinkedList<>();public List<List<Integer>> combine(int n, int k) {backtracking(n, k, 1);return ans;}public void back…

js中浏览器渲染原理

JavaScript&#xff08;JS&#xff09;是一种广泛使用的编程语言&#xff0c;特别是在Web开发中。在浏览器中&#xff0c;JS被用于实现动态网页效果、交互性和用户体验的提升。然而&#xff0c;要理解JS在浏览器中的工作原理&#xff0c;我们首先需要了解浏览器的渲染过程。 浏…

C++之函数,指针

函数 1&#xff0c;函数概述 作用&#xff1a;将一段经常使用的代码封装起来&#xff0c;减少重复代码 一个较大的程序&#xff0c;一般分为若干份程序块&#xff0c;每个模块实现特定的功能 2&#xff0c;函数的定义 函数的定义一般有五个步骤&#xff1a; 1&#xff0c…

【前端素材】推荐优质数医院办公后台管理系统网页Stisla平台模板(附源码)

一、需求分析 在线后台管理系统是指供管理员或运营人员使用的Web应用程序&#xff0c;用于管理和监控网站、应用程序或系统的运行和数据。它通常包括一系列工具和功能&#xff0c;用于管理用户、内容、权限、数据等。下面是关于在线后台管理系统的详细分析&#xff1a; 1、功…

​用细节去解释,如何打造一款行政旗舰车型

高山行政加长版应该是这个级别里最大的几款 MPV 之一了&#xff0c;对于一款较大的车型&#xff0c;其最重要的是解决行驶的便利性。 这次我们就试试魏牌高山行政加长版&#xff0c;从产品本身出发看几个纬度的细节&#xff1a; 行政该如何定义加长后产品的功能变化加长之后到…

ssm172旅行社管理系统的设计与实现

** &#x1f345;点赞收藏关注 → 私信领取本源代码、数据库&#x1f345; 本人在Java毕业设计领域有多年的经验&#xff0c;陆续会更新更多优质的Java实战项目希望你能有所收获&#xff0c;少走一些弯路。&#x1f345;关注我不迷路&#x1f345;** 一 、设计说明 1.1 研究…

深入浅出Redis(零):Redis常用命令的使用

前言 Redis是一款基于键值对的数据结构存储系统&#xff0c;它的特点是基于内存操作、单线程处理命令、IO多路复用模型处理网络请求、键值对存储与简单丰富的数据结构等等 本篇文章作为深入浅出Redis&#xff08;一&#xff09;&#xff1a;对象与数据结构的基础篇&#xff0…

docker自定义镜像与上传

alpine制作jdk镜像 alpine Linux简介 1.Alpine Linux是一个轻型Linux发行版&#xff0c;它不同于通常的Linux发行版&#xff0c;Alpine采用了musl libc 和 BusyBox以减少系统的体积和运行时的资源消耗。 2.Alpine Linux提供了自己的包管理工具&#xff1a;apk(注意&#xff1a;…

修改docker默认存储位置【高版本的docker】

一、修改docker默认存储位置 1、停服务 systemctl stop docker 2、修改/etc/docker/daemon.json添加新的dcoker路径 如"data-root": "/mnt/hdd1/docker" 3、保存后重启服务&#xff1a;systemctl restart docker 二、其他服务的命令 systemctl disab…

4.1.CVAT——目标检测的标注详细步骤

文章目录 1. 进入任务1. 创建任务2. 已创建的task3. 进入标注界面 2. 选择标注类型2.1 选择标注类型2.2 进行标注2.3 遮挡 2.快捷键3.导出标注结果 1. 进入任务 登录后会看到如下图界面&#xff0c;CVAT的标注最小单位是Task&#xff0c;每个Task为一个标注任务。点击Task按钮…

python实现ElGamal算法

ElGamal公钥密码算法是在密码协议中有着重要应用的一类公钥密码算法&#xff0c;基于公钥密码体制和椭圆曲线加密体系&#xff0c;其安全性是基于有限域上离散对数学问题的难解性。至今仍是一个安全性良好的公钥密码算法。既可用于加密又可用于数字签名的公钥密码体制。 数字签…