当前位置: 首页 > news >正文

【Linux】Ubuntu 22.04 上安装最新版 Nextcloud Hub 7 (28.0.1)

在 Ubuntu 22.04 上安装 PHP 版本

安装多个 PHP 版本的最简单方法是使用来自 Debian 开发人员 Ondřej Surý 的 PPA。要添加此 PPA,请在终端中运行以下命令。如果要从 PPA 安装软件,则需要 software-properties-common 包。它会自动安装在 Ubuntu 桌面上,但可能会在您的 Ubuntu 服务器上丢失。

sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update

SURY 存储库包含 PHP 8.1、8.0、7.4、7.3、7.2、7.1、7.0 和 PHP 5.6。由于 PHP 的最新稳定版本是 8.0,但许多网站仍然需要 PHP 7。您可以在系统上安装任何所需的 PHP 版本。

安装 PHP 8.2

现在您可以通过执行以下命令在 Ubuntu 上安装PHP8.0:

sudo apt-get install php8.2 php8.2-fpm

并安装一些常见的PHP8.2扩展。

sudo apt-get install php8.2-mysql php8.2-mbstring php8.2-xml php8.2-gd php8.2-curl
sudo apt-get install php8.2-curl php8.2-dom php8.2-mbstring php8.2-imagick php8.2-ldap php8.2-imap php8.2-mysql php8.2-gd php8.2-zip php8.2-bz2 php8.2-intl php8.2-smbclient php8.2-bcmath php8.2-gmp php8.2-apcu php8.2-memcached php8.2-redis php8.2-phar

出现提示时,按 y 确认安装。

您可以通过键入sudo apt-get install php8.2 并按两次 Tab 键来查看所有可用的PHP8.0扩展名。

修改用户组为 www :

root      651154       1  0 Jan01 ?        00:00:02 php-fpm: master process (/etc/php/8.2/fpm/php-fpm.conf)
www-data  651155  651154  0 Jan01 ?        00:00:00 php-fpm: pool www
www-data  651156  651154  0 Jan01 ?        00:00:00 php-fpm: pool wwwcd  /etc/php/8.2/fpm/pool.d 
vim  www.conf; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
;       will be used.
user = www
group = www; Set permissions for unix socket, if one is used. In Linux, read/write
; permissions must be set in order to allow connections from a web server. Many
; BSD-derived systems allow connections regardless of permissions. The owner
; and group can be specified either by name or by their numeric IDs.
; Default Values: Owner is set to the master process running user. If the group
;                 is not set, the owner's group is used. Mode is set to 0660.
listen.owner = www
listen.group = www

重新启动php-fpm

sudo systemctl  restart  php8.2-fpm

下载 NextCloud

登录:https://nextcloud.com/install 并单击 download for server按钮以查看最新版本。

# 下载最新的版本
wget https://download.nextcloud.com/server/releases/latest.zip
# 安装unzip
sudo apt install unzip
# 解压到指定的目录
sudo unzip latest.zip  -d /usr/share/nginx/ 
# 修改文件目录属性 
sudo chown www:www /usr/share/nginx/nextcloud/ -R

在MariaDB数据库服务器中为Nextcloud创建数据库和用户

sudo mysql# 创建 nextcloud 数据库
create database nextcloud;
# 创建用户并赋权限 
grant all privileges on nextcloud.* to nextclouduser@localhost identified by 'your-password';
grant all privileges on nextcloud.* to nextclouduser@localhost identified by 'your-password';
# 刷新权限并退出
flush privileges;
exit;

为Nextcloud创建Nginx配置文件

当Nextcloud放置在nginx安装的webroot中时,应使用以下配置。在此示例中,它是, /var/www/nextcloud 并且可以通过以下方式 http(s)😕/cloud.example.com/ 访问

sudo vim /etc/nginx/conf.d/nextcloud.conf 
upstream php-handler {server 127.0.0.1:9000;#server unix:/run/php/php8.o-fpm.sock;
}# Set the `immutable` cache control options only for assets with a cache busting `v` argument
map $arg_v $asset_immutable {"" "";default "immutable";
}server {listen 80;listen [::]:80;server_name cloud.example.com;# Prevent nginx HTTP Server Detectionserver_tokens off;# Enforce HTTPSreturn 301 https://$server_name$request_uri;
}server {listen 443      ssl http2;listen [::]:443 ssl http2;server_name cloud.example.com;# Path to the root of your installationroot /var/www/nextcloud;# Use Mozilla's guidelines for SSL/TLS settings# https://mozilla.github.io/server-side-tls/ssl-config-generator/ssl_certificate     /etc/ssl/nginx/cloud.example.com.crt;ssl_certificate_key /etc/ssl/nginx/cloud.example.com.key;# Prevent nginx HTTP Server Detectionserver_tokens off;# HSTS settings# WARNING: Only add the preload option once you read about# the consequences in https://hstspreload.org/. This option# will add the domain to a hardcoded list that is shipped# in all major browsers and getting removed from this list# could take several months.#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload" always;# set max upload size and increase upload timeout:client_max_body_size 512M;client_body_timeout 300s;fastcgi_buffers 64 4K;# Enable gzip but do not remove ETag headersgzip on;gzip_vary on;gzip_comp_level 4;gzip_min_length 256;gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;gzip_types application/atom+xml text/javascript application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;# Pagespeed is not supported by Nextcloud, so if your server is built# with the `ngx_pagespeed` module, uncomment this line to disable it.#pagespeed off;# The settings allows you to optimize the HTTP2 bandwidth.# See https://blog.cloudflare.com/delivering-http-2-upload-speed-improvements/# for tuning hintsclient_body_buffer_size 512k;# HTTP response headers borrowed from Nextcloud `.htaccess`add_header Referrer-Policy                   "no-referrer"       always;add_header X-Content-Type-Options            "nosniff"           always;add_header X-Frame-Options                   "SAMEORIGIN"        always;add_header X-Permitted-Cross-Domain-Policies "none"              always;add_header X-Robots-Tag                      "noindex, nofollow" always;add_header X-XSS-Protection                  "1; mode=block"     always;# Remove X-Powered-By, which is an information leakfastcgi_hide_header X-Powered-By;# Add .mjs as a file extension for javascript# Either include it in the default mime.types list# or include you can include that list explicitly and add the file extension# only for Nextcloud like below:include mime.types;types {text/javascript js mjs;}# Specify how to handle directories -- specifying `/index.php$request_uri`# here as the fallback means that Nginx always exhibits the desired behaviour# when a client requests a path that corresponds to a directory that exists# on the server. In particular, if that directory contains an index.php file,# that file is correctly served; if it doesn't, then the request is passed to# the front-end controller. This consistent behaviour means that we don't need# to specify custom rules for certain paths (e.g. images and other assets,# `/updater`, `/ocs-provider`), and thus# `try_files $uri $uri/ /index.php$request_uri`# always provides the desired behaviour.index index.php index.html /index.php$request_uri;# Rule borrowed from `.htaccess` to handle Microsoft DAV clientslocation = / {if ( $http_user_agent ~ ^DavClnt ) {return 302 /remote.php/webdav/$is_args$args;}}location = /robots.txt {allow all;log_not_found off;access_log off;}# Make a regex exception for `/.well-known` so that clients can still# access it despite the existence of the regex rule# `location ~ /(\.|autotest|...)` which would otherwise handle requests# for `/.well-known`.location ^~ /.well-known {# The rules in this block are an adaptation of the rules# in `.htaccess` that concern `/.well-known`.location = /.well-known/carddav { return 301 /remote.php/dav/; }location = /.well-known/caldav  { return 301 /remote.php/dav/; }location /.well-known/acme-challenge    { try_files $uri $uri/ =404; }location /.well-known/pki-validation    { try_files $uri $uri/ =404; }# Let Nextcloud's API for `/.well-known` URIs handle all other# requests by passing them to the front-end controller.return 301 /index.php$request_uri;}# Rules borrowed from `.htaccess` to hide certain paths from clientslocation ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/)  { return 404; }location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console)                { return 404; }# Ensure this block, which passes PHP files to the PHP process, is above the blocks# which handle static assets (as seen below). If this block is not declared first,# then Nginx will encounter an infinite rewriting loop when it prepends `/index.php`# to the URI, resulting in a HTTP 500 error response.location ~ \.php(?:$|/) {# Required for legacy supportrewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;fastcgi_split_path_info ^(.+?\.php)(/.*)$;set $path_info $fastcgi_path_info;try_files $fastcgi_script_name =404;include fastcgi_params;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;fastcgi_param PATH_INFO $path_info;fastcgi_param HTTPS on;fastcgi_param modHeadersAvailable true;         # Avoid sending the security headers twicefastcgi_param front_controller_active true;     # Enable pretty urlsfastcgi_pass php-handler;fastcgi_intercept_errors on;fastcgi_request_buffering off;fastcgi_max_temp_file_size 0;}# Serve static fileslocation ~ \.(?:css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ {try_files $uri /index.php$request_uri;add_header Cache-Control "public, max-age=15778463, $asset_immutable";access_log off;     # Optional: Don't log access to assetslocation ~ \.wasm$ {default_type application/wasm;}}location ~ \.woff2?$ {try_files $uri /index.php$request_uri;expires 7d;         # Cache-Control policy borrowed from `.htaccess`access_log off;     # Optional: Don't log access to assets}# Rule borrowed from `.htaccess`location /remote {return 301 /remote.php$request_uri;}location / {try_files $uri $uri/ /index.php$request_uri;}
}

问题解决

  1. IP 受限的问题。
#vim  config.php 
##  添加内容'trusted_domains' =>array (0 => 'cloud.taida.ltd',1 => '192.168.31.10',),
  1. HTTP 强制转换为 HTTPS 的问题

不知道从哪个版本开始,安装指导和配置文件内,都开始指向 https了,即便没有申请证书,也会指向和强制把 http => https 。 修改配置文件,取消这一设定,保持 http 就可以了


<?php
$CONFIG = array ('instanceid' => '444','passwordsalt' => 'r333333','secret' => '4444444','trusted_domains' => array (0 => 'cloud.demo.com',1 => '192.168.31.10',),'datadirectory' => '/www/cloud.demo.com/nextcloud/data','dbtype' => 'mysql','version' => '28.0.1.1',# https://cloud.demo.com 修改为 http://cloud.demo.com'overwrite.cli.url' => 'http://cloud.demo.com',# 'overwriteprotocol' => 'https' 修改 http'overwriteprotocol' => 'http',                              'dbname' => 'nextcloud','dbhost' => 'localhost:3306','dbport' => '','dbtableprefix' => 'oc_','mysql.utf8mb4' => true,'dbuser' => 'clouder','dbpassword' => '11111','installed' => true,
);
  1. PHP 内存限制低于建议值 512 MB

#修改php.ini文件
vim /etc/php/8.2/fpm/php.ini
memory_limit = 1024M
  1. PHP 的安装似乎不正确,无法访问系统环境变量。getenv(“PATH”) 函数测试返回了一个空值。
cd  /etc/php/8.2/fpm/pool.d
vim www.conf ;env[HOSTNAME] = $HOSTNAME
;env[PATH] = /usr/local/bin:/usr/bin:/bin
;env[TMP] = /tmp
;env[TMPDIR] = /tmp
;env[TEMP] = /tmp#打开注释 
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp#执行
printenv PATH
/home/user/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:
/sbin:/bin:/#重启php-fpm
systemctl restart php8.2-fpm
  1. 当前正在使用数据库处理事务性文件锁定。若有内存缓存可用,请进行配置以提升性能

修改config.php 文件添加如下内容:

'filelocking.enabled' => true,
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array('host' => 'localhost','port' => 6379,'timeout' => 0.0,'password' => '', // Optional, if not defined no password will be used.),
  1. 未配置内存缓存。若有内存缓存可用,请进行配置以提升性能

APCu is faster at local caching than Redis. If you have enough memory, use APCu for Memory Caching and Redis for File Locking. If you are low on memory, use Redis for both.

修改config.php 文件添加如下内容:

'memcache.local' => '\OC\Memcache\APCu',
  1. 您在安装过程中未设置默认的国际区号。缺失国际区号的电话号码时将使用默认的国际区号进行验证。要允许无国际区号的电话,请在您的配置文件中添加 “default_phone_region” 设置选项并依照 ISO 3166-1 进行设置。

修改config.php 文件添加如下内容:

'default_phone_region' => 'CN',
  1. PHP OPcache 模块没有正确配置

root@erp:/etc/php/8.2/fpm/conf.d# more  10-opcache.ini 
; configuration for php opcache module
; priority=10
zend_extension=opcache.so
;opcache.jit=off
opcache.save_comments = 1
opcache.revalidate_freq = 60
opcache.validate_timestamps = 0
opcache.jit = 1255
opcache.jit_buffer_size = 128M
  1. 解决Nextcloud新建用户默认语言是英文且默认地区是美国的方法
    语言设置,设置为中文
    编辑 config/config.php添加以下配置
  "force_locale" => "zh","force_language" => "zh_CN",
#需要重启 nginx, php-fpm
systemctl restart php8.2-fpm
systemctl restart nginx 

参考: https://www.limvs.cn/archives/2490#NextCloud-config%20%E9%85%8D%E7%BD%AE%E5%8F%82%E6%95%B0%20%E2%80%93%20GOC%E4%BA%91

相关文章:

【Linux】Ubuntu 22.04 上安装最新版 Nextcloud Hub 7 (28.0.1)

在 Ubuntu 22.04 上安装 PHP 版本 安装多个 PHP 版本的最简单方法是使用来自 Debian 开发人员 Ondřej Sur 的 PPA。要添加此 PPA,请在终端中运行以下命令。如果要从 PPA 安装软件,则需要 software-properties-common 包。它会自动安装在 Ubuntu 桌面上,但可能会在您的 Ubuntu…...

PHP项目如何自动化测试

开发和测试 测试和开发具有同等重要的作用 从一开始&#xff0c;测试和开发就是相向而行的。测试是开发团队的一支独立的、重要的支柱力量。 测试要具备独立性 独立分析业务需求&#xff0c;独立配置测试环境&#xff0c;独立编写测试脚本&#xff0c;独立开发测试工具。没有…...

WEB 3D技术 three.js 3D贺卡(1) 搭建基本项目环境

好 今天 我也是在网上学的 带着大家一起来做个3D贺卡 首先 我们要创建一个vue3的项目、 先创建一个文件夹 装我们的项目 终端执行 vue create 项目名称 例如 我的名字想叫 greetingCards 就是 vue create greetingcards因为这个名录 里面是全部都小写的 然后 下面选择 vue3 …...

短视频IP运营流程架构SOP模板PPT

【干货资料持续更新&#xff0c;以防走丢】 短视频IP运营流程架构SOP模板PPT 部分资料预览 资料部分是网络整理&#xff0c;仅供学习参考。 抖音运营资料合集&#xff08;完整资料包含以下内容&#xff09; 目录 抖音15秒短视频剧本创作公式 在抖音这个短视频平台上&#…...

python爬虫之线程与多进程知识点记录

一、线程 1、概念 线程 在一个进程的内部&#xff0c;要同时干多件事&#xff0c;就需要同时运行多个“子任务”&#xff0c;我们把进程内的这些“子任务”叫做线程 是操作系统能够进行运算调度的最小单位。它被包含在进程之中&#xff0c;是进程中的实际运作单位。一条线程指…...

基于Java (spring-boot)的停车场管理系统

一、项目介绍 基于Java (spring-boot)的停车场管理系统、预订车位系统、停车缴费系统功能&#xff1a; 登录、注册、后台首页、用户信息管理、车辆信息管理、新增车辆、车位费用设置、停泊车辆查询、车辆进出管理、登录日志查询、个人中心、预定停车位、缴费信息。 适用人群&…...

微软Office 2019 批量授权版

软件介绍 微软办公软件套件Microsoft Office 2019 专业增强版2024年1月批量许可版更新推送&#xff01;Office2019正式版2018年10月份推出&#xff0c;主要为多人跨平台办公与团队协作打造。Office2019整合对过去三年在Office365里所有功能&#xff0c;包括对Word、Excel、Pow…...

ChatGLM2-6B 大语言模型本地搭建

ChatGLM模型介绍&#xff1a; ChatGLM2-6B 是清华 NLP 团队于不久前发布的中英双语对话模型&#xff0c;它具备了强大的问答和对话功能。拥有最大32K上下文&#xff0c;并且在授权后可免费商用&#xff01; ChatGLM2-6B的6B代表了训练参数量为60亿&#xff0c;同时运用了模型…...

WindowsServer安装mysql最新版

安装 下载相应mysql安装包&#xff1a; MySQL :: Download MySQL Installer 选择不登陆下载 双击运行下载好的mysql-installer-community-*.*.*.msi 进入类型选择页面&#xff0c;本人需要mysql云服务就选择了server only server only&#xff08;服务器&#xff09;&#x…...

gin切片表单验证

在Gin中对切片进行表单验证的步骤与对其他类型的字段进行验证类似。以下是一些基本步骤&#xff0c;我们可以根据具体的需求进行调整&#xff1a; 定义结构体&#xff1a; 创建一个结构体&#xff0c;用于存储表单数据。确保结构体中的字段类型与你预期的表单数据类型一致。 使…...

openssl3.2 - 官方demo学习 - certs

文章目录 openssl3.2 - 官方demo学习 - certs概述笔记官方的实验流程mkcerts.sh - 整理ocsprun.sh - 整理ocspquery.sh - 整理从mkcerts.sh整理出来的27个.bata1_create_certificate_directly.cmda2_Intermediate_CA_request_first.cmda3_Sign_request_CA_extensions.cmda4_Ser…...

Datawhale 大模型基础理论 Day1 引言

开源链接如下&#xff1a;https://github.com/datawhalechina/so-large-lm/blob/main/docs/content/ch01.md 语言模型的概念&#xff1a;即能够赋予每个有意义的词&#xff08;token&#xff09;以一定的概率的一个函数的集合。 语言模型可以被用来评估输入的质量&#xff0c…...

HarmonyOS应用开发学习笔记 UIAbility组件与UI的数据同步 EventHub、globalThis

1、 HarmoryOS Ability页面的生命周期 2、 Component自定义组件 3、HarmonyOS 应用开发学习笔记 ets组件生命周期 4、HarmonyOS 应用开发学习笔记 ets组件样式定义 Styles装饰器&#xff1a;定义组件重用样式 Extend装饰器&#xff1a;定义扩展组件样式 5、HarmonyOS 应用开发…...

leetcode每日一题44

130. 被围绕的区域 图论 dfs/bfs dfs代码框架 void dfs(参数) {if (终止条件) {存放结果;return;}for (选择&#xff1a;本节点所连接的其他节点) {处理节点;dfs(图&#xff0c;选择的节点); // 递归回溯&#xff0c;撤销处理结果} }思路&#xff1a;本题要求找到被x围绕的陆…...

idea写sql语句快捷键提醒,mapper注解开发,mybatis

第一步&#xff1a;注入SQL语言 1.显示上下文操作&#xff08;没有这个选项的话就选中sql然后直接alt回车快捷键&#xff09;2.注入语言或引用 3.mysql 第二步&#xff1a;配置MySQL数据库连接 1.首先点击侧边的数据库&#xff0c;再点击上面的加号 2.点击数据源&#xff…...

002 Golang-channel-practice

第二题&#xff1a; 创建一个生产器和接收器&#xff0c;再建立一个无缓冲的channel。生产器负责把数据放进管道里&#xff0c;接收器负责把管道里面的数据打印出来。这里我们开5个协程把数据打印出来。 直接上代码&#xff01; package mainimport ("fmt" )func …...

MFC为对话框资源添加类

VC6新建一个对话框类型的工程; 建立之后资源中默认有2个对话框,一个是主对话框,About这个是默认建立的关于版权信息的; 然后主对话框有对应的.h和.cpp文件;可以在其中进行编程; 默认建立的有一个 关于 对话框; 在资源中新插入一个对话框,IDD_DIALOG1是对话框ID; 新加…...

SpringBoot新手入门完整教程和项目示例

文章目录 SpringBoot新手入门完整教程和项目示例1、SpringBoot简介2、Spring Boot的核心功能&#xff1f;&#xff08;优点&#xff09;3、SpringBoot与SpringMVC 的区别&#xff1f;4、构建SpringBoot项目4.1、在官网自动生成下载spring boot项目4.2、手动使用maven创建Spring…...

PHP留言板实现

完整教程PHP留言板 登陆界面 一个初学者的留言板&#xff08;登录和注册&#xff09;_php留言板登录注册-CSDN博客 留言板功能介绍 百度网盘 请输入提取码 进入百度网盘后&#xff0c;输入提取码&#xff1a;knxt&#xff0c;即可下载项目素材和游客访问页面的模板文件。 &…...

ssm+vue的物流配送人员车辆调度管理系统的设计与实现(有报告)。Javaee项目,ssm vue前后端分离项项目。

演示视频&#xff1a; ssmvue的物流配送人员车辆调度管理系统的设计与实现&#xff08;有报告&#xff09;。Javaee项目&#xff0c;ssm vue前后端分离项目。 项目介绍&#xff1a; 采用M&#xff08;model&#xff09;V&#xff08;view&#xff09;C&#xff08;controller&…...

龙虎榜——20250610

上证指数放量收阴线&#xff0c;个股多数下跌&#xff0c;盘中受消息影响大幅波动。 深证指数放量收阴线形成顶分型&#xff0c;指数短线有调整的需求&#xff0c;大概需要一两天。 2025年6月10日龙虎榜行业方向分析 1. 金融科技 代表标的&#xff1a;御银股份、雄帝科技 驱动…...

linux arm系统烧录

1、打开瑞芯微程序 2、按住linux arm 的 recover按键 插入电源 3、当瑞芯微检测到有设备 4、松开recover按键 5、选择升级固件 6、点击固件选择本地刷机的linux arm 镜像 7、点击升级 &#xff08;忘了有没有这步了 估计有&#xff09; 刷机程序 和 镜像 就不提供了。要刷的时…...

postgresql|数据库|只读用户的创建和删除(备忘)

CREATE USER read_only WITH PASSWORD 密码 -- 连接到xxx数据库 \c xxx -- 授予对xxx数据库的只读权限 GRANT CONNECT ON DATABASE xxx TO read_only; GRANT USAGE ON SCHEMA public TO read_only; GRANT SELECT ON ALL TABLES IN SCHEMA public TO read_only; GRANT EXECUTE O…...

第一篇:Agent2Agent (A2A) 协议——协作式人工智能的黎明

AI 领域的快速发展正在催生一个新时代&#xff0c;智能代理&#xff08;agents&#xff09;不再是孤立的个体&#xff0c;而是能够像一个数字团队一样协作。然而&#xff0c;当前 AI 生态系统的碎片化阻碍了这一愿景的实现&#xff0c;导致了“AI 巴别塔问题”——不同代理之间…...

蓝桥杯3498 01串的熵

问题描述 对于一个长度为 23333333的 01 串, 如果其信息熵为 11625907.5798&#xff0c; 且 0 出现次数比 1 少, 那么这个 01 串中 0 出现了多少次? #include<iostream> #include<cmath> using namespace std;int n 23333333;int main() {//枚举 0 出现的次数//因…...

项目部署到Linux上时遇到的错误(Redis,MySQL,无法正确连接,地址占用问题)

Redis无法正确连接 在运行jar包时出现了这样的错误 查询得知问题核心在于Redis连接失败&#xff0c;具体原因是客户端发送了密码认证请求&#xff0c;但Redis服务器未设置密码 1.为Redis设置密码&#xff08;匹配客户端配置&#xff09; 步骤&#xff1a; 1&#xff09;.修…...

Spring Cloud Gateway 中自定义验证码接口返回 404 的排查与解决

Spring Cloud Gateway 中自定义验证码接口返回 404 的排查与解决 问题背景 在一个基于 Spring Cloud Gateway WebFlux 构建的微服务项目中&#xff0c;新增了一个本地验证码接口 /code&#xff0c;使用函数式路由&#xff08;RouterFunction&#xff09;和 Hutool 的 Circle…...

快刀集(1): 一刀斩断视频片头广告

一刀流&#xff1a;用一个简单脚本&#xff0c;秒杀视频片头广告&#xff0c;还你清爽观影体验。 1. 引子 作为一个爱生活、爱学习、爱收藏高清资源的老码农&#xff0c;平时写代码之余看看电影、补补片&#xff0c;是再正常不过的事。 电影嘛&#xff0c;要沉浸&#xff0c;…...

FFmpeg avformat_open_input函数分析

函数内部的总体流程如下&#xff1a; avformat_open_input 精简后的代码如下&#xff1a; int avformat_open_input(AVFormatContext **ps, const char *filename,ff_const59 AVInputFormat *fmt, AVDictionary **options) {AVFormatContext *s *ps;int i, ret 0;AVDictio…...

用递归算法解锁「子集」问题 —— LeetCode 78题解析

文章目录 一、题目介绍二、递归思路详解&#xff1a;从决策树开始理解三、解法一&#xff1a;二叉决策树 DFS四、解法二&#xff1a;组合式回溯写法&#xff08;推荐&#xff09;五、解法对比 递归算法是编程中一种非常强大且常见的思想&#xff0c;它能够优雅地解决很多复杂的…...