CentOS-stream-9 Zabbix的安装与配置

一、Web环境搭建部署Zabbix时,选择合适的MariaDB、PHP和Nginx版本非常重要,以确保兼容性和最佳性能。以下是建议版本:Zabbix 6.4
MariaDB:官方文档推荐使用MariaDB 10.3或更高版本。对于CentOS Stream 9,建议使用MariaDB 10.5或更新版本。
PHP:Zabbix 6.4支持PHP 8.0或更高版本。根据您的需求,可以选择安装PHP 8.0、8.1或8.2。请注意,PHP 8.3虽然也可能是可用的,但在撰写本文时可能尚未被所有官方渠道支持。
Nginx:官方文档中提到Nginx 1.18或更高版本是兼容的。对于CentOS Stream 9,默认提供的Nginx版本应该满足要求。1、切换CentOS -stream-9源为阿里源
备份原有的yum源文件,以便需要时恢复:sudo mv /etc/yum.repos.d/CentOS-* /tmp/
centos.repo[baseos]
name=CentOS Stream $releasever - BaseOS
baseurl=https://mirrors.aliyun.com/centos-stream/$stream/BaseOS/$basearch/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1[baseos-debug]
name=CentOS Stream $releasever - BaseOS - Debug
baseurl=https://mirrors.aliyun.com/centos-stream/$stream/BaseOS/$basearch/debug/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0[baseos-source]
name=CentOS Stream $releasever - BaseOS - Source
baseurl=https://mirrors.aliyun.com/centos-stream/$stream/BaseOS/source/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0[appstream]
name=CentOS Stream $releasever - AppStream
baseurl=https://mirrors.aliyun.com/centos-stream/$stream/AppStream/$basearch/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1[appstream-debug]
name=CentOS Stream $releasever - AppStream - Debug
baseurl=https://mirrors.aliyun.com/centos-stream/$stream/AppStream/$basearch/debug/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0[appstream-source]
name=CentOS Stream $releasever - AppStream - Source
baseurl=https://mirrors.aliyun.com/centos-stream/$stream/AppStream/$basearch/debug/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0[crb]
name=CentOS Stream $releasever - CRB
baseurl=https://mirrors.aliyun.com/centos-stream/$stream/CRB/$basearch/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=0[crb-debug]
name=CentOS Stream $releasever - CRB - Debug
baseurl=https://mirrors.aliyun.com/centos-stream/$stream/CRB/$basearch/debug/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0[crb-source]
name=CentOS Stream $releasever - CRB - Source
baseurl=https://mirrors.aliyun.com/centos-stream/$stream/CRB/source/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

 centos-addons.repo

[highavailability]
name=CentOS Stream $releasever - HighAvailability
baseurl=http://mirrors.aliyun.com/centos-stream/$stream/HighAvailability/$basearch/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=0[highavailability-debug]
name=CentOS Stream $releasever - HighAvailability - Debug
baseurl=http://mirrors.aliyun.com/centos-stream/$stream/HighAvailability/$basearch/debug/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0[highavailability-source]
name=CentOS Stream $releasever - HighAvailability - Source
baseurl=http://mirrors.aliyun.com/centos-stream/$stream/HighAvailability/source/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0[nfv]
name=CentOS Stream $releasever - NFV
baseurl=http://mirrors.aliyun.com/centos-stream/$stream/NFV/$basearch/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=0[nfv-debug]
name=CentOS Stream $releasever - NFV - Debug
baseurl=http://mirrors.aliyun.com/centos-stream/$stream/NFV/$basearch/debug/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0[nfv-source]
name=CentOS Stream $releasever - NFV - Source
baseurl=http://mirrors.aliyun.com/centos-stream/$stream/NFV/source/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0[rt]
name=CentOS Stream $releasever - RT
baseurl=http://mirrors.aliyun.com/centos-stream/$stream/RT/$basearch/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=0[rt-debug]
name=CentOS Stream $releasever - RT - Debug
baseurl=http://mirrors.aliyun.com/centos-stream/$stream/RT/$basearch/debug/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0[rt-source]
name=CentOS Stream $releasever - RT - Source
baseurl=http://mirrors.aliyun.com/centos-stream/$stream/RT/source/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0[resilientstorage]
name=CentOS Stream $releasever - ResilientStorage
baseurl=http://mirrors.aliyun.com/centos-stream/$stream/ResilientStorage/$basearch/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=0[resilientstorage-debug]
name=CentOS Stream $releasever - ResilientStorage - Debug
baseurl=http://mirrors.aliyun.com/centos-stream/$stream/ResilientStorage/$basearch/debug/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0[resilientstorage-source]
name=CentOS Stream $releasever - ResilientStorage - Source
baseurl=http://mirrors.aliyun.com/centos-stream/$stream/ResilientStorage/source/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0[extras-common]
name=CentOS Stream $releasever - Extras packages
baseurl=http://mirrors.aliyun.com/centos-stream/SIGs/$stream/extras/$basearch/extras-common/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1[extras-common-source]
name=CentOS Stream $releasever - Extras packages - Source
baseurl=http://mirrors.aliyun.com/centos-stream/SIGs/$stream/extras/source/extras-common/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0
生成缓存并且更新源:yum clean all && yum makecacheyum -y update
2、关闭防火墙,SELINUX
# 关闭防火墙(临时关闭,系统重启后会开启)
systemctl stop firewalld
# 查看防火墙状态
systemctl status firewalld
# 重启系统后不开启防火墙
systemctl disable firewalldSELinux是一种强制访问控制的安全模块,它被集成到了Linux操作系统中;在SELinux下,所有进程和用户都必须明确获得执行特定操作的权限。# 查看selinux状态
getenforce
# 临时关闭selinux
setenforce 0
# 永久关闭selinux,将SELINUX=disabled
vim /etc/selinux/config

3、web环境搭建(安装LNMP)
LAMP和LNMP是常见的web环境,它们具体代表如下:

L:linux,操作系统
A或N:Apache或Nginx,Web服务器软件
M:MariaDB或MySQL,数据库软件
P:PHP、Perl、Python,脚本软件
 使用yum源,向系统安装MariaDB、PHP、hpptd或者nginx,并借助yum解决LAMP各组件间的依赖关系

yum -y install mariadb mariadb-server php php-mysqlnd nginx# 启动nginx
systemctl start nginx
# 设置开机自启
systemctl enable nginx# 启动mariadb
systemctl start mariadb
# 设置开机自启
systemctl enable mariadb # 查看nginx的版本,默认版本已经够用了
nginx -v
[root@localhost yum.repos.d]# nginx -v
nginx version: nginx/1.20.1# 查看php的版本
php -v[root@localhost yum.repos.d]# php -v
PHP 8.0.30 (cli) (built: Aug  3 2023 17:13:08) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.30, Copyright (c) Zend Technologieswith Zend OPcache v8.0.30, Copyright (c), by Zend Technologies# 查看mariadb版本,10.5.27
mysql -V 或者 mysql --version[root@localhost yum.repos.d]# mysql -V
mysql  Ver 15.1 Distrib 10.5.27-MariaDB, for Linux (x86_64) using  EditLine wrapper
4、测试nginx,输入地址:http://你的主机地址,看到ngin欢迎页面,说明测试成功

5、配置数据库

安全初始化数据库

[root@localhost yum.repos.d]# mysql_secure_installationNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDBSERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.
Enter current password for root (enter for none): 
OK, successfully used password, moving on...
Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.
You already have your root account protected, so you can safely answer 'n'.
## 改变使用Unix套接字文件来进行用户认证的方式 否
Switch to unix_socket authentication [Y/n] n... skipping.
You already have your root account protected, so you can safely answer 'n'.## 修改了root用户的密码,看个人需要 是
Change the root password? [Y/n] y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.
## 是否移除匿名用户 是
Remove anonymous users? [Y/n] y... Success!
Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.
## 不允许远程连接 否
Disallow root login remotely? [Y/n] n... skipping.
By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.
## 是否删除测试用的数据库权限? 是
Remove test database and access to it? [Y/n] y- Dropping test database...... Success!- Removing privileges on test database...... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
## 是否重新加载权限表  是
Reload privilege tables now? [Y/n] y... Success!
Cleaning up...
All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.Thanks for using MariaDB!

数据库安装并初始化完成

6、创建Zabbix数据库及用户
[root@localhost yum.repos.d]# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 10.5.27-MariaDB MariaDB ServerCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
## 建zabbix库,并设定utf8字符集
MariaDB [(none)]> create database zabbix character set utf8mb4 collate utf8mb4_bin;
Query OK, 1 row affected (0.001 sec)
## 授权zabbix用户给zabbix库权限并修改密码
MariaDB [(none)]>grant all privileges on zabbix.* to zabbix@localhost identified by '123456';
Query OK, 0 rows affected (0.001 sec)
## 然后刷新权限以使更改生效
MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.001 sec)MariaDB [(none)]> exit
Bye

退出数据库,测试zabbix用户

[root@localhost yum.repos.d]# mysql -uzabbix -p123456
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 14
Server version: 10.5.27-MariaDB MariaDB ServerCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
## 查看数据库
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| zabbix             |
+--------------------+
2 rows in set (0.001 sec)MariaDB [(none)]> exit
Bye

二、Server端安装配置

1、添加Zabbix官方仓库
yum -y install https://repo.zabbix.com/zabbix/6.4/rhel/9/x86_64/zabbix-release-6.4-1.el9.noarch.rpm
yum clean all && yum makecache
2、安装Zabbix Server、Web前端和Agent
yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-agent
3、配置数据库

 配置Zabbix Server连接到MariaDB: 编辑/etc/zabbix/zabbix_server.conf文件,设置数据库连接参数,如DBHostDBNameDBUserDBPassword

zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix

修改配置文件 ,添加DBPassword=123456

vim /etc/zabbix/zabbix_server.conf

# 在文件的最后添加
NodeAddress=localhost:10051
AllowUnsupportedDBVersions=1
DBSocket=/var/lib/mysql/mysql.sock
更改时区vim /etc/php-fpm.d/zabbix.conf
php_value[date.timezone] = Asia/Shanghai  # 有的话修改,没有的可以添加启动Zabbix Server和Agent,并设置开机自启systemctl restart zabbix-server zabbix-agent nginx php-fpm
systemctl enable zabbix-server zabbix-agent nginx php-fpm

三、 Zabbix访问测试,http://你的地址/zabbix

访问过程中出现的问题

解决过程

配置Nginx以托管Zabbix前端:

编辑或创建一个Nginx配置文件(例如/etc/nginx/conf.d/zabbix.conf),并将内容设置为适合Zabbix的配置。请确保配置中包含正确的PHP处理指令以及指向Zabbix文档根目录的路径。一个基本的Nginx配置示例如下:

server {listen       80;server_name  yourdomain.com;root   /usr/share/zabbix;index  index.php;location / {try_files $uri $uri/ /index.php?$query_string;}location ~ \.php$ {fastcgi_pass unix:/run/php-fpm/www.sock;fastcgi_index index.php;include fastcgi_params;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;}
}
开始测试:

为了确保Zabbix在CentOS Stream 9上的正常运行,需要调整PHP的一些配置参数以满足Zabbix的要求。具体来说,post_max_sizemax_execution_timemax_input_time这三个配置项需要设置为至少指定的最小值。

第二步错误解决办法
修改PHP配置
你可以通过编辑PHP的主配置文件来更改这些设置。对于大多数系统,默认的PHP配置文件位于/etc/php.ini。不过,如果你使用的是PHP-FPM,你可能还需要检查并编辑/etc/php-fpm.d/www.conf中的相关设置。以下是具体的步骤:编辑PHP配置文件打开PHP配置文件进行编辑:sudo vim /etc/php.ini
找到或添加以下配置项,并根据需要修改它们的值:post_max_size:设置为至少16M。post_max_size = 16M
max_execution_time:设置为至少300秒。max_execution_time = 300
max_input_time:设置为至少300秒max_input_time = 300
此外,为了确保上传文件大小也足够大,建议同时设置upload_max_filesize为至少16M(这与post_max_size相关联):upload_max_filesize = 16M
记得重启PHP-FPM服务以使更改生效:sudo systemctl restart php-fpm

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

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

相关文章

CppCon 2014 学习:Adventures in Updating a Legacy Vintage Codebase

“VINTAGE” 部分是对现实中飞行模拟系统中遗留系统复杂性的描述。以下是对关键点的理解与拆解: 飞行模拟系统的背景 多环境、多语言、多硬件: 编程语言: 混用的“遗留语言”:Ada, C, C, Fortran, Jovial, PL/M, Pascal不同语言…

【计算机】计算机存储器的分类与特性

文章目录 一、按作用层次分类1. 主存储器(内存)2. 辅助存储器(外存)3. 高速缓冲存储器(Cache) 二、按存储介质分类1. 半导体存储器2. 磁存储技术3. 光存储发展 三、按存取方式分类1. 随机存储器技术细节2. …

Redisson - 实现延迟队列

Redisson 延迟队列 Redisson 是基于 Redis 的一款功能强大的 Java 客户端。它提供了诸如分布式锁、限流器、阻塞队列、延迟队列等高可用、高并发组件。 其中,RDelayedQueue 是对 Redis 数据结构的高阶封装,能让你将消息延迟一定时间后再进入消费队列。…

上门服务小程序订单系统框架设计

一、逻辑分析 上门服务小程序订单系统主要涉及服务展示、用户下单、订单处理、服务人员接单与服务完成反馈等核心流程。 服务展示:不同类型的上门服务(如家政、维修等)需要在小程序中展示详细信息,包括服务名称、价格、服务内容介…

Android apk装机编译类型: verify、speed-profile, speed与启动耗时

Android apk装机编译类型: verify、speed-profile, speed与启动耗时 Dex2oat (dalvik excutable file to optimized art file) ,对 dex 文件进行编译优化,Android 虚拟机可识别的是dex文件,应用运行过程如果每次都将dex文件加载内存&#xff…

winrm登录失败,指定的凭据被服务器拒绝

winrm登录失败,指定的凭据被服务器拒绝。 异常提示:the specified credentials were rejected by the server 在windows power shell执行 set-executionpolicy remotesigned winrm quickconfig winrm set winrm/config/service/auth {Basic"true…

Unity3D ET框架游戏脚本系统解析

前言 ET框架在Unity3D中实现的GamePlay脚本系统是一种革命性的、基于ECS(实体-组件-系统)架构的设计,它彻底改变了传统的基于MonoBehaviour的游戏逻辑编写方式。其核心思想是追求高性能、高解耦、易热更新,特别适合大型复杂的网络…

android与Qt类比

一、概念对应关系 Android RecyclerView 组件类比描述Qt 模型 - 视图组件Qt 类比描述RecyclerView画板(容器)QAbstractItemView视图(展示数据的容器,如列表、表格)RecyclerView.Adapter画布(数据桥梁&…

Jenkins 2.479.1安装和邮箱配置教程

1.安装 在JDK安装并设置环境变量完成后,下载官网对应的war版本,在对应目录下打开命令行窗口并输入 java -jar jenkins.war其余参数感兴趣可以自行查阅,这里启动的 jenkins 服务默认占用8080端口,在浏览器输入 localhost:8080进入…

多分辨率 LCD 的 GUI 架构设计与实现

1.1多分辨率显示系统的挑战与解决方案 1.1.1 分辨率适配的核心问题 在嵌入式系统中,同时支持不同分辨率的 LCD(如 240160、320480 等)面临以下挑战: 布局适配:同一界面元素在不同分辨率下需要调整大小和位置 字体显示:小分辨率屏幕需要更小的字体,而大分辨率需要更清…

11. MySQL事务管理(上)

1. CURD不加控制&#xff0c;会有什么问题&#xff1f; 火车票售票系统tickets表 id name nums 10 西安<->兰州 1 客户端A 客户端B if (nums > 0) { if (nums > 0) { 卖票 卖票 // update numsnums - 1 update numsnums - 1 } } 当客户端A检查还有一张票时&#xf…

Beta分布Dirichlet分布

目录 Beta分布Dirichlet分布Beta分布&Dirichlet分布从Dirichlet分布生成Beta样本Beta分布&Dirichlet分布应用 Beta分布 Beta分布是定义在区间 [ 0 , 1 ] [0, 1] [0,1]上的连续概率分布&#xff0c;通常用于模拟概率或比例的随机变量。Beta分布的概率密度函数&#xff…

嵌入式系统中常用的开源协议

目录 1、GNU通用公共许可证&#xff08;GPL&#xff09; 2、GNU宽松通用公共许可证&#xff08;LGPL&#xff09; 3、MIT许可证 4、Apache许可证2.0 5、BSD许可证 6、如何选择合适的协议 在嵌入式系统开发中&#xff0c;开源软件的使用已成为主流趋势。从物联网设备到汽车…

告别延迟,拥抱速度:存储加速仿真应用的解决方案【1】

需求分析 现代仿真&#xff08;如CFD流体动力学、FEA结构分析、电磁仿真、气候模拟、自动驾驶场景仿真、芯片设计等&#xff09;会产生PB级甚至EB级的数据。海量数据的生成、处理和存储&#xff0c;主要体现在以下几个关键方面&#xff1a; 数据量爆炸式增长&#xff1a;高分…

vue封装gsap自定义动画指令

1、指令文件封装 import { gsap } from gsap;// 动画类型配置 const ANIMATION_TYPES {// 缩放scale: {from: { scale: 0.5, opacity: 0 },to: { scale: 1, opacity: 1 },hide: { scale: 0.5, opacity: 0 },},// 透明度fade: {from: { opacity: 0 },to: { opacity: 1, ease: …

HTTP 如何升级成 HTTPS

有一个自己的项目需要上线&#xff0c;域名解析完成后&#xff0c;发现只能使用 http 协议&#xff0c;这在浏览器上会限制&#xff0c;提示用户不安全&#xff0c;所以需要把 HTTP 升级成 HTTPS 协议&#xff0c;但又不想花钱。 前提条件&#xff1a; 已经配置好 Nginx 服务器…

测试面试题总结一

目录 列表、元组、字典的区别 nvicat连接出现问题如何排查 mysql性能调优 python连接mysql数据库方法 参数化 pytest.mark.parametrize 装饰器 list1 [1,7,4,5,5,6] for i in range(len(list1): assert list1[i] < list1[i1] 这段程序有问题嘛&#xff1f; pytest.i…

[蓝桥杯]密文搜索

密文搜索 题目描述 福尔摩斯从 X 星收到一份资料&#xff0c;全部是小写字母组成。 他的助手提供了另一份资料&#xff1a;许多长度为 8 的密码列表。 福尔摩斯发现&#xff0c;这些密码是被打乱后隐藏在先前那份资料中的。 请你编写一个程序&#xff0c;从第一份资料中搜…

打卡第36天:模型可视化以及推理

知识点回顾&#xff1a; 1.三种不同的模型可视化方法&#xff1a;推荐torchinfo打印summary权重分布可视化 2.进度条功能&#xff1a;手动和自动写法&#xff0c;让打印结果更加美观 3.推理的写法&#xff1a;评估模式 作业&#xff1a;调整模型定义时的超参数&#xff0c;对…

8天Python从入门到精通【itheima】-68(元组)

目录 65节——元组的定义和操作 1.学习目标 2.为什么要学习元组 3.元组的定义 4.定义元组的注意事项 5.元组的嵌套 6.元组的相关操作 【1】index方法 【2】count方法 【3】len方法 7.元组的遍历 【1】while循环进行元组的遍历 【2】for循环进行元组的变量 Python …