lnmp架构

目录

环境

步骤

下载nginx源码包,并解压

 安装依赖包

进行预编译 、编译安装

 安装php、设置开机自启

 配置nginx让其支持php服务

 浏览器测试

 安装mariadb

 部署discuz论坛

简介

LNMP架构是一种常见的Web服务器架构,由Linux、Nginx、MySQL和PHP组成。它是一套成熟、稳定、安全的Web服务器架构,广泛应用于各类中大型企业级应用和互联网站点。LNMP架构的主要特点和优势如下:

  1. 高性能和高并发:Nginx作为LNMP架构中的Web服务器,具有出色的性能和高并发处理能力。它采用事件驱动的非阻塞I/O模型,能够高效地处理大量并发连接和请求,适合于高流量的网站和应用程序。同时,Nginx在处理请求时采用较少的内存资源,对系统资源的消耗相对较低,使得LNMP架构在资源受限的环境下表现出色。

  2. 安全性高:LNMP架构提供了许多安全性保障。例如,Nginx可以通过HTTP认证和SSL/TLS加密来提供数据和服务的安全性。

  3. 灵活性:LNMP可以安装于多个平台和多个版本的Linux操作系统上,同时还可以容易地进行自定义和扩展以适应不同的应用需求。

  4. 易用性:LNMP具有易用性,不需要额外的复杂配置即可完成安装和配置。

  5. 高可靠性:LNMP使用MySQL作为后端数据库,具有数据可靠性高、备份恢复容易等优点。同时,MySQL还提供了复制和分区等特性,以支持容错和高可用性需求。

LNMP架构的工作原理主要如下:用户通过浏览器访问Nginx Web网站,Nginx服务器接收到用户的请求后,先判断请求的URL,根据URL和配置进行匹配,检测请求的Web文件是静态还是动态网站。如果是静态HTML,Nginx直接处理并响应给客户端;如果是动态PHP(或其他脚本语言),Nginx会将请求发送给后端的PHP模块或CGI,PHP解释器将动态网页解析为静态的HTML网页,然后返回给Nginx,Nginx再将解析后的HTML静态网页结果返回给客户。

总的来说,LNMP架构以其高性能、安全性、灵活性、易用性和高可靠性,成为目前互联网公司主流的一种Web架构,特别适用于处理高并发、多并发连接、大流量网站的情景。

环境

redhat 9

nginx:1.24.0

步骤

修改主机名

[root@admin ~]# hostnamectl  hostname lnmp
[root@admin ~]# bash
[root@lnmp ~]#

 设置防火墙规则允许http,https通行

[root@lnmp ~]# firewall-cmd  --zone=public --add-service=http --permanent 
success     //zone设置防火墙区域public,适用于
[root@lnmp ~]# 
[root@lnmp ~]# firewall-cmd --zone=public  --add-service=https --permanent 
success
[root@lnmp ~]# firewall-cmd --zone=public --add-port=443/tcp --permanent 
success
[root@lnmp ~]# firewall-cmd --zone=public --add-port=8080/tcp --permanent 
success
[root@lnmp ~]# firewall-cmd --reload 
success
下载nginx源码包,并解压

官网:https://nginx.org/download/nginx-1.24.0.tar.gz

[root@lnmp ~]# wget  -c https://nginx.org/download/nginx-1.24.0.tar.gz
--2024-04-23 09:23:37--  https://nginx.org/download/nginx-1.24.0.tar.gz
正在解析主机 nginx.org (nginx.org)... 3.125.197.172, 52.58.199.22, 2a05:d014:5c0:2600::6, ...
正在连接 nginx.org (nginx.org)|3.125.197.172|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:1112471 (1.1M) [application/octet-stream]
正在保存至: “nginx-1.24.0.tar.gz”

nginx-1.24.0.tar.gz                          100%[===========================================================================================>]   1.06M   835KB/s  用时 1.3s    

2024-04-23 09:23:39 (835 KB/s) - 已保存 “nginx-1.24.0.tar.gz” [1112471/1112471])

[root@lnmp ~]# 
[root@lnmp ~]# wget  -c https://nginx.org/download/nginx-1.24.0.tar.gz   //-c断点续传
--2024-04-23 09:23:37--  https://nginx.org/download/nginx-1.24.0.tar.gz
正在解析主机 nginx.org (nginx.org)... 3.125.197.172, 52.58.199.22, 2a05:d014:5c0:2600::6, ...
正在连接 nginx.org (nginx.org)|3.125.197.172|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:1112471 (1.1M) [application/octet-stream]
正在保存至: “nginx-1.24.0.tar.gz”

nginx-1.24.0.tar.gz                          100%[===========================================================================================>]   1.06M   835KB/s  用时 1.3s    

2024-04-23 09:23:39 (835 KB/s) - 已保存 “nginx-1.24.0.tar.gz” [1112471/1112471])

[root@lnmp ~]# 
 安装依赖包
[root@lnmp ~]# yum -y install gcc make gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel
正在更新 Subscription Management 软件仓库。
无法读取客户身份

本系统尚未在权利服务器中注册。可使用 subscription-manager 进行注册。

上次元数据过期检查:0:00:07 前,执行于 2024年04月23日 星期二 09时51分27秒。
软件包 pcre-8.44-3.el9.3.x86_64 已安装。
软件包 zlib-1.2.11-39.el9.x86_64 已安装。
软件包 openssl-1:3.0.7-6.el9_2.x86_64 已安装。
依赖关系解决。
=================================================================================================================================================================================
 软件包                                        架构                                 版本                                                  仓库                              大小
=================================================================================================================================================================================
安装:
 gcc                                           x86_64                               11.3.1-4.3.el9                                        aa                                32 M
 gcc-c++                                       x86_64                               11.3.1-4.3.el9                                        aa                                13 M
 make                                          x86_64                               1:4.3-7.el9                                           bb                               542 k
 openssl-devel                                 x86_64                               1:3.0.7-6.el9_2                                       aa                               4.1 M
 pcre-devel                                    x86_64                               8.44-3.el9.3                                          aa                               511 k
 zlib-devel                                    x86_64                               1.2.11-39.el9                                         aa                                47 k
安装依赖关系:
 glibc-devel                                   x86_64                               2.34-60.el9                                           aa                                54 k
 glibc-headers                                 x86_64                               2.34-60.el9                                           aa                               556 k
 kernel-headers                                x86_64                               5.14.0-284.11.1.el9_2                                 aa                               5.0 M
 libstdc++-devel                               x86_64                               11.3.1-4.3.el9                                        aa                               2.4 M
 libxcrypt-devel                               x86_64                               4.4.18-3.el9                                          aa                                32 k
 pcre-cpp                                      x86_64                               8.44-3.el9.3                                          aa                                28 k
 pcre-utf16                                    x86_64                               8.44-3.el9.3                                          aa                               188 k
 pcre-utf32                                    x86_64                               8.44-3.el9.3                                          aa                               178 k

事务概要
=================================================================================================================================================================================
安装  14 软件包
省略。。。。。。

 创建nginx用户

[root@lnmp ~]# useradd  -s /sbin/nologin nginx
进行预编译 、编译安装

--with-http_ssl_module //Nginx 将会被编译以支持 SSL/TLS 功能,通常用于 HTTPS 连接。

[root@lnmp ~]# useradd  -s /sbin/nologin nginx
[root@lnmp ~]# cd /usr/local/src/nginx-1.24.0/
[root@lnmp nginx-1.24.0]# ls
auto  CHANGES  CHANGES.ru  conf  configure  contrib  html  LICENSE  man  README  src
[root@lnmp nginx-1.24.0]# ./configure  --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_ssl_module 

checking for OS
 + Linux 5.14.0-284.11.1.el9_2.x86_64 x86_64
checking for C compiler ... found
 + using GNU C compiler
 + gcc version: 11.3.1 20221121 (Red Hat 11.3.1-4) (GCC) 
checking for gcc -pipe switch ... found
checking for -Wl,-E switch ... found
checking for gcc builtin atomic operations ... found
省略。。。。。。

[root@lnmp nginx-1.24.0]# make && make install    //编译安装
make -f objs/Makefile
make[1]: 进入目录“/usr/local/src/nginx-1.24.0”
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
        -o objs/src/core/nginx.o \
        src/core/nginx.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unu
省略。。。。。

启动nginx,然后查看端口

[root@lnmp ~]# /usr/local/nginx/sbin/nginx 
[root@lnmp ~]# ss -anltp | grep 80
LISTEN 0      511          0.0.0.0:80        0.0.0.0:*    users:(("nginx",pid=8247,fd=6),("nginx",pid=8246,fd=6))
[root@lnmp ~]# 

 浏览器访问 ip

 安装php、设置开机自启
[root@lnmp ~]# yum -y install  php*
正在更新 Subscription Management 软件仓库。
无法读取客户身份

本系统尚未在权利服务器中注册。可使用 subscription-manager 进行注册。

上次元数据过期检查:0:24:30 前,执行于 2024年04月23日 星期二 09时51分27秒。
依赖关系解决。
=================================================================================================================================================================================
 软件包                                                 架构                               版本                                             仓库                            大小
===================
省略 。。。。。。
[root@lnmp ~]# systemctl  start  php-fpm.service 
[root@lnmp ~]# systemctl  enable php-fpm.service 
Created symlink /etc/systemd/system/multi-user.target.wants/php-fpm.service → /usr/lib/systemd/system/php-fpm.service.
[root@lnmp ~]# 
 配置nginx让其支持php服务
 [root@lnmp ~]# vim /usr/local/nginx/conf/nginx.conf
 65         location ~ \.php$ {
 66             root           html;
 67             fastcgi_pass   127.0.0.1:9000;
 68             fastcgi_index  index.php;
 69             fastcgi_param  SCRIPT_FILENAME   $document_root$fastcgi_script_name;//修改请求脚本路径                                                                                             
 70             include        fastcgi_params;
 71         }
 
 #修改php配置文件
 [root@lnmp ~]# vim /etc/php-fpm.d/www.conf
  24 user = nginx  //改为nginx
 25 ; RPM: Keep a group allowed to write in log dir.
 26 group = nginx    //改为nginx
 38 listen = 127.0.0.1:9000    //listen改为本地IP加9000端口
 [root@lnmp ~]# systemctl  reload php-fpm
#增加一个index.php文件测试php是否可用
[root@lnmp ~]# vim /usr/local/nginx/html/index.php
  1 <?php
  2 phpinfo();
  3 ?>     
  [root@lnmp ~]# /usr/local/nginx/sbin/nginx  -s stop
  [root@lnmp ~]# /usr/local/nginx/sbin/nginx 
[root@lnmp ~]# ss -anltp |grep 80
LISTEN 0      511          0.0.0.0:80        0.0.0.0:*    users:(("nginx",pid=12862,fd=6),("nginx",pid=12861,fd=6))
[root@lnmp ~]# ss -anltp | grep 9000
LISTEN 0      511        127.0.0.1:9000      0.0.0.0:*    users:(("php-fpm",pid=18409,fd=10),("php-fpm",pid=13729,fd=10),("php-fpm",pid=13728,fd=10),("php-fpm",pid=13727,fd=10),("php-fpm",pid=13726,fd=10),("php-fpm",pid=13725,fd=10),("php-fpm",pid=13724,fd=8))
[root@lnmp ~]# 
 浏览器测试

 安装mariadb
[root@lnmp ~]# yum -y install  mariadb*
正在更新 Subscription Management 软件仓库。
无法读取客户身份

本系统尚未在权利服务器中注册。可使用 subscription-manager 进行注册。

上次元数据过期检查:1:36:51 前,执行于 2024年04月23日 星期二 09时51分27秒。
软件包 mariadb-connector-c-3.2.6-1.el9_0.x86_64 已安装。
软件包 mariadb-connector-c-config-3.2.6-1.el9_0.noarch 已安装。
依赖关系解决。
====================================================================================================================================================================================
 软件包                                                架构                               版本                                                 仓库                            大小
====================================================================================================================================================================================
安装:
 mariadb                                               x86_64                             3:10.5.16-2.el9_0                                    aa                             1.6 M
 mariadb-backup                                        x86_64                             3:10.5.16-2.el9_0                                    aa                             6.4 M
 mariadb-common                                        x86_64                             3:10.5.16-2.el9_0                                    aa                              39 k
 mariadb-connector-c-devel                             x86_64                             3.2.6-1.el9_0                                        aa                              62 k
 mariadb-connector-odbc                                x86_64                             3.1.12-3.el9                                         aa                             115 k
 mariadb-embedded                                      x86_64                             3:10.5.16-2.el9_0                                    aa                             5.3 M
 mariadb-errmsg                                        x86_64                             3:10.5.16-2.el9_0                                    aa                             227 k
 mariadb-gssapi-server                                 x86_64                             3:10.5.16-2.el9_0                                    aa                              21 k
 mariadb-java-client                                   noarch                             3.0.3-1.el9                                          aa                             969 k
 mariadb-oqgraph-engine                                x86_64                             3:10.5.16-2.el9_0                                    aa                              87 k
 mariadb-pam                                           x86_64                             3:10.5.16-2.el9_0                                    aa                              31 k
 mariadb-server                                        x86_64                             3:10.5.16-2.el9_0                                    aa                             9.4 M
 mariadb-server-galera                                 x86_64                             3:10.5.16-2.el9_0                                    aa                              31 k
 mariadb-server-utils                                  x86_64                             3:10.5.16-2.el9_0                                    aa                             222 k
安装依赖关系:
 Judy                                                  x86_64                             1.0.5-28.el9                                         aa                             134 k
 boost-program-options                                 x86_64                             1.75.0-8.el9                                         aa                             108 k
 copy-jdk-configs                                      noarch                             4.0-3.el9                                            aa                              29 k
 galera                                                x86_64                             26.4.11-1.el9_0                                      aa                             1.2 M
 java-11-openjdk-headless                              x86_64                             1:11.0.18.0.10-2.el9_1                               aa                              40 M
 javapackages-filesystem                               noarch                             6.0.0-4.el9                                          aa                              17 k
 jna                                                   x86_64                             5.6.0-8.el9                                          aa                             274 k
 jna-contrib                                           noarch                             5.6.0-8.el9                                          aa                             549 k
 lksctp-tools                                          x86_64                             1.0.19-2.el9                                         bb                              98 k
 lua                                                   x86_64                             5.4.4-3.el9                                          aa                             192 k
 lua-posix                                             x86_64                             35.0-8.el9                                           aa                             155 k
 mysql-selinux                                         noarch                             1.0.5-1.el9_0                                        aa                              37 k
 perl-DBD-MariaDB                                      x86_64                             1.21-16.el9_0                                        aa                             156 k
 perl-Sys-Hostname                                     x86_64                             1.23-480.el9                                         aa                              20 k
 slf4j                                                 noarch                             1.7.30-13.el9                                        aa                              73 k
 tzdata-java                                           noarch                             2022g-2.el9                                          aa                             233 k

事务概要
====================================================================================================================================================================================
安装  30 软件包
[root@lnmp ~]# systemctl  restart  mariadb.service 
[root@lnmp ~]# systemctl  enable  mariadb.service 
Created symlink /etc/systemd/system/mysql.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/mysqld.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /usr/lib/systemd/system/mariadb.service.
[root@lnmp ~]# mysql_secure_installation   //初始化设置

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS 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'.

Switch to unix_socket authentication [Y/n] y
Enabled successfully!
Reloading privilege tables..
 ... Success!


You already have your root account protected, so you can safely answer 'n'.

Change the root password? [Y/n] 
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]  
 ... 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] 
 ... Success!

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] 
 - 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] 
 ... 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

 修改mariadb配置文件

[root@lnmp ~]# vim /etc/my.cnf.d/mariadb-server.cnf
[mysqld]
 17 init_connect='SET collation_connection = utf8_unicode_ci'
 18 init_connect='SET NAMES utf8'
 19 character-set-server=utf8
 20 collation-server=utf8_unicode_ci                                                   
 21 skip-character-set-client-handshake
 [root@lnmp ~]# vim /etc/my.cnf.d/mysql-clients.cnf 
 6 [mysql]
 7 default-character-set=utf8 
 #重启服务
[root@lnmp ~]# systemctl  restart  mariadb.service 
[root@lnmp ~]# systemctl  enable mariadb.service 
[root@lnmp ~]# 
 部署discuz论坛

官网:Discuz!官方网站 - 开放、连接、共赢

下载并解压

[root@lnmp ~]# wget https://gitee.com/Discuz/DiscuzX/attach_files/1621557/download
--2024-04-23 12:00:26--  https://gitee.com/Discuz/DiscuzX/attach_files/1621557/download
正在解析主机 gitee.com (gitee.com)... 180.76.198.77
正在连接 gitee.com (gitee.com)|180.76.198.77|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 302 Found
位置:https://foruda.gitee.com/attach_file/1703208479609778362/discuz_x3.5_sc_utf8_20231221.zip?token=faa18eb48c16a19d7dfae3068a01b3f2&ts=1713844827&attname=Discuz_X3.5_SC_UTF8_20231221.zip [跟随至新的 URL]
--2024-04-23 12:00:27--  https://foruda.gitee.com/attach_file/1703208479609778362/discuz_x3.5_sc_utf8_20231221.zip?token=faa18eb48c16a19d7dfae3068a01b3f2&ts=1713844827&attname=Discuz_X3.5_SC_UTF8_20231221.zip
正在解析主机 foruda.gitee.com (foruda.gitee.com)... 180.76.198.77
正在连接 foruda.gitee.com (foruda.gitee.com)|180.76.198.77|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:11593050 (11M) [application/zip]
正在保存至: “download”

download                                     100%[==============================================================================================>]  11.06M   524KB/s  用时 22s     

2024-04-23 12:00:49 (515 KB/s) - 已保存 “download” [11593050/11593050])
[root@lnmp ~]# unzip download  //直接解压即可
Archive:  download
  inflating: LICENSE                 
  inflating: qqqun.png               
   creating: readme/
  inflating: readme.html             
省略 。。。。。。

把解压后的upload下的文件都复制到nginx的html下

[root@lnmp ~]# rm -rf /usr/local/nginx/html/*
[root@lnmp ~]# \cp  -r upload/* /usr/local/nginx/html/

修改nginx配置

 [root@lnmp ~]# vim /usr/local/nginx/conf/nginx.conf
 43         location / {
 44             root  /usr/local/nginx/html/;   //修改路径                                                                                                                       
 45             index  index.php index.html index.htm; //增加index.php文件
 46         }
 
 65         location ~ \.php$ {
 66             root           /usr/local/nginx/html/; 
 67             fastcgi_pass   127.0.0.1:9000;                                                                                                                                  
 68             fastcgi_index  index.php;
 69             fastcgi_param  SCRIPT_FILENAME   /usr/local/nginx/html$fastcgi_script_name;       //脚本路径
 70             include        fastcgi_params;
 [root@lnmp ~]# /usr/local/nginx/sbin/nginx  -s reload  
[root@lnmp ~]# chown  -R nginx:nginx  /usr/local/nginx/html/
[root@lnmp ~]# chmod  777  -R /usr/local/nginx/html/
[root@lnmp ~]# setenforce  0
[root@lnmp ~]# systemctl  restart  firewalld.service 

浏览器访问

 回到linux,进入MySQL创建一个登录用户,并授权

[root@lnmp ~]# mysql -uroot -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.5.16-MariaDB MariaDB Server

Copyright (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)]> 
MariaDB [(none)]> create user 'DZ'@'%' identified by '123456';
Query OK, 0 rows affected (0.005 sec)

MariaDB [(none)]> grant all privileges on *.*  to 'DZ'@'%';
Query OK, 0 rows affected (0.001 sec)
 
MariaDB [(none)]> flush privileges;     //刷新权限表
Query OK, 0 rows affected (0.001 sec)

 回到浏览器刷新再次填写

 下一步等待安装完成

 进入后界面如下

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

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

相关文章

高级数据结构—线段树(一)

学线段树的原因是因为cf的一道题目始终想不出来怎么优化&#xff0c;后来知道区间查询和修改要用到线段树。。。 原题&#xff1a;Iva & Pav 线段树的作用 区间最值查询&#xff1a;可以高效地找到给定区间内的最大值、最小值等。 区间和查询&#xff1a;可以高效地计算…

Leetcode算法训练日记 | day34

专题九 贪心算法 一、K次取反后最大化的数组和 1.题目 Leetcode&#xff1a;第 1005 题 给你一个整数数组 nums 和一个整数 k &#xff0c;按以下方法修改该数组&#xff1a; 选择某个下标 i 并将 nums[i] 替换为 -nums[i] 。 重复这个过程恰好 k 次。可以多次选择同一个…

关于Spring事务管理之默认事务间调用问题

由事务的传播行为我们知道, 如果将方法配置为默认事务REQUIRED在执行过程中Spring会为其新启事务REQUIRES_NEW, 作为一个独立事务来执行. 由此存在一个问题。 如果使用不慎, 会引发org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back bec…

ACE框架学习

目录 ACE库编译 ACE Reactor框架 ACE_Time_Value类 ACE_Event_Handler类 ACE定时器队列类 ACE_Reator类 ACE Reactor实现 ACE_Select_Reactor类 ACE_TP_Reactor类 ACE_WFMO_Reactor类 ACE库编译 首先去ACE官网下载安装包&#xff0c;通过vs2017或者2019进行编译&#x…

【洛谷 P8605】[蓝桥杯 2013 国 AC] 网络寻路 题解(图论+无向图+组合数学)

[蓝桥杯 2013 国 AC] 网络寻路 题目描述 X X X 国的一个网络使用若干条线路连接若干个节点。节点间的通信是双向的。某重要数据包&#xff0c;为了安全起见&#xff0c;必须恰好被转发两次到达目的地。该包可能在任意一个节点产生&#xff0c;我们需要知道该网络中一共有多少种…

10.接口自动化测试学习-Pytest框架(2)

1.mark标签 如果在每一个模块&#xff0c;每一个类&#xff0c;每一个方法和用例之前都加上mark标签&#xff0c;那么在pytest运行时就可以只运行带有该mark标签的模块、类、接口。 这样可以方便我们执行自动化时&#xff0c;自主选择执行全部用例、某个模块用例、某个流程用…

数据分析专家能力模型

招式&#xff1a;懂商业&#xff08;业务能力&#xff09; 外功更偏重于技能&#xff0c;首先需要懂招式&#xff0c;即懂商业&#xff0c;数据分析最终是为业务服务的&#xff0c;无论是互联网企业准求的用户增长和UJM分解&#xff0c;还是传统企业追求的降本增效和精细化运营…

appium相关的知识

>adb shell dumpsys window | findstr mCurrentFocus adb devices # 实例化字典 desired_caps = dict() desired_caps[platformName] = Android desired_caps[platformVersion] = 9 # devices desired_caps[deviceName] = emulator-5554 # 包名 desired_caps[appPackage] …

重建大师出现“密集匹配失败”的情况是什么原因?

答&#xff1a;一般出现密集匹配失败的情况&#xff0c;就是瓦块连接点过少&#xff0c;空瓦块边缘瓦块等原因导致。遇见这种情况&#xff0c;确定是边缘瓦块导致后&#xff0c;就可以不用管&#xff0c;不是模型主体&#xff0c;不影响成果。 重建大师是一款专为超大规模实景三…

MySQL__索引

文章目录 &#x1f60a; 作者&#xff1a;Lion J &#x1f496; 主页&#xff1a; https://blog.csdn.net/weixin_69252724 &#x1f389; 主题&#xff1a; MySQL__索引&#xff09; ⏱️ 创作时间&#xff1a;2024年04月23日 ———————————————— 索引介绍…

消消乐算法总结

前言 最近在工作中遇到一个问题&#xff0c;做一个消消乐的demo项目&#xff0c;连续相同数目超过四个后就要消除。我在网上看了很多解决方案&#xff0c;有十字形&#xff0c;横向&#xff0c;纵向&#xff0c;梯形搜索。越看越迷糊。这不是用一个BFS就能解决的问题吗&#x…

MySQL数据库进阶篇一(存储引擎、索引)

目录 一、存储引擎1.1、MySQL体系结构&#xff1a;连接层&#xff0c;Server层&#xff0c;引擎层&#xff0c;存储层1.2、存储引擎1.2.1、存储引擎&#xff1a;InnoDB(MySQL 5.5后默认的存储引擎)1.2.2、存储引擎&#xff1a;MyISAM (MySQL早期默认存储引擎)1.2.3、存储引擎&a…

数据可视化———Tableau

基本认识&#xff1a; 维度&#xff1a;定性—字符串文本&#xff0c;日期和日期时间等等 度量&#xff1a;定量—连续值&#xff0c;一般属于数值 数据类型&#xff1a; 数值 日期/日期时间 字符串 布尔值 地理值 运算符 算数运算符&#xff1a;加减乘除,%取余&#xff0c;…

【Flask】Flask中HTTP请求与接收

一、接收http请求与返回响应 在Flask中&#xff0c;可以通过app.route装饰器来定义路由函数。 app.route(/BringGoods,methods [POST, GET]) GET请求&#xff1a;使用request.args.get(key)或者request.values.get(key)来获取URL中的参数。 POST请求&#xff1a; 使用req…

Python自学之路--001:Python + PyCharm安装图文详解教程

目录 1、概述 2、Python解释器 2.1、下载 2.2、Python安装 2.3、Python环境变量配置&#xff0c;必选项 3、PyCharm安装 3.1、PyCharm下载 3.2、PyCharm安装 4、建一个Hello World 5、Phcarm设置 5.1、Phcarm汉化 5.2、Phcarm工具栏显示在顶部 5.3、Phcarm通过pip安…

【QT学习】9.绘图,三种贴图,贴图的转换,不规则贴图(透明泡泡)

一。绘图的解释 Qt 中提供了强大的 2D 绘图系统&#xff0c;可以使用相同的 API 在屏幕和绘图设备上进行绘制&#xff0c;它主要基于QPainter、QPaintDevice 和 QPaintEngine 这三个类。 QPainter 用于执行绘图操作&#xff0c;其提供的 API 在 GUI 或 QImage、QOpenGLPaintDev…

linux18:进程等待

进程等待的必要性 1&#xff1a;子进程创建的目的是要完成父进程指派的某个任务&#xff0c;当子进程运行完毕退出时&#xff0c;父进程需要通过进程等待的方式&#xff0c;回收子进程资源&#xff0c;获取子进程退出信息&#xff08;子进程有无异常&#xff1f;没有异常结果是…

研究发现:提示中加入数百个示例显著提升大型语言模型的性能

每周跟踪AI热点新闻动向和震撼发展 想要探索生成式人工智能的前沿进展吗&#xff1f;订阅我们的简报&#xff0c;深入解析最新的技术突破、实际应用案例和未来的趋势。与全球数同行一同&#xff0c;从行业内部的深度分析和实用指南中受益。不要错过这个机会&#xff0c;成为AI领…

人工智能时代的关键技术:深入探索向量数据库及其在AI中的应用

文章目录 1. 理解向量数据库&#xff1a;二维模型示例2. 向量数据库中的数据存储与检索3. 向量数据库如何工作&#xff1f;4. 向量数据库如何知道哪些向量相似&#xff1f; 在人工智能技术日益成熟的当下&#xff0c;向量数据库作为处理和检索高维数据的关键工具&#xff0c;对…

LlamaIndex 加 Ollama 实现 Agent

AI Agent 是 AIGC 落地实现的场景之一&#xff0c;与 RAG 不同&#xff0c;RAG 是对数据的扩充&#xff0c;是模型可以学习到新数据或者本地私有数据。AI Agent 是自己推理&#xff0c;自己做&#xff0c;例如你对 AI Agent 说我要知道今天上海的天气怎么样&#xff0c;由于 AI…
最新文章