如何部署cobbler批量安装的服务端

cobbler批量安装

cobbler简介

Cobbler是一个Linux服务器安装的服务,可以通过网络启动(PXE)的方式来快速安装、重装物理服务器和虚拟机,同时还可以管理DHCPDNS等。

Cobbler可以使用命令行方式管理,也提供了基于Web的界面管理工具(cobbler-web),还提供了API接口,可以方便二次开发使用。

Cobbler是较早前的kickstart的升级版,优点是比较容易配置,还自带web界面比较易于管理。

Cobbler内置了一个轻量级配置管理系统,但它也支持和其它配置管理系统集成,如Puppet,暂时不支持SaltStack。

Cobbler(http://cobbler.github.io/)

cobbler集成的服务

  • PXE服务支持
  • DHCP服务管理
  • DNS服务管理(可选bind,dnsmasq)
  • 电源管理
  • Kickstart服务支持
  • YUM仓库管理
  • TFTP(PXE启动时需要)
  • Apache(提供kickstart的安装源,并提供定制化的kickstart配置)

cobbler配置文件详解
cobbler配置文件目录在/etc/cobbler

配置文件作用
/etc/cobbler/settingscobbler 主配置文件
/etc/cobbler/iso/iso模板配置文件
/etc/cobbler/pxepxe模板配置文件
/etc/cobbler/power电源配置文件
/etc/cobbler/user.confweb服务授权配置文件
/etc/cobbler/users.digestweb访问的用户名密码配置文件
/etc/cobbler/dhcp.templatedhcp服务器的的配置模板
/etc/cobbler/dnsmasq.templatedns服务器的配置模板
/etc/cobbler/tftpd.templatetftp服务的配置模板
/etc/cobbler/modules.conf模块的配置文件

cobbler数据目录

目录作用
/var/lib/cobbler/config/用于存放distros,system,profiles等信息配置文件
/var/lib/cobbler/triggers/用于存放用户定义的cobbler命令
/var/lib/cobbler/kickstart/默认存放kickstart文件
/var/lib/cobbler/loaders/存放各种引导程序以及镜像目录
/var/www/cobbler/ks_mirror/导入的发行版系统的所有数据
/var/www/cobbler/images/导入发行版的kernel和initrd镜像用于远程网络启动
/var/www/cobbler/repo_mirror/yum仓库存储目录

cobbler日志文件

日志文件路径说明
/var/log/cobbler/installing客户端安装日志
/var/log/cobbler/cobbler.logcobbler日志

cobbler命令详解

cobbler check       //核对当前设置是否有问题
cobbler list        //列出所有的cobbler元素
cobbler report      //列出元素的详细信息
cobbler sync        //同步配置到数据目录,更改配置最好都要执行下
cobbler reposync    //同步yum仓库
cobbler distro      //查看导入的发行版系统信息
cobbler system      //查看添加的系统信息
cobbler profile     //查看配置信息

cobbler服务端部署

安装cobbler以及相关的软件
[root@cjy ~]# yum -y install httpd dhcp* tftp cobbler xinetd cobbler-web pykickstart
安装过程略....关防火墙启动服务并设置开机自启
[root@cjy ~]# systemctl disable --now firewalld
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@cjy ~]# systemctl enable --now httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
[root@cjy ~]# systemctl enable --now cobblerd
Created symlink /etc/systemd/system/multi-user.target.wants/cobblerd.service → /usr/lib/systemd/system/cobblerd.service.修改server的ip地址为本机ip
设置tftp的ip地址为本机ip
[root@cjy ~]# cd /etc/cobbler/
[root@cjy cobbler]# vim settings
.............................内容省略
server: 192.168.159.148
.............................内容省略
next_server: 192.168.159.148开启tftp
[root@cjy cobbler]# systemctl enable --now tftp
Created symlink /etc/systemd/system/sockets.target.wants/tftp.socket → /usr/lib/systemd/system/tftp.socket.
[root@cjy cobbler]# systemctl status tftp
● tftp.service - Tftp ServerLoaded: loaded (/usr/lib/systemd/system/tftp.service; indirect; vendor preset: disabled)Active: active (running) since Fri 2023-12-22 14:31:28 CST; 13s agoDocs: man:in.tftpdMain PID: 3202 (in.tftpd)Tasks: 1Memory: 100.0KCGroup: /system.slice/tftp.service└─3202 /usr/sbin/in.tftpd -s /var/lib/tftpboot12月 22 14:31:28 cjy systemd[1]: Started Tftp Server.下载缺失文件
[root@cjy cobbler]# cobbler get-loaders
task started: 2023-12-22_143234_get_loaders
task started (id=Download Bootloader Content, time=Fri Dec 22 14:32:34 2023)
running python triggers from /var/lib/cobbler/triggers/task/get_loaders/pre/*
running shell triggers from /var/lib/cobbler/triggers/task/get_loaders/pre/*
shell triggers finished successfully
downloading https://cobbler.github.io/loaders/README to /var/lib/cobbler/loaders/README
downloading https://cobbler.github.io/loaders/COPYING.yaboot to /var/lib/cobbler/loaders/COPYING.yaboot
downloading https://cobbler.github.io/loaders/COPYING.syslinux to /var/lib/cobbler/loaders/COPYING.syslinux
downloading https://cobbler.github.io/loaders/yaboot-1.3.17 to /var/lib/cobbler/loaders/yaboot
downloading https://cobbler.github.io/loaders/pxelinux.0-3.86 to /var/lib/cobbler/loaders/pxelinux.0
downloading https://cobbler.github.io/loaders/menu.c32-3.86 to /var/lib/cobbler/loaders/menu.c32
downloading https://cobbler.github.io/loaders/grub-0.97-x86.efi to /var/lib/cobbler/loaders/grub-x86.efi
downloading https://cobbler.github.io/loaders/grub-0.97-x86_64.efi to /var/lib/cobbler/loaders/grub-x86_64.efi
*** TASK COMPLETE ***启动rsync并设置开机自启
[root@cjy cobbler]# yum -y install rsync-daemon
[root@cjy cobbler]# systemctl enable --now rsyncd
Created symlink /etc/systemd/system/multi-user.target.wants/rsyncd.service → /usr/lib/systemd/system/rsyncd.service.
[root@cjy cobbler]# systemctl status rsyncd
● rsyncd.service - fast remote file copy program daemonLoaded: loaded (/usr/lib/systemd/system/rsyncd.service; enabled; vendor preset: disable>Active: active (running) since Fri 2023-12-22 14:34:33 CST; 9s agoMain PID: 3382 (rsync)Tasks: 1Memory: 184.0KCGroup: /system.slice/rsyncd.service└─3382 /usr/bin/rsync --daemon --no-detach12月 22 14:34:33 cjy systemd[1]: Started fast remote file copy program daemon.
12月 22 14:34:33 cjy rsyncd[3382]: rsyncd version 3.1.3 starting, listening on port 873生成加密的密码
[root@cjy ~]# openssl passwd -1 -salt "$RANDOM" 'shuijiao123!'
$1$14968$0310dZNA/KPEFx33z0GKr.       这是密码加密后的形式将新生成的加密密码加入到配置文件
[root@cjy ~]# vim /etc/cobbler/settings
....    此处为省略内容
default_password_crypted: "$1$14968$0310dZNA/KPEFx33z0GKr."
.....   此处为省略内容重启cobbler
[root@cjy ~]# systemctl restart cobblerd
[root@cjy ~]# ss -antl
State     Recv-Q    Send-Q       Local Address:Port        Peer Address:Port    Process    
LISTEN    0         5                127.0.0.1:25151            0.0.0.0:*                  
LISTEN    0         5                  0.0.0.0:873              0.0.0.0:*                  
LISTEN    0         128                0.0.0.0:22               0.0.0.0:*                  
LISTEN    0         5                127.0.0.1:631              0.0.0.0:*                  
LISTEN    0         511                      *:443                    *:*                  
LISTEN    0         5                     [::]:873                 [::]:*                  
LISTEN    0         511                      *:80                     *:*                  
LISTEN    0         128                   [::]:22                  [::]:*                  
LISTEN    0         5                    [::1]:631                 [::]:*                  通过cobbler check 核对当前设置是否有问题
[root@cjy ~]# cobbler check
The following are potential configuration items that you may want to fix:1: reposync is not installed, install yum-utils or dnf-plugins-core
2: yumdownloader is not installed, install yum-utils or dnf-plugins-core
3: debmirror package is not installed, it will be required to manage debian deployments and repositories
4: fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use themRestart cobblerd and then run 'cobbler sync' to apply changes.
以上四个是关于debian系统的错误
[root@cjy ~]# yum -y install yum-utils
[root@cjy ~]# cobbler check
The following are potential configuration items that you may want to fix:1: debmirror package is not installed, it will be required to manage debian deployments and repositories
2: fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use themRestart cobblerd and then run 'cobbler sync' to apply changes.
以上两个是关于debian系统的错误,请忽略配置cobbler dhcp
修改cobbler配置文件,让cobbler控制dhcp
[root@cjy ~]# vim /etc/cobbler/settings
..............
manage_dhcp: 1
..............配置dhcp
[root@cjy ~]# vim /etc/cobbler/dhcp.template
....    //此处为省略内容
subnet 192.168.159.0 netmask 255.255.255.0 {option routers             192.168.159.148;    此处为本机ipoption domain-name-servers 192.168.159.2;      此处为系统安装好后指定的dns地址option subnet-mask         255.255.255.0;range dynamic-bootp        192.168.159.200 192.168.159.220;   此处为分配的ipdefault-lease-time         21600;max-lease-time             43200;next-server                $next_server;class "pxeclients" {match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";filename "pxelinux.0";}
}....    //此处为省略内容重启服务并同步配置,改完dhcp必须要sync同步配置
[root@cjy ~]# systemctl restart cobblerd
[root@cjy ~]# cobbler sync
task started: 2023-12-22_145814_sync
task started (id=Sync, time=Fri Dec 22 14:58:14 2023)
running python triggers from /var/lib/cobbler/triggers/task/sync/pre/*
running shell triggers from /var/lib/cobbler/triggers/task/sync/pre/*
shell triggers finished successfully
running pre-sync triggers
cleaning trees
removing: /var/lib/tftpboot/grub/system
removing: /var/lib/tftpboot/grub/system_link
removing: /var/lib/tftpboot/grub/images
copying bootloaders
running: ['rsync', '-rpt', '--copy-links', '--exclude=.cobbler_postun_cleanup', '/var/lib/cobbler/loaders/', '/var/lib/tftpboot']
received on stdout: 
received on stderr: 
running: ['rsync', '-rpt', '--copy-links', '--exclude=README.grubconfig', '/var/lib/cobbler/grub_config/', '/var/lib/tftpboot']
received on stdout: 
received on stderr: 
copying distros to tftpboot
copying images
generating PXE configuration files
generating PXE menu structure
rendering DHCP files
generating /etc/dhcp/dhcpd.conf
cleaning link caches
running post-sync triggers
running python triggers from /var/lib/cobbler/triggers/sync/post/*
running python trigger cobbler.modules.sync_post_restart_services
running: dhcpd -t -q
received on stdout: 
received on stderr: 
running: service dhcpd restart
received on stdout: 
received on stderr: 重定向至 /bin/systemctl restart dhcpd.servicerunning shell triggers from /var/lib/cobbler/triggers/sync/post/*
shell triggers finished successfully
running python triggers from /var/lib/cobbler/triggers/change/*
running python trigger cobbler.modules.scm_track
running python trigger cobbler.modules.managers.genders
running shell triggers from /var/lib/cobbler/triggers/change/*
shell triggers finished successfully
*** TASK COMPLETE ***检查dhcp是否正常
[root@cjy ~]# ss -aun | grep 67
UNCONN 0      0                    0.0.0.0:67            0.0.0.0:*          
ESTAB  0      0      192.168.159.148%ens33:68    192.168.159.254:67         导入统信uso镜像
[root@cjy ~]# df -h
文件系统              容量  已用  可用 已用% 挂载点
devtmpfs              1.9G     0  1.9G    0% /dev
tmpfs                 1.9G     0  1.9G    0% /dev/shm
tmpfs                 1.9G   17M  1.9G    1% /run
tmpfs                 1.9G     0  1.9G    0% /sys/fs/cgroup
/dev/mapper/uos-root   70G  3.2G   67G    5% /
tmpfs                 1.9G     0  1.9G    0% /tmp
/dev/sda1            1014M  253M  762M   25% /boot
/dev/mapper/uos-home   26G  212M   25G    1% /home
tmpfs                 375M     0  375M    0% /run/user/0
[root@cjy ~]# mount /dev/cdrom /mnt
mount: /mnt: WARNING: source write-protected, mounted read-only.
[root@cjy ~]# ls /mnt
AppStream  EFI               images    kernel419  media.repo               TRANS.TBL
BaseOS     extra_files.json  isolinux  kernel510  RPM-GPG-KEY-uos-release
[root@cjy ~]# cobbler import --path=/mnt --name=uos20 --arch=x86_64
task started: 2023-12-22_150308_import
task started (id=Media import, time=Fri Dec 22 15:03:08 2023)
running python triggers from /var/lib/cobbler/triggers/task/import/pre/*
running shell triggers from /var/lib/cobbler/triggers/task/import/pre/*
shell triggers finished successfully
Found a candidate signature: breed=uniontech, version=uniontech
Found a matching signature: breed=uniontech, version=uniontech
Adding distros from path /var/www/cobbler/distro_mirror/uos20-x86_64:
creating new distro: uos20-x86_64
trying symlink: /var/www/cobbler/distro_mirror/uos20-x86_64 -> /var/www/cobbler/links/uos20-x86_64
creating new profile: uos20-x86_64
associating repos
checking for rsync repo(s)
checking for rhn repo(s)
checking for yum repo(s)
starting descent into /var/www/cobbler/distro_mirror/uos20-x86_64 for uos20-x86_64
processing repo at : /var/www/cobbler/distro_mirror/uos20-x86_64/AppStream
need to process repo/comps: /var/www/cobbler/distro_mirror/uos20-x86_64/AppStream
looking for /var/www/cobbler/distro_mirror/uos20-x86_64/AppStream/repodata/*comps*.xml
Keeping repodata as-is :/var/www/cobbler/distro_mirror/uos20-x86_64/AppStream/repodata
processing repo at : /var/www/cobbler/distro_mirror/uos20-x86_64/BaseOS
need to process repo/comps: /var/www/cobbler/distro_mirror/uos20-x86_64/BaseOS
looking for /var/www/cobbler/distro_mirror/uos20-x86_64/BaseOS/repodata/*comps*.xml
Keeping repodata as-is :/var/www/cobbler/distro_mirror/uos20-x86_64/BaseOS/repodata
processing repo at : /var/www/cobbler/distro_mirror/uos20-x86_64/kernel419
directory /var/www/cobbler/distro_mirror/uos20-x86_64/kernel419 is missing xml comps file, skipping
processing repo at : /var/www/cobbler/distro_mirror/uos20-x86_64/kernel510
directory /var/www/cobbler/distro_mirror/uos20-x86_64/kernel510 is missing xml comps file, skipping
*** TASK COMPLETE ***说明:--path      //镜像路径--name      //为安装源定义一个名字--arch      //指定安装源平台安装源的唯一标示就是根据name参数来定义,本例导入成功后,安装源的唯一标示就是:uos20-x86_64,如果重复,系统会提示导入失败查看cobbler镜像列表
[root@cjy ~]# cobbler list
distros:uos20-x86_64profiles:uos20-x86_64systems:repos:images:mgmtclasses:packages:files:创建kickstarts自动安装脚本
[root@cjy ~]# cd /var/lib/cobbler/templates/
[root@cjy templates]# ls
default.ks    install_profiles  pxerescue.ks         sample_esxi5.ks  sample_legacy.ks
esxi4-ks.cfg  legacy.ks         sample_autoyast.xml  sample_esxi6.ks  sample_old.seed
esxi5-ks.cfg  powerkvm.ks       sample_esxi4.ks      sample.ks        sample.seed
[root@cjy templates]# cp sample.ks uos20.ks
[root@cjy templates]# vim uos20.ks 
[root@cjy templates]# cat uos20.ks 
# Sample kickstart file for current EL, Fedora based distributions.ignoredisk --only-use=sda
autopart --type=lvm
clearpart --all
text
url --url=http://192.168.159.148/cobbler/links/uos20-x86_64/
keyboard --vckeymap=cn --xlayouts='cn'
lang zh_CN.UTF-8
#network  --bootproto=dhcp --device=ens33 --ipv6=auto --activate  (可以不要)
#network  --hostname=localhost.localdomain   (可以不要)
rootpw --iscrypted   $6$BhgpUy/vf7qCaTU5$nl7uR.wgWxo/nuah8zeYsJRXGEYUUaTg//Njihb3lSKrvFRqZJQ9E1a83vAZ0K/HTROWEV3HB..1qZBMHd/E3.xconfig  --startxonboot
firstboot --disable
services --enabled="chronyd"
timezone --isUtc Asia/Shanghai
reboot
eula --agreed%packages
@^graphical-server-environment-dde
kexec-tools%end%addon com_redhat_kdump --enable --reserve-mb='auto'%end%anacondapwpolicy root --minlen=8 --minquality=1 --notstrict --nochanges --emptyokpwpolicy user --minlen=8 --minquality=1 --notstrict --nochanges --emptyokpwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty%end检查ks文件语法是否有误
[root@cjy templates]# cobbler validate-autoinstalls
task started: 2023-12-22_151820_validate_autoinstall_files
task started (id=Automated installation files validation, time=Fri Dec 22 15:18:20 2023)
running python triggers from /var/lib/cobbler/triggers/task/validate_autoinstall_files/pre/*
running shell triggers from /var/lib/cobbler/triggers/task/validate_autoinstall_files/pre/*
shell triggers finished successfully
*** TASK COMPLETE ***查看当前cobbler有哪些配置文件
[root@cjy templates]# cobbler profile listuos20-x86_64修改profile,将我们新建的ks文件设为默认的安装文件
[root@cjy ~]# cobbler profile edit --name uos20-x86_64 --autoinstall=uos20.ks配置网卡名称为传统网卡名称eth0
[root@cjy ~]# cobbler profile edit --name uos20-x86_64 --kernel-options='net.ifnames=0 biosdevname=0'检查当前系统cobbler配置文件信息
[root@cjy ~]# cobbler profile report
Name                           : uos20-x86_64
Automatic Installation Template : uos20.ks
Automatic Installation Metadata : {}
TFTP Boot Files                : {}
Comment                        : 
DHCP Tag                       : default
Distribution                   : uos20-x86_64   仓库名字
Enable gPXE?                   : 0
Enable PXE Menu?               : 1
Fetchable Files                : {}
DHCP Filename Override         : <<inherit>>
Kernel Options                 : {'net.ifnames': '0', 'biosdevname': '0'}  网卡设为传统命名方式
Kernel Options (Post Install)  : {}
Management Classes             : []
Management Parameters          : <<inherit>>
Name Servers                   : []
Name Servers Search Path       : []
Next Server Override           : <<inherit>>
Owners                         : ['admin']
Parent Profile                 : 
Proxy                          : 
Red Hat Management Key         : <<inherit>>
Repos                          : []
Server Override                : <<inherit>>
Template Files                 : {}
Virt Auto Boot                 : 1
Virt Bridge                    : xenbr0
Virt CPUs                      : 1
Virt Disk Driver Type          : raw
Virt File Size(GB)             : 5
Virt Path                      : 
Virt RAM (MB)                  : 512
Virt Type                      : kvm同步cobbler
[root@cjy ~]# cobbler sync
task started: 2023-12-22_155606_sync
task started (id=Sync, time=Fri Dec 22 15:56:06 2023)
running python triggers from /var/lib/cobbler/triggers/task/sync/pre/*
running shell triggers from /var/lib/cobbler/triggers/task/sync/pre/*
shell triggers finished successfully
running pre-sync triggers
cleaning trees
removing: /var/www/cobbler/images/uos20-x86_64
removing: /var/lib/tftpboot/pxelinux.cfg/default
removing: /var/lib/tftpboot/grub/images
removing: /var/lib/tftpboot/grub/system
removing: /var/lib/tftpboot/grub/system_link
removing: /var/lib/tftpboot/grub/grub.cfg
removing: /var/lib/tftpboot/grub/local_efi.cfg
removing: /var/lib/tftpboot/grub/local_legacy.cfg
removing: /var/lib/tftpboot/grub/local_powerpc-ieee1275.cfg
removing: /var/lib/tftpboot/grub/aarch64_menu_items.cfg
removing: /var/lib/tftpboot/grub/i386_menu_items.cfg
removing: /var/lib/tftpboot/grub/x86_64_menu_items.cfg
removing: /var/lib/tftpboot/grub/ppc_menu_items.cfg
removing: /var/lib/tftpboot/grub/ppc64_menu_items.cfg
removing: /var/lib/tftpboot/grub/ppc64le_menu_items.cfg
removing: /var/lib/tftpboot/grub/loongarch64_menu_items.cfg
removing: /var/lib/tftpboot/grub/amd64_menu_items.cfg
removing: /var/lib/tftpboot/grub/ppc64el_menu_items.cfg
removing: /var/lib/tftpboot/grub/ia64_menu_items.cfg
removing: /var/lib/tftpboot/grub/s390_menu_items.cfg
removing: /var/lib/tftpboot/grub/s390x_menu_items.cfg
removing: /var/lib/tftpboot/grub/i586_menu_items.cfg
removing: /var/lib/tftpboot/images/uos20-x86_64
copying bootloaders
running: ['rsync', '-rpt', '--copy-links', '--exclude=.cobbler_postun_cleanup', '/var/lib/cobbler/loaders/', '/var/lib/tftpboot']
received on stdout: 
received on stderr: 
running: ['rsync', '-rpt', '--copy-links', '--exclude=README.grubconfig', '/var/lib/cobbler/grub_config/', '/var/lib/tftpboot']
received on stdout: 
received on stderr: 
copying distros to tftpboot
copying files for distro: uos20-x86_64
trying hardlink /var/www/cobbler/distro_mirror/uos20-x86_64/images/pxeboot/vmlinuz -> /var/lib/tftpboot/images/uos20-x86_64/vmlinuz
trying hardlink /var/www/cobbler/distro_mirror/uos20-x86_64/images/pxeboot/initrd.img -> /var/lib/tftpboot/images/uos20-x86_64/initrd.img
copying images
generating PXE configuration files
generating PXE menu structure
copying files for distro: uos20-x86_64
trying hardlink /var/www/cobbler/distro_mirror/uos20-x86_64/images/pxeboot/vmlinuz -> /var/www/cobbler/images/uos20-x86_64/vmlinuz
trying hardlink /var/www/cobbler/distro_mirror/uos20-x86_64/images/pxeboot/initrd.img -> /var/www/cobbler/images/uos20-x86_64/initrd.img
Writing template files for uos20-x86_64
rendering DHCP files
generating /etc/dhcp/dhcpd.conf
processing boot_files for distro: uos20-x86_64
cleaning link caches
running post-sync triggers
running python triggers from /var/lib/cobbler/triggers/sync/post/*
running python trigger cobbler.modules.sync_post_restart_services
running: dhcpd -t -q
received on stdout: 
received on stderr: 
running: service dhcpd restart
received on stdout: 
received on stderr: 重定向至 /bin/systemctl restart dhcpd.servicerunning shell triggers from /var/lib/cobbler/triggers/sync/post/*
shell triggers finished successfully
running python triggers from /var/lib/cobbler/triggers/change/*
running python trigger cobbler.modules.scm_track
running python trigger cobbler.modules.managers.genders
running shell triggers from /var/lib/cobbler/triggers/change/*
shell triggers finished successfully
*** TASK COMPLETE ***为避免发生未知问题,先把服务端所有服务重启
[root@cjy ~]# systemctl restart tftp httpd cobblerd
[root@cjy ~]# ss -antl
State     Recv-Q    Send-Q       Local Address:Port        Peer Address:Port    Process    
LISTEN    0         5                127.0.0.1:25151            0.0.0.0:*                  
LISTEN    0         5                  0.0.0.0:873              0.0.0.0:*                  
LISTEN    0         128                0.0.0.0:22               0.0.0.0:*                  
LISTEN    0         5                127.0.0.1:631              0.0.0.0:*                  
LISTEN    0         511                      *:443                    *:*                  
LISTEN    0         5                     [::]:873                 [::]:*                  
LISTEN    0         511                      *:80                     *:*                  
LISTEN    0         128                   [::]:22                  [::]:*                  
LISTEN    0         5                    [::1]:631                 [::]:*                  

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

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

相关文章

C++ 迭代器与反向迭代器

目录 一&#xff0c;什么是迭代器 1&#xff0c;定义 2&#xff0c;迭代器的设计思维 3&#xff0c;迭代器种类 二&#xff0c;迭代器与容器 1&#xff0c;容器中的迭代器 2&#xff0c;迭代器失效问题 三&#xff0c;迭代器的类型萃取&#xff08;traits&#xff09; …

Python函数、参数变量详细介绍

Python函数概述 在Python中&#xff0c;函数是组织好的、可重复使用的代码块&#xff0c;用于实现单一或相关联功能。函数能提高应用的模块性和代码的重复利用率。除了内建函数外&#xff0c;Python还支持用户自定义函数。 定义函数 自定义函数使用 def 关键字开始定义。函数…

sdwan本地组网分析

随着数字化转型的深入发展&#xff0c;企业对网络架构的要求也不断提高。SDWAN&#xff08;软件定义广域网&#xff09;作为一种创新的网络技术&#xff0c;正在逐渐受到企业的关注和采用。SDWAN本地组网技术可以帮助企业快速搭建高效稳定的企业网络架构&#xff0c;提升企业的…

Android kotlin全局悬浮窗全屏功能和锁屏页面全屏悬浮窗功能一

1.前言 在进行app应用开发中,在实现某些功能中要求实现悬浮窗功能,分为应用内悬浮窗 ,全局悬浮窗和 锁屏页面悬浮窗功能 等,接下来就来实现这些悬浮窗全屏功能,首选看下第一部分功能实现 2.kotlin全局悬浮窗全屏功能和锁屏页面全屏悬浮窗功能一分析 悬浮窗是属于Androi…

API接口开发lazada获得lazada商品详情API采集商品详情页实时数据、实时销量、库存等参数接入演示

要获取Lazada商品详情页的实时数据、实时销量和库存等参数&#xff0c;你需要使用Lazada的API接口。以下是一个简单的Python示例&#xff0c;展示了如何使用requests库调用Lazada API并解析返回的数据&#xff1a; # coding:utf-8 """ Compatible for python2.…

Linux:基础IO

回顾C文件接口 stdin & stdout & stderr C 默认会打开三个输入输出流&#xff0c;分别是 stdin, stdout, stderr 仔细观察发现&#xff0c;这三个流的类型都是 FILE*, fopen 返回值类型&#xff0c;文件指针 系统文件I/O 接口介绍 open man open #include <sy…

TSINGSEE青犀推出县域治理视频基座数字化、智慧化解决方案

一、方案背景 县域治理方案是我国地方治理体系的重要组成部分&#xff0c;对于促进县域经济社会发展、维护社会稳定、推进全面深化改革具有重要意义。随着科技的不断进步&#xff0c;视频监管已经成为了现代社会治理的重要手段之一。县域治理视频监管方案是通过视频监控、数据…

鸿蒙OS开发实例:【装饰器-@BuilderParam】

背景 这是一个基础概念&#xff0c;其实没有什么原因&#xff0c;练习过程中&#xff0c;自然可以感受到其用法&#xff0c;后期加上真实项目的演练&#xff0c;会形成习惯 功能核心理念 “在自定义组件中添加一个点击跳转操作。若直接在组件内嵌入事件方法&#xff0c;将会…

电商系列之优惠券

> 插&#xff1a;AI时代&#xff0c;程序员或多或少要了解些人工智能&#xff0c;前些天发现了一个巨牛的人工智能学习网站&#xff0c;通俗易懂&#xff0c;风趣幽默&#xff0c;忍不住分享一下给大家。点击跳转到网站。 坚持不懈&#xff0c;越努力越幸运&#xff0c;大家…

python解决序列重叠问题

tblastn比对出来候选HSP区段&#xff0c;我们需要根据一定的基因长度范围来进行区域延伸去重叠&#xff0c;然后进行下一步操作。对HSP区域的延伸要考虑基因的长度以及目标基因组scafflod or chromosome长度&#xff0c;不是一件容易的事情。 这里采用了dataclass以及改写slot…

安全上网,防止上网被记录(v2ray实现加密通信)

近期听一位亲威说&#xff0c;她在公司休闲的时候上了哪个网站&#xff0c;浏览了过的网站IT部门的人都会知道&#xff0c;这是因为现在大多数网络设备&#xff0c;像路由与交换机都有记录访问网站地址记录功能&#xff0c;涉及还可以设置成记录到交互的内容。要想保密&#xf…

【QT学习笔记】目录 (不定时更新)

解析 Qt消息机制和事件 Qt消息机制和事件--2 qt::WA_QuitOnClose 类库及用法 QString::number用法_qstring::number表示整数 emit用法 QString用法 QFile 用法 QPair用法 | 如何定义一个函数返回两个值 QFileDialog用法&#xff08;选择文件弹出框&#xff09; QFileI…

js 分割号查找内容

如果您想要在JavaScript中使用分隔符查找字符串中的内容&#xff0c;您可以使用String.prototype.split方法来分割字符串&#xff0c;然后使用数组的相关方法来查找特定内容。 以下是一个简单的例子&#xff0c;它使用逗号作为分隔符&#xff0c;查找字符串数组中的特定内容&a…

java openCV4-专栏目录

专栏简介 &#x1f492;个人主页 &#x1f4d6;说明&#x1f4d6;本专栏为java openCV的入门专栏 openCV4.x 目录 &#x1f4e2;前言&#x1f4e2;场景&#x1f43c;附言&#x1f4d6;目录 &#x1f4e2;前言 本专栏所有示例采用openCV4.8.0版本&#xff0c;你也可以采用其它…

MySQL面试汇总(一)

MySQL 如何定位慢查询 如何优化慢查询 索引及其底层实现 索引是一个数据结构&#xff0c;可以帮助MySQL高效获取数据。 聚簇索引和非聚簇索引 覆盖索引 索引创建原则 联合索引

AcWing 92. 递归实现指数型枚举

Problem: AcWing 92. 递归实现指数型枚举 文章目录 思路解题方法复杂度Code 思路 这是一个经典的递归问题&#xff0c;我们需要实现指数型枚举。这意味着我们需要找出所有可能的组合。在这个问题中&#xff0c;我们需要找出1到n的所有可能的组合。 解题方法 我们使用一个递归函…

Linux系统-----------MySQL 数据类型

目录 MySQL 数据类型 一、数值类型 二、日期和时间类型 三、字符串类型 &#xff08;1&#xff09;CHAR类型 &#xff08;2&#xff09;VARCHAR类型 &#xff08;3&#xff09;CHAR和VARACHAR的比较及其应用场景 MySQL 数据类型 MySQL 中定义数据字段的类型对你数据库的…

代码随想录 Day-25

力扣题目 509.斐波那契数 思路 很理所当然的&#xff0c;可以使用递归的方式其次是用动态规划的方式&#xff0c;动态规划的核心就是递推公式。 那么递推和递归一字之差&#xff0c;有什么区别呢&#xff1f;&#xff08;递推和递归的区别&#xff09; 1、递归 class Solutio…

Karmada 管理有状态应用 Xline 的早期探索与实践

背景与动机 目前随着云原生技术和云市场的不断成熟&#xff0c;越来越多的 IT 厂商开始投入到跨云多集群的怀抱当中。以下是 flexera 在 2023 年中关于云原生市场对多云多集群管理的接受程度的调查报告&#xff08;http://info.flexera.com&#xff09; 从 flexera 的报告中可…

软件杯 深度学习 机器视觉 人脸识别系统 - opencv python

文章目录 0 前言1 机器学习-人脸识别过程人脸检测人脸对其人脸特征向量化人脸识别 2 深度学习-人脸识别过程人脸检测人脸识别Metric Larning 3 最后 0 前言 &#x1f525; 优质竞赛项目系列&#xff0c;今天要分享的是 &#x1f6a9; 深度学习 机器视觉 人脸识别系统 该项目…