42、nginx之nginx.conf

news2024/7/4 5:20:32

nginx----web服务器

一、nginx

http就是apache,在国内很少。

nginx是开源的,是一款高性能,轻量级的web服务软件。

稳定性高,而且版本迭代比较快(修复bug速度比较快,安全性快)

消耗系统资源很低,http的请求并发连接,单台服务器开源支持30000-50000个并发请求。(系统资源全部分配给nginx)

单个节点的nginx一般支持20000个并发。

1.1、nginx的功能:

1、静态文件服务:静态页面,可以直接提高静态文件服务,html css jsp。处理静态页面的响应速度很快,效率很好。

2、代理:正向代理,反向代理。可以实现负载均衡,高可用和故障转移。

3、动态内容处理,nginx并不能直接处理动态请求,可以通过中间件nginx 中间件(php,tomat) mysql把动态请求转发给后端服务器。

4、支持加密的http,https

5、可以实现重定向。

6、虚拟主机,一个nginx可以配置多个域名和站点。

7、nginx自带缓存。

8、性能可以扩展。处理能力可以随时调整。

1.2、nginx的应用场景:

  1. 静态页面

  2. 转发动态请求

  3. 反向代理,负载均衡

  4. 缓存服务

1.3、编译过程中代码解释

./configure --prefix=/usr/local/nginx \
--user=nginx \
--group=nginx \
--with-http_ssl_module \   ##支持https的加密功能ss/tls
--with-http_v2_module \   ##支持http2.0协议

--with-http_realip_module \  ##支持nginx获取客户端的真实ip地址
--with-http_stub_status_module \  ##支持nginx获取访问状态信息的功能
--with-http_gzip_static_module \  ##支持页面压缩功能
--with-pcre \                   ##支持prce库
--with-stream \             ##支持4层代理的模块 
--with-stream_ssl_module \   ##支持对tcp连接的加密
--with-stream_realip_module   ##支持从代理协议中获取客户端的真实ip地址

make -j4 && make install #启动四个cpu进行

conf 配置文件目录

html 工作目录 50x.html默认的访问操作打开的页面

index.html默认的访问主页

logs 日志目录 访问和报错日志

sbin nginx的二进制启动脚本

ln -s /usr/local/nginx/sbin/nginx /usr/sbin/ #让系统识别nginx的二进制脚本

1.3.1、nginx的常用命令

nginx -t 检测nginx.conf配置文件的语法是否正确

nginx -v 显示nginx的版本

nginx -V显示版本和配置项

nignx -s 信号 stop 关闭nginx

reload 重新加载nginx,如果更改了配置文件,nginx -s reload 无需重新启动服务。

systemctl daemon-reload

二、课后重新编译安装nginx

rpm -q nginx        ##检查yum是否安装

yum -y remove nginx ##有则卸载

cd /opt         

 rz -E
rz waiting to receive.

systemctl stop firewalld       ##关闭安全机制
setenforce 0

yum -y install gcc pcre-devel openssl-devel zlib-devel openssl  openssl-devel  ##配置编译环境

useradd -M -s /sbin/nologin nginx        ##添加程序用户

tar -xf nginx-1.22.0.tar.gz       ##源码解压

cd /nginx-1.22.0/         ## 进入nginx的文件夹,配置暗转路径,以及相关组件

./configure --prefix=/usr/local/nginx \
--user=nginx \
--group=nginx \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_realip_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \
--with-pcre \
--with-stream \
--with-stream_ssl_module \
--with-stream_realip_module

make -j 4 && make install  ##编译和安装

[root@test1 nginx-1.22.0]# cd /usr/local/
[root@test1 local]# ls
bin  etc  games  include  lib  lib64  libexec  nginx  sbin  share  src

chown -R nginx.nginx nginx/    ##更改权限

[root@test1 local]# cd nginx
[root@test1 nginx]# ll
总用量 4
drwxr-xr-x. 2 nginx nginx 4096 7月   1 16:04 conf
drwxr-xr-x. 2 nginx nginx   40 7月   1 16:04 html
drwxr-xr-x. 2 nginx nginx    6 7月   1 16:04 logs
drwxr-xr-x. 2 nginx nginx   19 7月   1 16:04 sbin

[root@test1 nginx]# cd conf/
[root@test1 conf]# ls
fastcgi.conf            koi-utf             nginx.conf           uwsgi_params
fastcgi.conf.default    koi-win             nginx.conf.default   uwsgi_params.default
fastcgi_params          mime.types          scgi_params          win-utf
fastcgi_params.default  mime.types.default  scgi_params.default
[root@test1 conf]# cd ..
[root@test1 nginx]# ls
conf  html  logs  sbin
[root@test1 nginx]# cd html/
[root@test1 html]# ls
50x.html  index.html

ln -s /usr/local/nginx/sbin/nginx /usr/sbin/  ##做一个软连接,让系统能够识别nginx的指令

[root@test1 opt]# nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

 vim /lib/systemd/system/nginx.service      ##设置系统控制,系统能对nginx这个软件的运行状态进行控制

[Unit]
Description=nginx - high performance web server
Documentation=http://nginx.org/en/docs/
After=network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target
[Service]
Type=forking
PIDFile=/usr/local/nginx/run/nginx.pid
ExecStart=/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID
[Install]
WantedBy=multi-user.target

cd /usr/local/nginx/

mkdir run            ##修改nginx的配置文件,把进程文件pid文件的位置指向到设置的位置

drwx------. 2 nginx root     6 7月   1 16:14 client_body_temp
drwxr-xr-x. 2 nginx nginx 4096 7月   1 16:04 conf
drwx------. 2 nginx root     6 7月   1 16:14 fastcgi_temp
drwxr-xr-x. 2 nginx nginx   40 7月   1 16:04 html
drwxr-xr-x. 2 nginx nginx   58 7月   1 16:14 logs
drwx------. 2 nginx root     6 7月   1 16:14 proxy_temp
drwxr-xr-x. 2 root  root     6 7月   1 16:24 run
drwxr-xr-x. 2 nginx nginx   19 7月   1 16:04 sbin

chown nginx.nginx run

cd conf/

vim nginx.conf

pid /usr/local/nginx/run/nginx.pid;

nginx -t

systemctl daemon-reload

systemctl restart nginx

面试题:如果出现了500,怎么来排查这个错误?

1、查看日志

2、查看内部服务器的服务是否启动。

3、查看防火墙的规则配置,是否有限制。

4、查看硬件是否负载过高。

三、nginx.conf

3.1、nginx.conf

1、全局模块

worker_processes 1;--------工作进程数,设置成服务器内核数的2倍(一般不超过8个,超过8个反正会降低性能,4个,1-2个)

#user nobody;------#默认的程序用户就是nginx,这里可以保持注释无需修改

pid /usr/local/nginx/run/nginx.pid;----------#pid文件的位置;

events { worker_connections 1024;}----------#events模块,决定了ngin能够处理的连接数,连接数和worker_connections的数值相乘—1*1024。

处理进程的过程必然涉及配置文件和展示页面,也就是涉及打开文件的数量

linux默认打开的文件就是1024个

vim /etc/security/limits.conf ##进程数量更改

限制先改,进程数量才能生效,默认1024。

*soft nproc 65535----#能打开的进程最大数的软限制是65535

*hard nproc 65535----#能打开的进程最大数的硬限制是65535

*soft nofile 65535-------#软限制进程打开文件数的最大值65535

*hard nofile 65535----------#硬限制进程打开文件数的最大值65535

配置要生效,只能重启,这是系统初始化的一个环节。

在这里插入图片描述

http {
include mime.types;
default_type application/octet-stream;

#http转发和处理http请求,设置代理(正向代理,反向代理),缓存。定义日志格式,重定向配置

include mime.types;------#文件扩展名于文件类型的映射表。nginx能够打开的文件和支持的文件类型。

default_type application/octet-stream;--------------#默认支持的文件类型 。.html .htm .jsp .js .php

 #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '

'$status $body_bytes_sent "$http_referer" '

'"$http_user_agent" "$http_x_forwarded_for"';  #日志格式,默认的日志格式,记录了access.log,访问日志的格式,error.log也是一样的格式

#access_log logs/access.log main;-------##默认的访问日志的存放路径

sendfile on;—#支持文件发送和下载

#tcp_nopush on;–#默认就是异步非阻塞模式功能

#keepalive_timeout 0;
keepalive_timeout 65;–#连接保持时间,单位为秒/s。

#gzip on;----#gzip模块,设置是否开启页面压缩功能。

##开启web服务的模块

 server {
        listen       80;#nginx的默认监听端口
        server_name  localhost;#配置站点的域名
  #charset koi8-r;#网页的字符集
 #access_log  logs/host.access.log  main;
#网页匹配的工作目录的地址和支持的打开页面的文件类型。
 location /xy102(URI) {
 root   html(/opt/test1)(URL);
#192.168.168.10/opt/test1/xy102/index.html
#家目录。nginx工作目录的家目录,/usr/local/nginx/html
index  index.html index.htm;
 }

错误日志位置

tail -f /usr/local/nginx/logs/error.log

在这里插入图片描述

在这里插入图片描述

访问是缓存,清除缓存

在这里插入图片描述

#alisa也是指匹配nginx的工作目录

root 换成 alisa

在这里插入图片描述

在这里插入图片描述

alisa是绝对路径。URL/URI

3.2、root和alias的区别:

root的匹配模式 :拼接

root的工作目录,访问的是uri /xy102

location /xy102;

/opt/test1/

拼接为/opt/test1/xy102

alias匹配nginx的工作目录,路径是绝对路径

location /xy102

alias /opt/test1/xy102/;

alias只能写在http模块当中server模块的location模块里面。

root 可以写在server模块,也可以在http,也可以在location中。

alias匹配工作目录,不能使用重定向功能。

3.3、全局模块

work_processes 1:指定进程数

events:模块决定了能够处理的连接数

stream:四层代理模块

http模块

转发和处理http请求,设置代理(正向代理,反向代理),缓存。定义日志格式,重定向配置

在http模块当中,包含:

server块 http里面可以有多个server模块

在server模块当中包含:

location模块

在server当中可以有多个location。

在这里插入图片描述

实验1:#统计访问状态

Active connections:1 #当前活动的连接数

server accepts handled requests #表示已经处理的连接数

36 36 36 #三个数,从左往右,已经处理的连接数;成功建立连接的次数;已经处理的请求数

Reading:0 writing:1 Waiting:0

Reading:表示服务端正在从客户端读取请求的数据

writing:表示服务端正在把响应数据发送给客户端

Waiting:表示有连接处于空闲状态,等待新的请求。

server里写入统计访问状态

  location /status {
        stub_status on;
        #打开状态统计功能
        access_log off;
        #关闭status的访问日志;
        }

访问192.168.168.10/status

结果如下:

在这里插入图片描述

实验2:基于密码的授权进行访问控制

yum -y install httpd-tools #先安装工具

location / 根目录加密

vim nginx.conf

    #access_log  logs/host.access.log  main;
    location / {
        root   html;
        index  index.html index.htm;
    auth_basic "secret";
    #开启用户密码验证
    auth_basic_user_file /usr/local/nginx/passwd.db;
    #使用指定的加密文件
    }
    yum -y install httpd-tools
    htpasswd -c /usr/local/nginx/passwd.db dn
[root@test1 nginx]# chown nginx passwd.db 
[root@test1 nginx]# chmod 400 passwd.db

在这里插入图片描述

需要输入设置的用户名和对应设置的密码进行访问

实验3:基于客户端的访问控制 ip地址来进行控制

#添加控制规则

vim /usr/local/nginx/conf/nginx.conf

deny 192.168.168.20;

allow all;

用192.168.168.20测试结果:

在这里插入图片描述

实验4:基于域名的nginx主机

vim nginx.conf

server {
    listen       80;
    server_name  www.xy102.com;
    charset utf-8;
    access_log  logs/www.xy102.com.access.log;
    #access_log  logs/host.access.log  main;
    location / {
        root   /var/www/html/xy102;
        index  index.html index.htm;
    }
 #新增加域名访问
  server {
          listen       80;
          server_name  www.ly.com;
          charset utf-8;
   access_log  logs/www.ly.com.access.log;
  #access_log  logs/host.access.log  main;
   location / {
   root   /var/www/html/ly;
   index  index.html index.htm;
    }

  error_page   500 502 503 504  /50x.html;
 location = /50x.html {
           root   html;
        }
        }
vim /etc/hosts----本地映射

192.168.168.10 www.xy102.com

mkdir -p /var/www/html/xy102

echo "我们都爱学习" > /var/www/html/xy102/index.html

curl www.xy102.com
我们都爱学习

192.168.168.10 www.xy102.com www.ly.com
#域名可以用同一个IP地址

mkdir -p /var/www/html/ly

echo "我真帅" > /var/www/html/ly/index.html

 curl www.ly.com
我真帅


实验5:基于ip地址的虚拟主机

ifconfig ens33:0 192.168.168.100/24
[root@test1 conf]# ifconfig 
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.168.10  netmask 255.255.255.0  broadcast 192.168.168.255
        inet6 fe80::20c:29ff:fe1a:7434  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:1a:74:34  txqueuelen 1000  (Ethernet)
        RX packets 10190  bytes 895390 (874.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6728  bytes 886953 (866.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens33:0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.168.100  netmask 255.255.255.0  broadcast 192.168.168.255
        ether 00:0c:29:1a:74:34  txqueuelen 1000  (Ethernet)

多个ip地址:

 server {
        listen      192.168.168.10:80;
        server_name  www.xy102.com;
        charset utf-8;
        access_log  logs/www.xy102.com.access.log;
        location / {
            root   /var/www/html/xy102;
            index  index.html index.htm;
        }
        location /xy103 {
        alias /opt/test1/xy103;
        index index.html;
        }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html;
    }

server {
                listen      192.168.168.100:80;
                server_name  www.ly.com;
                charset utf-8;
                access_log  logs/www.ly.com.access.log;
                    #access_log  logs/host.access.log  main;
                location / {
                root   /var/www/html/ly;
                        index  index.html index.htm;
                }

          error_page   500 502 503 504  /50x.html;
  location = /50x.html {
       root   html;
    }
    }

测试结果

在这里插入图片描述

实验6:基于端口实现多个虚拟主机

ifconfig ens33:0 192.168.168.100/24

 server {
        listen      192.168.168.10:80;
        server_name  www.xy102.com;
        charset utf-8;
        access_log  logs/www.xy102.com.access.log;
        location / {
            root   /var/www/html/xy102;
            index  index.html index.htm;
        }
        location /xy103 {
        alias /opt/test1/xy103;
        index index.html;
        }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html;
    }

server {
                listen      192.168.168.100:80;
                server_name  www.ly.com;
                charset utf-8;
                access_log  logs/www.ly.com.access.log;
                    #access_log  logs/host.access.log  main;
                location / {
                root   /var/www/html/ly;
                        index  index.html index.htm;
                }

​        error_page   500 502 503 504  /50x.html;
location = /50x.html {
​    root   html;
}

}


在这里插入图片描述

[root@test1 nginx]# cd logs
[root@test1 logs]# ls
access.log  error.log  www.ly.com.access.log  www.xy102.com.access.log

在这里插入图片描述

实验7:多个配置文件

vim nginx.conf

include /usr/local/nginx/conf.d/*.conf--------##可以识别到conf.d下,只包含server模块的conf文件。把server单独放到一个文件当中去。不在nginx.conf文件当中。
cd /usr/local/nginx

mkdir conf.d

vim test1.conf


在这里插入图片描述

server {
        listen      8881;
        server_name  localhost;
        charset utf-8;
             location /test1 {
            root   /opt/conf;
            index  index.html index.htm;
        }
}
server {
        listen      8882;
        server_name  localhost;
        charset utf-8;
             location /test2 {
            root   /opt/conf;
            index  index.html index.htm;
        }

}


mkdir -p /opt/conf/test1

[root@test1 conf.d]# nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
[root@test1 conf.d]# mkdir -p /opt/conf/test1
[root@test1 conf.d]# echo "wozhenshuai" > /opt/conf/test1/index.html
[root@test1 conf.d]# 
[root@test1 conf.d]# mkdir -p /opt/conf/test2
[root@test1 conf.d]# echo "wozhenchou" > /opt/conf/test2/index.html
[root@test1 conf.d]# netstat -antp | grep nginx
tcp        0      0 192.168.168.10:8080     0.0.0.0:*               LISTEN      15027/nginx: master 
tcp        0      0 192.168.168.10:8081     0.0.0.0:*               LISTEN      15027/nginx: master 


在这里插入图片描述

实验8:nginx优化与防盗链:

[root@test1 conf.d]# curl -I 192.168.168.10:8881/test1/
HTTP/1.1 200 OK
Server: nginx/1.22.0
Date: Tue, 02 Jul 2024 08:27:16 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 12
Last-Modified: Tue, 02 Jul 2024 08:02:36 GMT
Connection: keep-alive
ETag: "6683b41c-c"
Accept-Ranges: bytes
[root@test1 conf]# vim nginx.conf

server_tokens off;

[root@test1 conf]# nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
[root@test1 conf]# systemctl restart nginx
[root@test1 conf]# curl -I 192.168.168.10:8881/test1/
HTTP/1.1 200 OK
Server: nginx
Date: Tue, 02 Jul 2024 08:31:42 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 12
Last-Modified: Tue, 02 Jul 2024 08:02:36 GMT
Connection: keep-alive
ETag: "6683b41c-c"
Accept-Ranges: bytes

在这里插入图片描述

隐藏版本号:

在/usr/local/nginx/conf/nginx.conf

添加server_tokens off;

基于第八个实验拓展

 cd /opt/
[root@test1 opt]# ls
aa  conf  jenkins-2.396-1.1.noarch.rpm  nginx-1.22.0  nginx-1.22.0.tar.gz  test
[root@test1 opt]# cd nginx-1.22.0/
[root@test1 nginx-1.22.0]# ls
auto     CHANGES.ru  configure  html     Makefile  objs    src
CHANGES  conf        contrib    LICENSE  man       README
[root@test1 nginx-1.22.0]# cd src/
[root@test1 src]# ls
core  event  http  mail  misc  os  stream
[root@test1 src]# cd core/
[root@test1 core]# ls

[root@test1 core]# vim nginx.h

#define NGINX_VERSION      "wozhenshuai"
#define NGINX_VER          "nibiecai/" NGINX_VERSION

[root@test1 core]# cd ..
[root@test1 src]# cd ..
[root@test1 nginx-1.22.0]# ./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_stub_status_module


[root@test1 nginx-1.22.0]# make -j 4 && make install

cd /usr/local/nginx/
[root@test1 nginx]# cd conf
[root@test1 conf]# vim nginx.conf

server_tokens on;



[root@test1 conf]# nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
[root@test1 conf]# systemctl restart nginx


[root@test1 conf]# curl -I 192.168.168.10:8881/test1/
HTTP/1.1 200 OK
Server: nibiecai/wozhenshuai
Date: Tue, 02 Jul 2024 08:49:31 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 12
Last-Modified: Tue, 02 Jul 2024 08:02:36 GMT
Connection: keep-alive
ETag: "6683b41c-c"
Accept-Ranges: bytes

在这里插入图片描述

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

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

相关文章

中日区块链“大比拼”!中国蚂蚁加大区块链押注资本!日本索尼进军加密货币市场!

科技巨头在区块链和加密货币领域的动作越来越频繁。近期&#xff0c;中国金融科技巨头蚂蚁集团进一步加大了在区块链业务上的投资&#xff0c;而日本电子科技巨头索尼集团则正式进军加密货币交易领域。这些举措反映了两国对于区块链和加密资产领域的不同态度和布局。 蚂蚁集团加…

Load Tensor to local Nvidia GPU

0. 安装Nvidia驱动 ubuntu24.04的安装非常简单&#xff0c;在安装界面&#xff0c;选择为"图形化和其他硬件安装驱动"&#xff0c;重启后即有原版Nvidia驱动(如图Nvidia X xxx) 1.确定电脑上是否有NvidiaGPU且安装好Nvidia驱动 import torch print(torch.version…

LInux SSH Server远程代码执行漏洞 (CVE-2024-6387)处理

一、漏洞描述 2024年7月1日&#xff0c;OpenSSH Server中存在的一个RCE远程代码执行漏洞&#xff08;CVE-2024-6387&#xff0c;又被称为regreSSHion&#xff09;细节被公开&#xff0c;该漏洞影响基于glibc的Linux系统上的OpenSSH Server (sshd)。 默认配置下的OpenSSH Serve…

MIX OTP——依赖项和总体项目

在本章中&#xff0c;我们将讨论如何管理 Mix 中的依赖项。 我们的 kv 应用程序已经完成&#xff0c;现在是时候实现处理我们在第一章中定义的请求的服务器了&#xff1a; 但是&#xff0c;我们不会向 kv 应用程序添加更多代码&#xff0c;而是将 TCP 服务器构建为另一个应用程…

Linux系统之安装Firefox浏览器

Linux系统之安装Firefox浏览器 一、Firefox浏览器介绍1.1 Firefox浏览器介绍1.2 Firefox浏览器特点 二、环境介绍二、本次实践环境介绍2.1 环境规划2.2 本次实践介绍 三、安装firefox浏览器3.1 安装epel3.2 检查yum仓库状态3.3 安装Firefox浏览器3.4 查看Firefox版本 四、在命令…

win11电源设置

把钩子去掉以后 win11的电脑关机才有用 否则&#xff0c;关机了&#xff0c;电脑也实际上一直在运行

partition()方法——分割字符串为元组

自学python如何成为大佬(目录):https://blog.csdn.net/weixin_67859959/article/details/139049996?spm1001.2014.3001.5501 语法参考 partition()方法根据指定的分隔符将字符串进行分割。如果字符串中包含指定的分隔符&#xff0c;则返回一个3元的元组&#xff0c;第一个为…

HarmonyOS(38) UIAbility里icon和label的作用

UIAbility里icon和label的作用 icon和label实际效果测试代码传送门参考资料 icon和label 为使应用能够正常使用UIAbility&#xff0c;需要在module.json5配置文件的abilities标签中声明UIAbility的名称、入口、标签等相关信息&#xff1a; {"module": {..."ab…

3.3prometheus命令行参数讲解

本节重点介绍 : target页面flags页面status页面tsdb-status页面 访问地址 $ip:9090 target页面 flags页面 展示命令行参数的&#xff0c;没设置的取默认值 status页面 描述运行信息和编译的信息 tsdb-status页面 打印存储的运行状态信息帮我们定位重查询的 服务发现页面…

怎么把录音转文字?推荐几个简单易操作的方法

在小暑这个节气里&#xff0c;炎热的天气让人分外渴望效率up&#xff01;Up&#xff01;Up&#xff01; 对于那些在会议或课堂中急需记录信息的朋友们&#xff0c;手写笔记的速度往往难以跟上讲话的节奏。此时&#xff0c;电脑录音转文字软件就像一阵及时雨&#xff0c;让记录…

深度学习原理与Pytorch实战

深度学习原理与Pytorch实战 第2版 强化学习人工智能神经网络书籍 python动手学深度学习框架书 TransformerBERT图神经网络&#xff1a; 技术讲解 编辑推荐 1.基于PyTorch新版本&#xff0c;涵盖深度学习基础知识和前沿技术&#xff0c;由浅入深&#xff0c;通俗易懂&#xf…

动态顺序表实现通讯录

系列文章目录 【数据结构】顺序表 文章目录 系列文章目录前言一、通讯录的功能要求二、通讯录的代码实现1. 新建文件2. 创建通讯录的结构体3. 对顺序表文件进行修改4. 通讯录具体功能实现4.1. 通讯录的初始化和销毁4.2. 增加联系人信息&#xff08;尾插&#xff09;4.3. 查找指…

无污染的独立海域-第13届蓝桥杯省赛Python真题精选

[导读]&#xff1a;超平老师的Scratch蓝桥杯真题解读系列在推出之后&#xff0c;受到了广大老师和家长的好评&#xff0c;非常感谢各位的认可和厚爱。作为回馈&#xff0c;超平老师计划推出《Python蓝桥杯真题解析100讲》&#xff0c;这是解读系列的第90讲。 无污染的独立海域…

余承东在母校西工大毕业典礼演讲:定位决定地位,眼界决定境界。

添加图片注释&#xff0c;不超过 140 字&#xff08;可选&#xff09; 【6月29日&#xff0c;西北工业大学2024届本科生毕业典礼暨学位授予仪式隆重举行。典礼上&#xff0c;华为常务董事、终端BG 董事长、智能汽车解决方案BU 董事长余承东作为校友代表致辞&#xff0c;为毕业生…

项目实战--Spring Boot实现三次登录容错功能

一、功能描述 项目设计要求输入三次错误密码后&#xff0c;要求隔段时间才能继续进行登录操作&#xff0c;这里简单记录一下实现思路 二、设计方案 有几个问题需要考虑一下&#xff1a; 1.是只有输错密码才锁定&#xff0c;还是账户名和密码任何一个输错就锁定&#xff1f;2…

gz格式文件16进制分析

接上篇长虹55D3P (海思平台)kernel分区解包ramdisk重新打包-CSDN博客深入研究下gz格式 上篇说到分割得到的ramdisk会有垃圾数据&#xff0c;对于ramdisk无用的垃圾数据可能有其他用途。我们只需要修改ramdisk&#xff0c;就必须准确知道ramdisk的起始地址和结束地址&#xff0…

刚入行的测试新人,应该如何规划自己的职业发展路径?

作为一个刚入行的测试新人&#xff0c;应该如何规划自己的职业发展路径&#xff1f;如何规划自己的技术路线&#xff1f;软件测试的段位都有哪些&#xff1f;他们之间的薪资差异如何&#xff1f; 听说这些问题&#xff0c;是目前想要入行软件测试的同学们最关心的。那么我们今天…

钡铼BL104智慧环保多个485采集转MQTT无线传输

PLC物联网关BL104是一款专为工业环境设计的先进协议转换网关&#xff0c;其集成了钡铼智能技术和环保多个485采集转MQTT无线传输功能&#xff0c;为工业控制系统提供了高效的数据采集、传输和管理解决方案。 技术规格与功能特点 PLC物联网关BL104采用钡铼智能技术&#xff0c…

k8s部署单节点redis

一、configmap # cat redis-configmap.yaml apiVersion: v1 kind: ConfigMap metadata:name: redis-single-confignamespace: redis data:redis.conf: |daemonize nobind 0.0.0.0port 6379tcp-backlog 511timeout 0tcp-keepalive 300pidfile /data/redis-server.pidlogfile /d…

顺序表实现——通讯录

前言&#xff1a; 通过对数据结构--顺序表的学习&#xff0c;了解了顺序表的增加数据&#xff0c;删除数据等功能&#xff1b;我们就可以基于顺序表来实现通讯录&#xff0c;接下来就一起来实现通讯录。 首先我们需要存储通讯录中联系人信息&#xff0c;这里创建一个结构体&…