Ansible 介紹及安裝

簡介

Ansible 是一款開源的自動化工具,廣泛應用于配置管理、應用部署、任務自動化以及多節點管理等領域。它由 Michael DeHaan 于 2012 年創建,ansible 目前已經已經被紅帽官方收購,是自動化運維工具中大家認可度最高的,并且上手容易,學習簡單。是每位運維工程師必須掌握的技能之一。

官網文檔地址:Ansible Documentation — Ansible Community Documentation

特點:

  • 無代理架構

不需要再被控節點上安裝任何專門的代理軟件。通過 SSH 與被控節點通信,實現任務的執行和數據的傳輸

? ? 優點

  1. 簡化部署:無需在每個被控節點上安裝和維護代理程序,減少運維工作量。

  2. 提高安全性:減少了潛在的攻擊面,因為不需要開放額外的端口或運行額外的服務。

  3. 節省資源:避免了代理軟件占用系統資源的問題。

  • 基于SSH

  • 通過 SSH 協議與被控節點通信,能都在大多數 Unix 系統上無縫運行。且支持Windows 主機,使用 PowerShell 或 WinRM 進行管理

? ?優點

  1. 廣泛兼容性:支持多種操作系統,無需額外配置。

  2. 安全性高:利用現有的 SSH 安全機制,確保數據傳輸的機密性和完整性。

  • 聲明式任務

  • 使用聲明式語言(YAML)定義任務,描述的是目標狀態而非具體的執行步驟。這是的配置更加直觀易讀,同時減少了錯誤和不一致性

? ? 優點

  1. 可讀性強:YAML 格式簡潔明了,易于理解和編寫。

  2. 可重用性高:通過劇本(Playbook) 和角色(Roles)的復用,實現復雜任務的模塊化管理。

  3. 冪等性:確保多次運行相同的任務不會導致不一致的狀態。

各個板塊的概念

主機清單

Ansible 中用于管理目標主機的配置文件。它是一個文本文件,其中列出了要在其上執行 Ansible 任務的遠程主機。
可以包含 IP 地址、域名或主機別名等信息,且可以將主機分組以便更好地組織和管理。文件默認位于 /etc/ansible/hosts 文件中,但也可以使用 -i 參數指定其他位置的清單文件。
#這是一個示例:
[web-servers]
webserver1.example.com
webserver2.example.com[database-servers]
dbserver1.example.com
dbserver2.example.com

?連接插件

Ansible 中的組件,用建立與遠程主機的連接。Ansible 支持多種連接插件,包括 SSH、WinRM 等。連接插件的選擇取決于目標主機的操作系統和配置。
通過連接插件,Ansible 可以與目標主機進行通信,并在其上執行任務。在主機清單中,可以通過在主機名后連接插件名稱來指定連接插件。如果不指定,默認使用 SSH 連接插件。
這是一個示例
[web-servers]
webserver1.example.com ansible_connection=ssh
webserver2.example.com ansible_connection=ssh[database-servers]
dbserver1.example.com ansible_connection=ssh
dbserver2.example.com ansible_connection=winrm

模塊

是 Ansible 的核心組件,用于在遠程主機上執行任務。
Ansible 提供了豐富的內置模塊,涵蓋了各種任務,如文件操作、軟件包管理、服務管理、用戶管理等。還能通過在劇本中調用模塊,可以實現自動化任務的執行。以下是一些常見的模塊:
  • ping:檢測遠程主機的連通性。
  • command/shel:在目標主機上執行命令或命令字符串。
  • copy:將文件從控制節點復制到遠程主機。
  • file:創建、修改或刪除文件和目錄。
  • template:使用 jinja2 模板生成文件,并將其復制到遠程主機。
  • apt/yum:在基于 Debian/RedHat 的系統上安裝、升級或移除軟件包。
  • service:啟動、停止、重新啟動或重載系統服務。
  • user/group:創建、修改或刪除用戶和用戶組。
  • lineinfile:在文中添加、修改或刪除一行文本。
  • raw:在目標主機上執行原始命令,繞過模塊系統。
  • wait_for:等待一定時間或直到某個條件為真。
  • script:在在目標主機上執行本地腳本。
  • git:克隆或更新 Git 代碼庫。
  • debug:打印調試信息。

Playbook【劇本】

是 Ansible 的核心組件之一,是一種以 YAML 格式編寫的自動化任務描述文件。
每個 Playbook 由一個或多個 Play 組成。在每個 Play 下面,通過 tasks 關鍵字來定義一組任務。每個任務由一個或多個模塊組成,用于在遠程主機上實現自動化部署、配置和管理等操作。
# 這是一個示例
- name: Install and start Nginx # 描述 Playbook 或任務的簡短名稱hosts: web_servers # 指定要執行任務的目標主機或主機組become: yes # 可選參數,用于指定是否以管理員權限執行任務及執行任務的用戶。tasks:- name: Install Nginxapt:name: nginxstate: present- name: Start Nginx serviceservice:name: nginxstate: started

安裝操作

主機規劃

主機IP說明
ansible-controller192.168.72.63安裝ansible
ansible-node1192.168.72.64
ansible-node2192.168.72.65

環境準備【在對應的主機上執行命令】

配置主機名

# hostnamectl hostname ansible-controller# hostnamectl hostname ansible-node1# hostnamectl hostname ansible-node2

配置IP地址【改成自己主機所在的網段】

[root@ansible-controller ~]# nmcli c m ens160 ipv4.method manual ipv4.addresses 172.25.250.63/24 ipv4.gateway 172.25.250.2 ipv4.dns 223.5.5.5 connection.autoconnect yes
[root@ansible-controller ~]# nmcli c up ens160[root@ansible-node1 ~]# nmcli c m ens160 ipv4.method manual ipv4.addresses 172.25.250.64/24 ipv4.gateway 172.25.250.2 ipv4.dns 223.5.5.5 connection.autoconnect yes
[root@ansible-node1 ~]# nmcli c up ens160[root@ansible-node2 ~]# nmcli c m ens160 ipv4.method manual ipv4.addresses 172.25.250.65/24 ipv4.gateway 172.25.250.2 ipv4.dns 223.5.5.5 connection.autoconnect yes
[root@ansible-node2 ~]# nmcli c up ens160

關閉防火墻【三臺主機均要執行】

systemctl disable --now firewalld

關閉Selinux

setenforece 0sed -i "s/SELINUX=enforcing/SELINUX=permissive/" /etc/selinux/config

掛載倉庫

臨時掛載
mount /dev/sr0 /mnt
永久掛載
vim /etc/fstab
....
/dev/sr0	/mnt	iso9660		defaults	0	0# 檢查掛載是否出錯
mount -a

安裝方法:

nsible 有三種安裝方式,源碼安裝發行版安裝Python 安裝

使用發行版安裝Python 安裝兩種方式時,Ansible 的安裝包有兩個,區別如下:

  • ansible-core:一種極簡語言和運行時包,包含一組內置模塊和插件。

  • ansible:一個更大的“包含電池”的軟件包,它添加了社區精選的 Ansible 集合選擇,用于自動化各種設備。

在用源碼或者 Python 安裝 Ansible 時,默認不會安裝 sshpass 軟件包,該軟件包用來給 Ansible 提供密碼驗證被控端,因此如果在執行 Ansible 的命令時需要輸入 ssh 的密碼,則需要該軟件包,該軟件包通過 dnf install -y sshpass

源碼安裝【它只能安裝 Ansible-core 且只需要在主節點上安裝即可】

[root@ansible-controller ~]# dnf install python3.12 python3.12-pip sshpass
[root@ansible-controller ~]# tar xf ansible-2.16.3.tar.gz
[root@ansible-controller ~]# cd ansible-2.16.3/
[root@ansible-controller ansible-2.16.3]# python3 -m pip install -r ./requirements.txt
[root@ansible-controller ansible-2.16.3]# python3 setup.py install

發行版安裝【只需要在主節點上安裝即可】

安裝epel源
[root@ansible-controller ~]# dnf install https://mirrors.aliyun.com/epel/epel-release-latest-9.noarch.rpm -y[root@ansible-controller ~]# ls /etc/yum.repos.d/
base.repo  epel-cisco-openh264.repo  epel.repo  epel-testing.repo  redhat.repo
安裝ansible
# 安裝包含常用模塊的 Ansible
[root@ansible-controller ~]# dnf install ansible -y
# 或
# 安裝最簡潔的 Ansible
[root@ansible-controller ~]# dnf install ansible-core -y
安裝驗證
[root@ansible-controller ~]# ansible --version
ansible [core 2.14.9]config file = /etc/ansible/ansible.cfgconfigured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']ansible python module location = /usr/lib/python3.9/site-packages/ansibleansible collection location = /root/.ansible/collections:/usr/share/ansible/collectionsexecutable location = /usr/bin/ansiblepython version = 3.9.18 (main, Sep  7 2023, 00:00:00) [GCC 11.4.1 20230605 (Red Hat 11.4.1-2)] (/usr/bin/python3)jinja version = 3.1.2libyaml = True

Python安裝

安裝Python
# 安裝 Python3 和 pip
[root@ansible-controller ~]# dnf install python3.12 python3.12-pip sshpass
安裝ansible
# 安裝 Ansible-core
[root@ansible-controller ~]# python3.12 -m pip install ansible-core==2.16.3# 安裝 Ansible
[root@ansible-controller ~]# python3.12 -m pip install ansible
Requirement already satisfied: ansible in /usr/lib/python3.9/site-packages (7.7.0)
Requirement already satisfied: ansible-core>=2.14.7 in /usr/lib/python3.9/site-packages (from ansible) (2.14.17)
Requirement already satisfied: PyYAML>=5.1 in /usr/lib64/python3.9/site-packages (from ansible-core>=2.14.7->ansible) (5.4.1)
Requirement already satisfied: cryptography in /usr/lib64/python3.9/site-packages (from ansible-core>=2.14.7->ansible) (36.0.1)
Requirement already satisfied: packaging in /usr/lib/python3.9/site-packages (from ansible-core>=2.14.7->ansible) (20.9)
Requirement already satisfied: resolvelib<0.9.0,>=0.5.3 in /usr/lib/python3.9/site-packages (from ansible-core>=2.14.7->ansible) (0.5.4)
Requirement already satisfied: cffi>=1.12 in /usr/lib64/python3.9/site-packages (from cryptography->ansible-core>=2.14.7->ansible) (1.14.5)
Requirement already satisfied: pyparsing>=2.0.2 in /usr/lib/python3.9/site-packages (from packaging->ansible-core>=2.14.7->ansible) (2.4.7)
Requirement already satisfied: pycparser in /usr/lib/python3.9/site-packages (from cffi>=1.12->cryptography->ansible-core>=2.14.7->ansible) (2.20)
Requirement already satisfied: ply==3.11 in /usr/lib/python3.9/site-packages (from pycparser->cffi>=1.12->cryptography->ansible-core>=2.14.7->ansible) (3.11)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
安裝驗證
# 查看版本
[root@ansible-controller ~]# ansible --version
ansible [core 2.14.17]config file = /etc/ansible/ansible.cfgconfigured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']ansible python module location = /usr/lib/python3.9/site-packages/ansibleansible collection location = /root/.ansible/collections:/usr/share/ansible/collectionsexecutable location = /usr/bin/ansiblepython version = 3.9.19 (main, Aug 23 2024, 00:00:00) [GCC 11.5.0 20240719 (Red Hat 11.5.0-2)] (/usr/bin/python3)jinja version = 3.1.2libyaml = True
設置參數自動補全
[root@ansible-controller ~]# python3.12 -m pip install argcomplete
[root@ansible-controller ~]# activate-global-python-argcomplete --user

配置主機映射

[root@ansible-controller ~]# cat >> /etc/hosts <<EOF
192.168.72.63	ansible-controller
192.168.72.64	ansible-node1
192.168.72.65	ansible-node2
EOF
# 后面可以跟個簡短名,后續使用n1和n2
[root@ansible-controller .ssh]# vim /etc/hosts
192.168.23.63   ansible-controller
192.168.23.64   ansible-node1 n1
192.168.23.65   ansible-node2 n2
主機映射執行成功之后將文件復制到另外兩個被控節點
[root@ansible-controller ~]# scp /etc/hosts ansible-node1:/etc
[root@ansible-controller ~]# scp /etc/hosts ansible-node2:/etc

免密登錄

控制節點是運行 Ansible 的主機,負責發送任務并收集結果。被控節點是被 Ansible 管理的主機,無需安裝任何額外軟件,僅需確保 SSH 服務正常運行,并具備必要的訪問權限。

只需要在主控節點上創建密鑰對就好

[root@ansible-controller ~]# ssh-keygen
# -t可以指定加密算法
[root@ansible-controller ~]# ssh-keygen -t rsa 
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 	# 一直按回車鍵
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_rsa
Your public key has been saved in /root/.ssh/id_rsa.pub	# 公鑰位置
The key fingerprint is:
SHA256:mnbdYPHKXn9SSKSSAgpSiZ20tnkrAJcbXmKM03P6c/Q root@ansible-controller
The key's randomart image is:
+---[RSA 3072]----+
| =oo             |
|o+=o  .       .  |
|+.%.o. .  .. o   |
|.* @.   . oo. .  |
|. * . . S.o... . |
| . o o + + +  . .|
|  . + = E + o  . |
|   . + . . . .. .|
|          .   .o |
+----[SHA256]-----+

拷貝公鑰

創建成功后,執行以下命令將公鑰拷貝到兩臺被控節點
# 查看隱藏目錄
[root@ansible-controller ~]# ls -a
[root@ansible-controller ~]# cd .ssh/
# .pub即為公鑰,使用rsa算法
[root@ansible-controller .ssh]# ls
id_rsa  id_rsa.pub  known_hosts  known_hosts.old
# 復制本機公鑰到其它被控節點
[root@ansible-controller ~]# ssh-copy-id ansible-node1
# 或
[root@ansible-controller ~]# ssh-copy-id n1
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@ansible-node1's password: Number of key(s) added: 1Now try logging into the machine, with:   "ssh 'ansible-node1'"
and check to make sure that only the key(s) you wanted were added.[root@ansible-controller ~]# ssh-copy-id ansible-node2
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@ansible-node2's password: Number of key(s) added: 1Now try logging into the machine, with:   "ssh 'ansible-node2'"
and check to make sure that only the key(s) you wanted were added.# 或
# 執行命令后,輸入正確密碼即可
[root@ansible-controller ~]# ssh-copy-id root@192.168.72.64
[root@ansible-controller ~]# ssh-copy-id root@192.168.72.65
配置好之后做測試連接
# 如果免密做成功則無需密碼即可登錄
[root@ansible-controller ~]# ssh root@192.168.72.64
# exit可退回原來的主機
[root@ansible-node1 ~]# exit

注意:ssh-copy-id 命令格式有兩種:

  1. ssh-copy-id 遠程用戶@遠程IP 或 僅IP

  2. ssh-copy-id -i /root/.ssh/id_rsa.pub 遠程用戶@遠程IP 或 僅IP

  3. 如果在生成密鑰時指定了密鑰的名稱,此處需要通過 ssh-copy-id -i 指定的名稱 遠程用戶@遠程IP 或 僅IP

快速使用

創建項目目錄

[root@ansible-controller ~]# mkdir ansible_ping
[root@ansible-controller ~]# cd ansible_ping/

創建清單文件

# 名稱任意,直接命名inventory也可以
[root@ansible-controller ansible_ping]# vim inventory.ini
[root@ansible-controller ansible_ping]# cat inventory.ini 
[server]
192.168.72.64
n2

執行Ansible?

# 這里server是配置文件中括號內的名稱,-m指模塊  概念在前面有所提及
[root@ansible-controller ansible_ping]# ansible server -i inventory.ini -m ping
ansible-node1 | SUCCESS => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"},"changed": false,"ping": "pong"
}
# 此時node2節點報錯,因為使用了縮寫名n2
192.168.23.65 | UNREACHABLE! => {"changed": false,"msg": "Failed to connect to the host via ssh: Host key verification failed.","unreachable": true
}
# 只需改為節點對應IP或者全稱即可(ansible-node2)
[root@ansible-controller ~]# cat inventory 
[server]
192.168.23.64
192.168.23.65
[root@ansible-controller ~]# ansible server -i inventory -m ping
192.168.23.64 | SUCCESS => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"},"changed": false,"ping": "pong"
}
192.168.23.65 | SUCCESS => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"},"changed": false,"ping": "pong"
}

文檔就寫到這里,若有需要請查看附加文件,里面有具體的綜合示例

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/diannao/90356.shtml
繁體地址,請注明出處:http://hk.pswp.cn/diannao/90356.shtml
英文地址,請注明出處:http://en.pswp.cn/diannao/90356.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

超光譜相機的原理和應用場景

超光譜相機是光譜成像技術的尖端形態&#xff0c;具備亞納米級光譜分辨率與超千波段連續覆蓋能力&#xff0c;通過“圖譜合一”的三維數據立方體實現物質的精準識別與分析。其核心技術架構、應用場景及發展趨勢如下&#xff1a;一、核心技術原理1、?分光機制??干涉分光?&am…

掌握MySQL函數:高效數據處理指南

? 在 MySQL 數據庫管理系統中&#xff0c;函數扮演著極為重要的角色。它們就像是數據庫操作的得力助手&#xff0c;能夠幫助開發者高效地完成各種數據處理任務。本文將深入探討 MySQL 函數的方方面面&#xff0c;從其基本概念到實際應用&#xff0c;幫助讀者全面掌握這一強大的…

10.SpringBoot的統一異常處理詳解

文章目錄1. 異常處理基礎概念1.1 什么是異常處理1.2 為什么需要統一異常處理1.3 Spring異常處理機制2. SpringBoot默認異常處理2.1 默認錯誤頁面2.2 自定義錯誤頁面3. 全局異常處理器3.1 基礎全局異常處理器3.2 統一響應格式3.3 使用統一響應格式的異常處理器4. 自定義異常4.1 …

No Hack No CTF 2025Web部分個人WP

No Hack No CTF 2025 Next Song is 春日影 hint&#xff1a;NextJS Vulnerability at /adminCVE-2025-29927Next.js 中間件權限繞過漏洞 訪問admin路由發現跳轉利用CVE&#xff1a; curl -i \-H "x-middleware-subrequest: middleware:middleware:middleware:middleware:m…

STM32第十八天 ESP8266-01S和電腦實現串口通信

一&#xff1a; ESP和電腦實現串口通信1. 配置 WiFi 模式 ATCWMODE3 // softAPstation mode 響應 : OK 2. 連接路路由器? ATCWJAP"SSID","password" // SSID and password of router 響應 : OK 3. 查詢 ESP8266 設備的 IP 地址 ATCIFSR 響應 : CIFSR:APIP…

STM32第十七天ESP8266-01Swifi模塊

ESP8266-01S wifi模塊1&#xff1a;ESP8266是實現wifi通訊的一個模塊種類&#xff0c;有很多分類包含esp8266-12、esp8266-12E、ESP8266-01S、esp32等等。esp8266-01S由一顆esp8266作為主控再由一塊flash作為存儲芯片組成&#xff0c;帶有板載芯片供電采用3.3V電壓使用串口進行…

ProCCD復古相機:捕捉復古瞬間

在數字攝影盛行的今天&#xff0c;復古膠片相機的獨特質感和懷舊風格依然吸引著眾多攝影愛好者。ProCCD復古相機APP正是這樣一款能夠滿足用戶對復古攝影需求的應用程序。它通過模擬復古CCD數碼相機的效果&#xff0c;讓用戶在手機上也能輕松拍出具有千禧年風格的照片和視頻。無…

Spring Boot 應用啟動時,端口 8080 已被其他進程占用,怎么辦

1、修改application.yml配置文件&#xff0c;將端口號更改為未被占用的端口&#xff08;例如9090&#xff09;2、以管理員身份運行命令提示符在命令提示符窗口中輸入命令netstat -ano | findstr :8080”輸出結果可能如下&#xff1a;“TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING xx…

使用Jenkins完成springboot項目快速更新

?重磅&#xff01;盹貓的個人小站正式上線啦&#xff5e;誠邀各位技術大佬前來探秘&#xff01;? 這里有&#xff1a; 硬核技術干貨&#xff1a;編程技巧、開發經驗、踩坑指南&#xff0c;帶你解鎖技術新姿勢&#xff01;趣味開發日常&#xff1a;代碼背后的腦洞故事、工具…

HDLBits刷題筆記和一些拓展知識(九)

文章目錄HDLBits刷題筆記CircuitsFsm1Fsm1sFsm2Fsm3onehotExams/ece241 2013 q4Lemmings1Lemmings2Lemmings3Lemmings4Fsm onehotFsm ps2Fsm ps2dataFsm serialFsm serialdataFsm serialdpFsm hdlc未完待續HDLBits刷題筆記 以下是在做HDLBits時的一些刷題筆記&#xff0c;截取一…

CD46.【C++ Dev】list的模擬實現(1)

目錄 1.STL庫的list 2.模擬實現 節點結構體 list類 無參構造函數 尾插函數 迭代器★ begin() operator 前置 后置 operator-- 前置-- 后置-- operator! operator end() operator* const修飾的迭代器的設計 1.STL庫的list 模擬實現list之前,先看看STL庫里的…

數據結構——二叉樹的基本介紹

————————————本文旨在討論與學習計算機知識&#xff0c;歡迎交流————————————上一章&#xff0c;我們講解了樹結構的綜述導論&#xff0c;那么&#xff0c;現在我們來深入了解一下樹結構中最常用研究的結構——二叉樹結構&#xff08;上一章的擴展——…

英偉達發布 Llama Nemotron Nano 4B:專為邊緣 AI 和科研任務優化的高效開源推理模型

英偉達推出了 Llama Nem)otron Nano 4B&#xff0c;這是一款專為在科學任務、編程、符號運算、函數調用和指令執行方面提供強大性能與效率而設計的開源推理模型&#xff0c;其緊湊程度足以支持邊緣部署。該模型僅包含 40 億參數&#xff0c;卻在內部基準測試中實現了比其他多達…

論文閱讀筆記——Autoregressive Image Generation without Vector Quantization

MAR 論文 基于 VQ&#xff08;向量量化&#xff09;的圖像生成方法具有顯著優勢&#xff0c;它通過離散化壓縮將原始圖像映射到有限的 codebook 空間&#xff0c;從而縮小學習范圍、降低建模難度&#xff0c;同時這種離散表示更易于與自回歸&#xff08;AG&#xff09;生成方式…

【科普】關于C 語言日志系統實戰:如何同時輸出到終端和文件?

1.概述 c語言沒有現成的日志庫&#xff0c;如果要記錄日志&#xff0c;需要自己封裝一個日志庫。如果要實現日志級別和參數打印&#xff0c;還是比較麻煩的&#xff0c;正好在github找到了一個c語言開源日志庫&#xff0c;可以實現日志級別打印&#xff0c;參數打印&#xff0…

2025,數字人借直播場景邁過“真假線”丨數智化觀察

作者 | 曾響鈴文 | 響鈴說一夜帶貨超5500萬GMV、觀看人次1300萬&#xff0c;羅永浩數字人在百度電商的直播首秀正在掀起新的行業浪潮——2025&#xff0c;數字人直播帶貨成功出圈&#xff0c;加速進入大眾視野&#xff0c;被更多的消費者所認可。成就這場熱潮的關鍵點之一&…

HTML表格導出為Excel文件的實現方案

1、前端javascript可通過mime類型、blob對象或專業庫&#xff08;如sheetjs&#xff09;實現html表格導出excel&#xff0c;適用于中小型數據量&#xff1b;2、服務器端方案利用后端語言&#xff08;如python的openpyxl、java的apache poi&#xff09;處理復雜報表和大數據&…

企業微信iPad協議端強制拉群漏洞深度分析

正常一次最多邀請40人進群 超過40人的拉群&#xff0c;會變成邀請&#xff0c;需要對方同意 新版本修復了漏洞&#xff0c;但還是可以用老版本進行強制拉群 雖然官方也做了版本過低的限制&#xff0c;但還是有辦法繞過 要么修改版本號或者登錄幾天新版本&#xff0c;之后就可以…

Python編譯器(Pycharm Jupyter)

Pycharm下載不過多贅述pycharm導入anaconda創建的python環境選擇想要的環境 Jupyter Jupyter 是一個開源的交互式計算環境&#xff0c;能夠讓用戶將代碼、文本&#xff08;包括 Markdown&#xff09;、可視化結果等內容整合在一個文檔中&#xff0c;非常適合進行數據分析、科學…

漏洞修復與Fiddler抓包工具的使用

漏洞描述 1. 短信轟炸漏洞 Type:存在三個不同的值。Login是登錄處,register是注冊賬號處的短信驗證碼獲取值,還有一個update值。未注冊的用戶也可以進行發送短信。 2. 手機號繞過,修改密碼漏洞(邏輯漏洞) 目前注冊使用手機號與忘記密碼的手機號驗證測試都可以繞過, …