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

使用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
 

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

最佳实践:Websocket 长连接状态如何保持

WebSocket 是一种支持通过单个 TCP 连接进行全双工通信的协议&#xff0c;相较于传统的 HTTP 协议&#xff0c;它更适合需要实时交互的应用场景。此协议在现代 Web 应用中扮演着至关重要的角色&#xff0c;尤其是在需要实时更新和通信的场合下维持持久连接。本文将探讨 WebSock…

前端Vue.js中自定义登录界面切换Tabs组件的开发与应用

前端Vue.js中自定义登录界面切换Tabs组件的开发与应用 摘要&#xff1a; 随着Web应用的不断发展&#xff0c;登录界面的设计变得越来越重要。在登录界面中&#xff0c;切换不同的登录方式&#xff08;如账号登录、验证码登录等&#xff09;是一种常见的需求。本文将介绍一款基…

前端【技术类】资源学习网站整理(那些年的小网站)

学习网站整理 值得分享的视频博主&#xff1a;学习网站链接 百度首页的资源收藏里的截图&#xff08;排列顺序没有任何意义&#xff0c;随性而已~&#xff09;&#xff0c;可根据我标注的关键词百度搜索到这些网站呀&#xff0c;本篇末尾会一一列出来&#xff0c;供大家学习呀 …

Laravel框架: Call to a member function connect() on null 异常报错处理

Laravel框架&#xff1a; Call to a member function connect() on null 异常报错处理 Date: 2024.03.01 21:03:11 author: lijianzhan 原文链接: https://learnku.com/laravel/t/63721 问题&#xff1a; local.ERROR: Call to a member function connect() on null {"…

【洛谷 P9240】[蓝桥杯 2023 省 B] 冶炼金属 题解(二分答案)

[蓝桥杯 2023 省 B] 冶炼金属 题目描述 小蓝有一个神奇的炉子用于将普通金属 O 冶炼成为一种特殊金属 X。这个炉子有一个称作转换率的属性 V V V&#xff0c; V V V 是一个正整数&#xff0c;这意味着消耗 V V V 个普通金属 O 恰好可以冶炼出一个特殊金属 X&#xff0c;当普…

redis03 八种数据类型

思维草图 String类型 字符串类型&#xff0c;是redis中最简单的存储类型&#xff0c;可以包含任何数据&#xff0c;例如jpg图片或者序列化的对象等&#xff0c;底层都是以字节数组形式存储&#xff0c;最大能存储512MB的数据。 常用命令 KEY命名规范 加前缀&#xff0c;分…

适配器模式 详解 设计模式

适配器模式 适配器模式是一种结构型设计模式&#xff0c;其主要作用是解决两个不兼容接口之间的兼容性问题。适配器模式通过引入一个适配器来将一个类的接口转换成客户端所期望的另一个接口&#xff0c;从而让原本由于接口不匹配而无法协同工作的类能够协同工作。 结构 适配…

Revit-二开之创建FilledRegion-(2)

Revit-二开之创建FilledRegion FilledRegion在Revit注释模块中&#xff0c;具体位置如图所示 图中是Revit2018版本 Revit绘制FilledRegion 在此文中我们通过创建矩形填充区域为例 继上图操作后在修改面板中选择【绘制】中的矩形&#xff0c;如下图所示 在空白的平面视图中拖…

2024年领取腾讯云优惠券的方法有哪些?程序员爆肝整理

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

springboot基于web的网上摄影工作室的开发与实现论文

网上摄影工作室 摘要 随着信息技术在管理上越来越深入而广泛的应用&#xff0c;管理信息系统的实施在技术上已逐步成熟。本文介绍了网上摄影工作室的开发全过程。通过分析网上摄影工作室管理的不足&#xff0c;创建了一个计算机管理网上摄影工作室的方案。文章介绍了网上摄影工…

2024最新算法:河马优化算法(Hippopotamus optimization algorithm,HO)求解23个基准函数,提供MATLAB代码

一、河马优化算法 河马优化算法&#xff08;Hippopotamus optimization algorithm&#xff0c;HO&#xff09;由Amiri等人于2024年提出&#xff0c;该算法模拟了河马在河流或池塘中的位置更新、针对捕食者的防御策略以及规避方法。河马优化算法的灵感来自河马生活中观察到的三…

chatgpt-3的文章生成器有哪些?可以批量生成文章的生成器

GPT-3&#xff08;Generative Pre-trained Transformer 3&#xff09;作为人工智能领域的一项重大突破&#xff0c;开启了新一代的文本生成技术。同时市面上也涌现出了一些GPT-3文章生成器&#xff0c;为用户提供了快速、高效地生成各种类型文章的工具。本文将介绍一些中国的GP…

nest.js使用nest-winston日志一

nest-winston文档 nest-winston - npm 参考&#xff1a;nestjs中winston日志模块使用 - 浮的blog - SegmentFault 思否 安装 cnpm install --save nest-winston winstoncnpm install winston-daily-rotate-file 在main.ts中 import { NestFactory } from nestjs/core; im…

HarmonyOS—编译构建概述

编译构建是将应用/服务的源代码、资源、第三方库等&#xff0c;通过编译工具转换为可直接在硬件设备上运行的二进制机器码&#xff0c;然后再将二进制机器码封装为HAP/APP软件包&#xff0c;并为HAP/APP包进行签名的过程。其中&#xff0c;HAP是可以直接运行在模拟器或真机设备…

【数据结构】实现队列

大家好&#xff0c;我是苏貝&#xff0c;本篇博客带大家了解队列&#xff0c;如果你觉得我写的还不错的话&#xff0c;可以给我一个赞&#x1f44d;吗&#xff0c;感谢❤️ 目录 一. 队列的概念及结构二. 队列的实现队列的结构体初始化销毁队尾插入队头删除显示第一个节点的值…

C++菱形继承_多态

&#x1f493;博主CSDN主页:麻辣韭菜-CSDN博客&#x1f493;   ⏩专栏分类&#xff1a;http://t.csdnimg.cn/362T6⏪   &#x1f69a;代码仓库:要相信光/C高阶&#x1f69a;   &#x1f339;关注我&#x1faf5;带你学习更多C知识   &#x1f51d;&#x1f51d; 目录 前言…

【Excel PDF 系列】EasyExcel + iText 库实现 Excel 转换 PDF

你知道的越多&#xff0c;你不知道的越多 点赞再看&#xff0c;养成习惯 如果您有疑问或者见解&#xff0c;欢迎指教&#xff1a; 企鹅&#xff1a;869192208 文章目录 前言转换前后效果引入 pom 配置代码实现定义 ExcelDataVo 对象主方法EasyExcel 监听器 前言 最近遇到生成 …

2024第二次培训:win11系统下使用nginx、JDK、mysql搭建基于vue2、java前后端分离的web应用运行环境

一.背景 公司安排了带徒弟的任务&#xff0c;给培训写点材料。前面分开介绍了mysql、jdk、nginx的安装&#xff0c;都只是零星的介绍&#xff0c;只能算零散的学习。学习了有什么用呢&#xff1f;能解决什么问题&#xff1f;能完成什么工作&#xff1f; 今天我们要用之前的几篇…

TCP/UDP,HTTP、HTTPS存在什么风险会影响到网络安全吗

近年来&#xff0c;随着网络技术的飞速发展&#xff0c;互联网影响人们的方方面面&#xff0c;我们平时也接触到许多以前从未听过的东西&#xff0c;今天德迅云安全就来分享下一些互联网安全知识&#xff0c;讲解一些关于常看到的关于IP, TCP/UDP&#xff0c;HTTP、HTTPS这些名…

Docker自定义JDK镜像并拉取至阿里云镜像仓库全攻略

前言 随着容器技术的日益成熟&#xff0c;Docker已经成为现代软件开发和部署的标配工具。其中&#xff0c;自定义Docker镜像是满足特定项目需求的关键步骤。特别是在Java开发环境中&#xff0c;我们可能需要为不同的项目配置不同版本的JDK。这时&#xff0c;通过Docker自定义J…