keepalived

news2025/1/20 3:52:59

文章目录

      • 一、suse系统安装keepalived
        • 1.1、准备环境
        • 1.2、修改主机名
        • 1.3、关闭防火墙
        • 1.4、配置网络
        • 1.5、配置 yum 源
        • 1.6、安装 mysql
        • 1.7、安装 keepalived
        • 报错信息:
          • 使用 wget 下载keepalived 报错
          • 解决 使用 wget 下载 keepalived的报错

一、suse系统安装keepalived

1.1、准备环境

操作系统IP应用软件VIP
SUSE192.168.192.150mysql
keepalived
192.168.192.100

1.2、修改主机名

linux-40pb:~ # hostnamectl set-hostname suse  # 修改主机名为:suse
linux-40pb:~ # 
linux-40pb:~ # bash
suse:~ # 
suse:~ # cat /etc/os-release   # 查看系统版本信息
NAME="SLES"
VERSION="12-SP5"
VERSION_ID="12.5"
PRETTY_NAME="SUSE Linux Enterprise Server 12 SP5"
ID="sles"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:12:sp5"
suse:~ # 
suse:~ # uname -m  # 输出主机的硬件架构名称
x86_64
suse:~ # 

1.3、关闭防火墙

suse:~ # systemctl status SuSEfirewall2  # 查看防火墙状态
● SuSEfirewall2.service - SuSEfirewall2 phase 2
   Loaded: loaded (/usr/lib/systemd/system/SuSEfirewall2.service; enabled; vendor preset: disabled)
   Active: active (exited) since Sat 2023-07-08 08:28:07 CST; 3s ago
  Process: 2374 ExecStart=/usr/sbin/SuSEfirewall2 boot_setup (code=exited, status=0/SUCCESS)
 Main PID: 2374 (code=exited, status=0/SUCCESS)

Jul 08 08:28:06 suse systemd[1]: Starting SuSEfirewall2 phase 2...
Jul 08 08:28:06 suse SuSEfirewall2[2374]: Setting up rules from /etc/sysconfig/SuSEfirewall2 ...
Jul 08 08:28:06 suse SuSEfirewall2[2374]: using default zone 'ext' for interface eth0
Jul 08 08:28:07 suse SuSEfirewall2[2374]: Firewall rules successfully set
Jul 08 08:28:07 suse systemd[1]: Started SuSEfirewall2 phase 2.
suse:~ # 

suse:~ # systemctl disable --now SuSEfirewall2  # 关闭防火墙,并关闭开机自启功能
Removed symlink /etc/systemd/system/multi-user.target.wants/SuSEfirewall2.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/SuSEfirewall2_init.service.
Removed symlink /etc/systemd/system/SuSEfirewall2_setup.service.
Failed to stop SuSEfirewall2_setup.service: Unit SuSEfirewall2_setup.service not loaded.
suse:~ # 
suse:~ # systemctl status SuSEfirewall2 #  查看防火墙状态
● SuSEfirewall2.service - SuSEfirewall2 phase 2
   Loaded: loaded (/usr/lib/systemd/system/SuSEfirewall2.service; disabled; vendor preset: disabled)
   Active: inactive (dead)

Jul 08 08:28:06 suse systemd[1]: Starting SuSEfirewall2 phase 2...
Jul 08 08:28:06 suse SuSEfirewall2[2374]: Setting up rules from /etc/sysconfig/SuSEfirewall2 ...
Jul 08 08:28:06 suse SuSEfirewall2[2374]: using default zone 'ext' for interface eth0
Jul 08 08:28:07 suse SuSEfirewall2[2374]: Firewall rules successfully set
Jul 08 08:28:07 suse systemd[1]: Started SuSEfirewall2 phase 2.
Jul 08 08:29:04 suse systemd[1]: Stopping SuSEfirewall2 phase 2...
Jul 08 08:29:04 suse systemd[1]: Stopped SuSEfirewall2 phase 2.
suse:~ # 

1.4、配置网络

suse:~ # ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:70:2e:ec brd ff:ff:ff:ff:ff:ff
    inet 192.168.192.150/24 brd 192.168.192.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe70:2eec/64 scope link 
       valid_lft forever preferred_lft forever
suse:~ # 
suse:~ # cd /etc/sysconfig/network/
suse:/etc/sysconfig/network # ll
total 68
-rw-r--r-- 1 root root  9692 Apr 17 02:24 config
-rw-r--r-- 1 root root 14432 Apr 17 02:24 dhcp
drwxr-xr-x 1 root root    40 Apr 17 02:23 if-down.d
drwxr-xr-x 1 root root    66 Apr 17 02:23 if-up.d
-rw-r--r-- 1 root root   149 Jul  8 09:38 ifcfg-eth0
-rw------- 1 root root   147 Apr 17 02:24 ifcfg-lo
-rw-r--r-- 1 root root 21738 Oct 14  2016 ifcfg.template
drwx------ 1 root root     0 Jun 27  2017 providers
-rw-r--r-- 1 root root    29 Jul  8 09:35 routes
drwxr-xr-x 1 root root   206 Apr 17 02:23 scripts
suse:/etc/sysconfig/network # 
suse:/etc/sysconfig/network # cp ifcfg-eth0 ifcfg-eth0_bak # 备份
suse:/etc/sysconfig/network # vi ifcfg-eth0
BOOTPROTO='static'  # 静态IP
BROADCAST='192.168.192.255'  # 广播地址
IPADDR='192.168.192.150'  # IP地址
NAME='eth0'   # 网卡名
NETMASK='255.255.255.0'   #  子网掩码
NETWORK='192.168.192.0'  # 网络地址
STARTMODE='auto'  #  开机启动网络
suse:/etc/sysconfig/network #
suse:/etc/sysconfig/network # cp routes routes_bak # 备份
suse:/etc/sysconfig/network # vi  routes # 配置网关
default 192.168.192.2 - eth0 
suse:/etc/sysconfig/network # 
suse:~ # tail -5 /etc/resolv.conf
# file and in case of a "netconfig update -f" call.
#
### Please remove (at least) this line when you modify the file!
nameserver 8.8.8.8  # 配置 DNS
nameserver 8.8.4.4  # 配置 DNS
suse:~ # 
suse:~ # ping www.baidu.com -w 3  # 测试能否 ping 通外网
PING www.a.shifen.com (180.101.50.242) 56(84) bytes of data.
64 bytes from 180.101.50.242: icmp_seq=1 ttl=128 time=15.7 ms
64 bytes from 180.101.50.242: icmp_seq=2 ttl=128 time=15.6 ms
64 bytes from 180.101.50.242: icmp_seq=3 ttl=128 time=15.9 ms

--- www.a.shifen.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 15.683/15.780/15.936/0.182 ms
suse:~ # 
# 如果 ping 不通外网排查一下网关问题

1.5、配置 yum 源

suse:~ # cd /etc/zypp/repos.d/
suse:/etc/zypp/repos.d # 
suse:/etc/zypp/repos.d # ls
SLES12-SP5-12.5-0.repo
suse:/etc/zypp/repos.d # mv SLES12-SP5-12.5-0.repo{,_bak}
suse:/etc/zypp/repos.d # 
suse:/etc/zypp/repos.d # ls
SLES12-SP5-12.5-0.repo_bak
suse:/etc/zypp/repos.d # vim xxx.repo # 添加一下内容
[suse]
name=suse
baseurl=file:///mnt
gpgcheck=0
enabled=1
suse:/etc/zypp/repos.d # 
suse:/etc/zypp/repos.d # mount /dev/cdrom /mnt/  # 挂载磁盘
mount: /mnt: WARNING: device write-protected, mounted read-only.
suse:/etc/zypp/repos.d # 
suse:/etc/zypp/repos.d # df -h | grep /mnt
/dev/sr0        3.9G  3.9G     0 100% /mnt
suse:/etc/zypp/repos.d # 
suse:~ # zypper lr  # 列出本地源
Repository priorities are without effect. All enabled repositories share the same priority.

# | Alias | Name | Enabled | GPG Check | Refresh
--+-------+------+---------+-----------+--------
1 | suse  | suse | Yes     | (  ) No   | No     
suse:~ # 

# 测试是否已配置好 yum 源,下载 wget 命令是否能下载下来。
suse:~ # rpm -qa | grep wget
suse:~ # 
suse:~ # rpm -qa | grep wget  # 查看是否已安装 wget
suse:~ # 
suse:~ # zypper se wget  # 搜索软件包名为:wget
Loading repository data...
Reading installed packages...

S | Name | Summary                                   | Type      
--+------+-------------------------------------------+-----------
  | wget | A Tool for Mirroring FTP and HTTP Servers | package   
  | wget | A Tool for Mirroring FTP and HTTP Servers | srcpackage
suse:~ # 
suse:~ # zypper in wget  # 安装 wget 命令
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW package is going to be installed:
  wget

1 new package to install.
Overall download size: 494.3 KiB. Already cached: 0 B. After the operation, additional 2.0 MiB will be used.
Continue? [y/n/...? shows all options] (y): y  # 输入 y
Retrieving package wget-1.14-21.10.1.x86_64                                                                     (1/1), 494.3 KiB (  2.0 MiB unpacked)
Checking for file conflicts: ..................................................................................................................[done]
(1/1) Installing: wget-1.14-21.10.1.x86_64 ....................................................................................................[done]
suse:~ # 
suse:~ # rpm -qa | grep wget  # 查看是否已安装 wget
wget-1.14-21.10.1.x86_64
suse:~ # 

1.6、安装 mysql

suse:~ # cd /opt/
suse:/opt # ls
mysql-community-common-8.0.25-1.el7.x86_64.rpm
mysql-community-devel-8.0.25-1.el7.x86_64.rpm
mysql-community-client-8.0.25-1.el7.x86_64.rpm
mysql-community-libs-8.0.25-1.el7.x86_64.rpm
mysql-community-client-plugins-8.0.25-1.el7.x86_64.rpm
mysql-community-server-8.0.25-1.el7.x86_64.rpm
suse:/opt # 
suse:/opt # rpm -ivh mysql-community-common-8.0.25-1.el7.x86_64.rpm
warning: mysql-community-common-8.0.25-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:mysql-community-common-8.0.25-1.e################################# [100%]
suse:/opt # 

suse:/opt # rpm -ivh mysql-community-client-plugins-8.0.25-1.el7.x86_64.rpm 
warning: mysql-community-client-plugins-8.0.25-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:mysql-community-client-plugins-8.################################# [100%]
suse:/opt # rpm -ivh mysql-community-libs-8.0.25-1.el7.x86_64.rpm 
warning: mysql-community-libs-8.0.25-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:mysql-community-libs-8.0.25-1.el7################################# [100%]
suse:/opt # rpm -ivh mysql-community-client-8.0.25-1.el7.x86_64.rpm 
warning: mysql-community-client-8.0.25-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:mysql-community-client-8.0.25-1.e################################# [100%]

suse:/opt # rpm -ivh mysql-community-devel-8.0.25-1.el7.x86_64.rpm
warning: mysql-community-devel-8.0.25-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:mysql-community-devel-8.0.25-1.el################################# [100%]

suse:/opt # rpm -ivh mysql-community-server-8.0.25-1.el7.x86_64.rpm 
warning: mysql-community-server-8.0.25-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:mysql-community-server-8.0.25-1.e################################# [100%]
suse:/opt # 

suse:/opt # systemctl status mysqld  // 查看状态
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
suse:/opt #

suse:/opt # systemctl start mysqld   // 启动MySQL
suse:/opt # systemctl status mysqld  // 查看状态
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2023-07-08 11:09:12 CST; 12s ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 2949 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
 Main PID: 3019 (mysqld)
   Status: "Server is operational"
    Tasks: 38 (limit: 512)
   CGroup: /system.slice/mysqld.service
           └─3019 /usr/sbin/mysqld
suse:/opt # 

1.7、安装 keepalived

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-L3grcJHG-1688786851016)(C:/Users/agan9/AppData/Roaming/Typora/typora-user-images/1688784841868.png)]

# 这里我使用wget 命令下载软件包。或者你下载好之后可以使用xftp传到主机里
suse:/opt # wget https://keepalived.org/software/keepalived-2.2.4.tar.gz
...省略下载过程N

suse:/opt # ll
total 1176
-rw-r--r-- 1 root root 1202602 May 31 18:37 keepalived-2.2.4.tar.gz
suse:/opt # 

# 下载依赖包
suse:~ # zypper in  gcc gcc-c++ make openssl  kernel-devel
Loading repository data...
Reading installed packages...
'openssl' is already installed.
No update candidate for 'openssl-1.0.2p-1.13.noarch'. The highest available version is already installed.
'make' is already installed.
No update candidate for 'make-4.0-4.1.x86_64'. The highest available version is already installed.

The following 19 NEW packages are going to be installed:
  gcc gcc-c++ gcc48 gcc48-c++ glibc-devel kernel-default-devel kernel-devel kernel-macros libasan0 libatomic1 libelf-devel libgomp1 libitm1
  libopenssl-1_0_0-devel libopenssl-devel libstdc++48-devel libtsan0 linux-glibc-devel zlib-devel

19 new packages to install.
Overall download size: 50.8 MiB. Already cached: 0 B. After the operation, additional 147.0 MiB will be used.
Continue? [y/n/...? shows all options] (y): y  # 输入 y
···省略下载过程

suse:~ # cd /opt/
suse:/opt # ll
total 1176
-rw-r--r-- 1 root root 1202602 May 31 18:37 keepalived-2.2.4.tar.gz
suse:/opt # tar xf keepalived-2.2.4.tar.gz  # 解压软件包
suse:/opt # ll
total 1176
drwxrwxr-x 1 1000 1000     412 May 31 18:35 keepalived-2.2.4
-rw-r--r-- 1 root root 1202602 May 31 18:37 keepalived-2.2.4.tar.gz
suse:/opt # 
suse:/opt # cd keepalived-2.2.4/
suse:/opt/keepalived-2.2.4 # 
suse:/opt/keepalived-2.2.4 # ls
AUTHOR        COPYING    Dockerfile.in  Makefile.am  README.md  aclocal.m4  bin_install  build_setup  configure.ac  keepalived          lib  snap
CONTRIBUTORS  ChangeLog  INSTALL        Makefile.in  TODO       autogen.sh  build-aux    configure    doc           keepalived.spec.in  m4   tools
suse:/opt/keepalived-2.2.4 # ./configure --prefix=/usr/local/keepalived # 指定安装路径/usr/local/keepalived
···省略N

suse:/opt/keepalived-2.2.4 # make  执行make命令进行编译
···省略N

suse:/opt/keepalived-2.2.4 # make install # 按Makefile定义好的路径拷贝至安装目录中
···省略N

suse:~ # mkdir -p /etc/keepalived  # 在 /etc/下创建目录名为: keepalived
suse:~ # ll -d /etc/keepalived/
drwxr-xr-x 1 root root 0 Jul  8 10:58 /etc/keepalived/
suse:~ # 

# 复制keepalived.conf  到/etc/keepalived/目录下
suse:~ # cp -r /usr/local/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/
suse:~ # 
suse:~ # ll /etc/keepalived/keepalived.conf -d
-rw-r--r-- 1 root root 3550 Jul  8 10:59 /etc/keepalived/keepalived.conf
suse:~ # 

suse:~ # cd /usr/local/keepalived/
suse:/usr/local/keepalived # ll
total 0
drwxr-xr-x 1 root root 14 Jul  8 10:55 bin
drwxr-xr-x 1 root root 38 Jul  8 10:55 etc
drwxr-xr-x 1 root root 20 Jul  8 10:55 sbin
drwxr-xr-x 1 root root 20 Jul  8 10:55 share
suse:/usr/local/keepalived # 

# 配置 keepalived.conf  文件
suse:~ # cd /etc/keepalived/
suse:/etc/keepalived # cat keepalived.conf 
! Configuration File for keepalived

global_defs {
   router_id test-1
}

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 51
    priority 100
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        192.168.192.100
    }
}
virtual_server 192.168.192.100 3306 {
    delay_loop 6
    lb_algo rr
    lb_kind NAT
    persistence_timeout 50
    protocol TCP

    real_server 192.168.192.150 3306 {
        weight 1
        TCP_CHECK {
        connect_timeout 3
        nb_get_retry 3
        delay_before_retry 3
        connect_port 3306
        }
    }
#    real_server 192.168.192.151 3306 {  # 如果有多个数据库就把注释取消掉
#       weight 1
#        TCP_CHECK {
#        connect_timeout 3
#        nb_get_retry 3
#        delay_before_retry 3
#        connect_port 3306
#        }
#    }
}
suse:/etc/keepalived # 

suse:~ # systemctl daemon-reload # 重新加载
suse:~ # 
suse:~ # systemctl status keepalived.service # 查看状态
● keepalived.service - LVS and VRRP High Availability Monitor
   Loaded: loaded (/usr/lib/systemd/system/keepalived.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:keepalived(8)
           man:keepalived.conf(5)
           man:genhash(1)
           https://keepalived.org
suse:~ # 
suse:~ # systemctl start keepalived.service  # 启动keepalived
suse:~ # 
suse:~ # systemctl status keepalived.service 
● keepalived.service - LVS and VRRP High Availability Monitor
   Loaded: loaded (/usr/lib/systemd/system/keepalived.service; disabled; vendor preset: disabled)
   Active: active (running) since Sat 2023-07-08 11:09:56 CST; 4s ago
     Docs: man:keepalived(8)
           man:keepalived.conf(5)
           man:genhash(1)
           https://keepalived.org
  Process: 44880 ExecStart=/usr/local/keepalived/sbin/keepalived $KEEPALIVED_OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 44881 (keepalived)
    Tasks: 2 (limit: 512)
   CGroup: /system.slice/keepalived.service
           ├─44881 /usr/local/keepalived/sbin/keepalived -D
           └─44882 /usr/local/keepalived/sbin/keepalived -D
···省略N

suse:~ # ip addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:70:2e:ec brd ff:ff:ff:ff:ff:ff
    inet 192.168.192.150/24 brd 192.168.192.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet 192.168.192.100/32 scope global eth0  # VIP
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe70:2eec/64 scope link 
       valid_lft forever preferred_lft forever
suse:~ # 

报错信息:

使用 wget 下载keepalived 报错
# 下载keepalived 报错
suse:/opt # wget https://keepalived.org/software/keepalived-2.2.4.tar.gz
--2023-07-08 10:04:06--  https://keepalived.org/software/keepalived-2.2.4.tar.gz
Resolving keepalived.org (keepalived.org)... 91.121.30.175
Connecting to keepalived.org (keepalived.org)|91.121.30.175|:443... connected.
ERROR: cannot verify keepalived.org's certificate, issued by ‘/C=US/O=Let's Encrypt/CN=R3’:
  Issued certificate has expired.
To connect to keepalived.org insecurely, use `--no-check-certificate'.
解决 使用 wget 下载 keepalived的报错
suse:/opt # wget https://keepalived.org/software/keepalived-2.2.4.tar.gz --no-check-certificate

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

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

相关文章

详解c++---位图模拟实现

目录标题 为什么会有位图一道题了解位图模拟实现位图setresettest构造函数 代码测试关于位图的几道题第一题第二题 第三题 为什么会有位图 通过前面的学习想必大家应该已经了解了哈希表的原理&#xff0c;我们使用两种不同的方法来模拟实现哈希表&#xff0c;第一种方法就是闭…

加拿大访问学者签证如何提升通过率?

加拿大访问学者是许多学者向往的机会&#xff0c;而提高签证通过率则需要注意一些关键因素。下面是知识人网小编整理的一些建议&#xff0c;希望能对您有所帮助。 首先&#xff0c;准备充分的材料是至关重要的。确保您提供了完整、准确的申请材料&#xff0c;包括学历证明、工作…

vue confirm弹窗去掉取消和右上角关闭按钮

this.confirm弹窗去除取消, 右上角x按钮 1.弹窗是显示 使用的是this.confirm弹窗, 去掉右上角的x和取消按钮, 也不能点击空白处关闭 2.修改代码 this.$confirm(this.$t(login.udpatePwdSuccess), this.$t(common.tip), {confirmButtonText: this.$t(button.confirm),showCance…

量化风控算法详解之CatBoost

CatBoost是俄罗斯的搜索巨头Yandex在2017年开源的机器学习库&#xff0c;与XGBoost、LightGBM并称为GBDT三大主流神器库。LightGBM和XGBoost已经在各领域得到了广泛的应用&#xff0c;而Yandex的CatBoost作为后起之秀则是号称比XGBoost和LightGBM在算法准确率等方面表现更为优秀…

【Hello mysql】 mysql数据类型

Mysql专栏&#xff1a;Mysql 本篇博客简介&#xff1a;介绍mysql的数据类型 mysql数据类型 数据类型分类数值类型tinyint类型越界测试bit类型小数类型float类型decimal类型 字符串类型charvarchar 时间和日期类型enum和setenunmset 总结 数据类型分类 为什么要存在数据类型呢&a…

办公难题轻松解决!快速实现文件夹多次复制,轻松节省办公时间

在日常办公中&#xff0c;我们经常遇到需要多次复制文件夹的情况&#xff0c;而繁琐的操作常常令人头疼。但现在&#xff0c;我们为您提供了一款简单易用且高效的解决方案&#xff0c;让您轻松应对复制文件夹的难题&#xff0c;节省宝贵的办公时间&#xff01; 首先我们要进入…

Flask框架之RESTful--参数验证--add_argument方法参数详解

目录 参数验证 参数验证的重要性 Flask-RESTful 参数验证方法 基本用法 1. 使用 reqparse 模块 示例 代码详解 2. 使用 marshmallow 库 示例 代码详解 add_argument方法参数详解 名词解释 代码案例 参数验证 参数验证也叫参数解析 Flask-Restful插件提供了类似W…

Win10任务栏 图标居中

参考&#xff1a;图标居中 1.右键任务栏&#xff0c;将锁定任务栏取消。 2.右键选择工具栏,然后选择新建工具栏。 3.选择一个空的文件夹。 4.将开始菜单旁边的两条线拖到新建工具栏的后面。 5.将图标拉到中间。 6.在新建工具栏的标题上右键&#xff0c;将显示标题取消选择…

cmake流程控制---cmake数学计算操作和if命令

目录 cmake 数学计算操作 demo if命令 基本表达式 逻辑表达式(NOT AND OR) 比较表达式 正则表达式 demo 文件系统相关 判断是否存在的表达式 cmake 数学计算操作 有时候我们需要对cmake变量之间进行数学运算,这时候cmake提供了math()这个命令,命令格式如下: math(…

黑苹果网络经常掉线/无线网卡无法驱动解决办法(itlwm)

适用问题 黑苹果3-5分钟掉一次网&#xff0c;网卡无法驱动(右上角WLAN图标变灰有斜杠) 作者环境 作者笔记本因为Intel网卡太旧且系统支持不稳定&#xff0c;所以经常掉网 在Github上有一款驱动(Airport)itlwm&#xff0c;经OC注入后网络状态稳定 安装方法(OC) 下载 建议在…

阿里云服务器扩容记录

先在控制台选择云盘扩容&#xff0c;然后才能在服务器操作&#xff1a; blkidlsblk -n df -Thapt-get updatetype growpart || apt-get install -y cloud-guest-utilstype sgdisk || apt-get install -y gdiskLC_ALLen_US.UTF-8 growpart /dev/vda 3 resize2fs /dev/vda3

Element+Vue+OpenLayers的项目实战

WebGIS ElementVueOpenLayers的项目实战 使用npm配置开发环境Vue的安装npm安装vue-cli脚手架构建工具安装桥接工具运行项目 使用npm配置开发环境 开发是项目级别的&#xff0c;则需要使用npm来配置开发环境&#xff1b; 使用npm配置开发环境主要包括Vue、Element和OpenLayers的…

PyQt如何查找帮助信息(不会写组件的代码,快看过来!)

1.可以在PyQt6官网中查找信息kReference Guide — PyQt Documentation v6.5.1 看不懂没有关系啦&#xff0c;可以使用网页翻译哒~ 找到或者直接搜索QLabel&#xff0c;寻找对应函数即可 2. https://zetcode.com/pyqt6/ 3.Qt Creator中寻找 例如&#xff0c;输入setText 就可以…

BC 汇率读取问题

今天发现一个奇怪的问题&#xff0c;读去汇率&#xff0c;A账户汇率正常读取&#xff0c;B账户能读取到记录&#xff0c;并且ABAP判断不是初始&#xff0c;但是里面的实际数据都是0 。发现是权限的问题 sm30 经过测试 是以上的权限对象的问题 解决思路 权限对象配起来

如何通过浏览器配置哪些网页不走代理服务器,Lantern开启后部分网页打不开了

浏览器点设置 > 搜索“代理” > “打开计算机的代理设置” > 编辑“使用代理服务器” 搜索“代理” > “打开计算机的代理设置” > 编辑“使用代理服务器”&#xff0c;将不用代理的url链接域名写进来&#xff0c;点击保存。然后刷新打不开的网页&#xff0c;…

Elasticsearch + Kibana+Docker实现词云

需求 实现文件导入es&#xff0c;支持格式TXT、DOC、PPT、XLS、PDF、图片ik分词器远程热更新自定义扩展字典和停用字典Kibana配置词云&#xff0c;并显示对应文档详情和字典频次&#xff0c;且自定义显示字典 技术点 文件导入&#xff1a;es插件ingest-attachment图片文字识…

QT day1简单登录界面

widget.cpp文件代码&#xff1a; #include "widget.h" #include "ui_widget.h"Widget::Widget(QWidget *parent) :QWidget(parent),ui(new Ui::Widget) {qDebug()<<this->size();qDebug()<<this->frameSize();this->setFixedSize(50…

Element Plus el-table 自定义合并行和列

原文链接&#xff1a;Element Plus el-table 自定义合并行和列 前言 目标效果是将表格行数据中某个属性值相同的项合并到一起&#xff0c;效果如下&#xff1a; <el-table :data"tableData" :span-method"spanMethod" style"width: 100%">…

[桌面运维] 显示器 色准,色域,色深,分辨率,带宽,刷新率的基本概念,图像呈现的基本原理

⬜⬜⬜ &#x1f430;&#x1f7e7;&#x1f7e8;&#x1f7e9;&#x1f7e6;&#x1f7ea;(*^▽^*)欢迎光临 &#x1f7e7;&#x1f7e8;&#x1f7e9;&#x1f7e6;&#x1f7ea;&#x1f430;⬜⬜⬜ ✏️write in front✏️ &#x1f4dd;个人主页&#xff1a;陈丹宇jmu &am…

数字创新 融合发展 2023中国国际数字和软件大会在大连开幕

作为数字和软件服务产业一年一度的行业盛宴&#xff0c;为期四天的2023年中国国际数字和软件服务交易会&#xff08;以下简称“数交会”&#xff09;&#xff0c;于7月6日在大连正式拉开帷幕。 本届数交会由商务部、科技部、中国国际贸易促进委员会、辽宁省人民政府主办&#x…