在树莓派上基于 LNMP 搭建 Nextcloud

原文链接:https://blog.iyatt.com/?p=17296

环境

  • 树莓派CM4
  • raspios 20240704 Debian 12 arm64

搭建 LNMP 环境

安装 Nginx

sudo apt update
sudo apt install -y nginx

安装 php 及功能组件支持

参考:https://docs.nextcloud.com/server/latest/admin_manual/installation/php_configuration.html

sudo apt install -y php php-common php-fpm php-curl php-xml php-fileinfo php-gd php-json php-mbstring php-posix php-simplexml php-xmlreader php-xmlwriter php-zip php-mysql php-intl php-ldap php-ftp php-imap php-bcmath php-gmp php-exif php-apcu php-memcached php-redis php-imagick php-tidy php-uuid php-gnupg ffmpeg

安装数据库

MySQL 官方没有提供适用 Debian 12 arm64 的二进制安装包
file

可以自己用 MySQL 社区版源码编译或者找三方编译的安装包,这里使用 MySQL 的开源替代软件 Mariadb,可以直接用官方软件源安装

sudo apt install -y mariadb-server

配置 Nginx 和 PHP 连接

参考:https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html#nextcloud-in-the-webroot-of-nginx
以 root 权限编辑 /etc/nginx/sites-available/default,写入(只是模板,需要自己改)
这个配置比较适用配置在公网服务器

upstream php-handler {# server 127.0.0.1:9000;server unix:/run/php/php-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 {# httplisten 80;listen [::]:80;server_name cloud.example.com; # 自己的域名,IP 访问改为一个下划线# Prevent nginx HTTP Server Detectionserver_tokens off;# Enforce HTTPSreturn 301 https://$server_name$request_uri;
}server {# https# 如果不是部署到公网,就将上一个 server 删掉,把这里的监听 443 端口改为 80,并删掉 **ssl http2**listen 443 ssl http2;listen [::]:443 ssl http2;# With NGinx >= 1.25.1 you should use this instead:# listen 443      ssl;# listen [::]:443 ssl;# http2 on;server_name cloud.example.com; # 自己的域名,IP 访问改为一个下划线# Path to the root of your installation# Nextcloud 网站源码放置路径root /var/www/nextcloud;# Use Mozilla's guidelines for SSL/TLS settings# https://mozilla.github.io/server-side-tls/ssl-config-generator/# SSL 证书文件路径,配置 https 访问需要,ssl_certificate     /etc/nginx/cloud.example.com.crt;ssl_certificate_key /etc/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;# Set .mjs and .wasm MIME types# Either include it in the default mime.types list# and include that list explicitly or add the file extension# only for Nextcloud like below:include mime.types;types {text/javascript mjs;application/wasm wasm;}# 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(_arm64)?\/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|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ {try_files $uri /index.php$request_uri;# HTTP response headers borrowed from Nextcloud `.htaccess`add_header Cache-Control                     "public, max-age=15778463$asset_immutable";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;access_log off;     # Optional: Don't log access to assets}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;}
}

安装 Nextcloud

Nextcloud 网站源码下载:https://nextcloud.com/install/
展开社区项目
file
下载 ZIP 包
file

解压得到的 nextcloud 放到 /var/www 路径下,并在这个路径下修改文件权限:https://blog.iyatt.com/?p=14780
后面创建数据库和配置安装和 WordPress 差不多:https://blog.iyatt.com/?p=12732#WordPress_%E5%AE%89%E8%A3%85
只是登录数据库 root 的方式从 mysql -u root -p 改为 sudo mysql

访问页面,首次配置一下数据库连接信息和登录账号
file

然后登录进入页面
file

改进配置

修改 PHP 限制

Nextcloud 建议 php 内存限制至少有 512M,根据自己实际情况调整,我这里树莓派有 8G 内存,直接把 PHP 限制改为 1G
以 root 权限编辑 /etc/php/8.2/fpm/php.ini,路径中的 8.2 是 php 版本,根据自己的实际情况修改
找到 memory_limt 把后面的值修改了
file

修改上传文件大小限制(upload_max_filesize),默认 2M,这里改为 512M
file

修改 post 大小限制(post_max_size),默认 8M,这里改为 512M
file

然后重启 php-fpm,其中 8.2 换成自己的 php 版本

sudo systemctl restart php8.2-fpm

file

后台任务使用 cron 执行

创建定时任务

sudo crontab -u www-data -e

自己选择一个编辑器,然后写入(/var/www/nextcloud 是网站文件路径)

*/5  *  *  *  * /usr/bin/php -f /var/www/nextcloud/cron.php

file

然后 Nextcloud 设置 -> 基本设置 -> 后台任务,选择 Cron
file

配置电子邮件服务器(发邮件)

先在设置的个人信息里填上邮箱(用于验证接收)
file

再到基本设置,我这里使用 QQ 邮箱的 STMP 服务来实现发邮件
QQ 邮箱:https://mail.qq.com
获取一个专用的密码
file

file

设置默认电话区域

以 root 权限编辑 Nexcloud 目录下的 config/config.php,追加

'default_phone_region' => 'CN',

file

开启 PHP OPcache

开这个就是把编译过的 PHP 脚本缓存到内存里(内存足够的话),这样可以提升性能。
以 root 权限编辑 /etc/php/8.2/fpm/php.ini,找到 [opcache] 添加下面内容(也可以解开注释编辑参数)

opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=10000
opcache.save_comments=1
opcache.revalidate_freq=1

file

重启 PHP-FPM 生效

解决 PHP 访问环境变量

以 root 编辑 /etc/php/8.2/fpm/pool.d/www.conf,找到 env[PATH]
file

去掉前面的分号
file

重启 PHP-FPM 生效

添加缺失的索引(Detected some missing optional indices. 问题)

命令行切换到 Nextcloud 路径下,执行

sudo -u www-data php occ db:add-missing-indices

file

设置维护时间段开始时间

比如将一些复杂操作的时间调整到不常用的时间段,避开使用高峰,默认是任意时间段
以 root 编辑 Nextcloud 目录下的 config/config.php,添加

'maintenance_window_start' => 1,

意味着会从凌晨 1 点开始(持续 4 小时)
file

解决 “您的网络服务器未正确设置来解析 .wellknown URL,失败于: /.well-known/webfinger 更多细节”

我这里出现这个问题是因为使用的端口是非标端口,访问链接后面要指定端口,但是这里的跳转没正确处理
file

以 root 编辑 /etc/nginx/sites-available/default,把上图选中的两行和后面return那行分别修改为

        location = /.well-known/carddav { return 301 $scheme://$http_host/remote.php/dav/; }location = /.well-known/caldav  { return 301 $scheme://$http_host/remote.php/dav/; }return 301 $scheme://$http_host/index.php$request_uri;

然后重启 Nginx

修改默认存储路径

编辑 Nextcloud 目录下 config/config.php 中的 datadirectory
file

配置局域网代理

如果网络不好,无法访问应用商店
以 root 编辑 Nextcloud 目录下 config/config.php,添加

'proxy' => 'sock5://IP:端口'

'proxy' => 'http://IP:端口'

file

file

mimetype迁移

在管理员设置概览中提示“One or more mimetype migrations are available. Occasionally new mimetypes are added to better handle certain file types. Migrating the mimetypes take a long time on larger instances so this is not done automatically during upgrades. Use the command occ maintenance:repair --include-expensive to perform the migrations.”时
终端进入 Nextcloud 目录,执行

# 启用维护模式
sudo -u www-data php occ maintenance:mode --on# 执行迁移
sudo -u www-data php occ maintenance:repair --include-expensive# 管理维护模式
sudo -u www-data php occ maintenance:mode --off

配置内存缓存

安装 redis 等组件

sudo apt install -y redis php-redis php-apcu

以 root 编辑 /etc/redis/redis.conf
找到 unixsocket 和 uxixsocketperm 解开注释,并把权限值改为 770
file
找到 port,把端口号改为 0
file

保存退出后重启 redis

# 设置自启动
sudo systemctl enable redis-server# 重启
sudo systemctl restart redis-server

将 www-data 用户添加到 redis 用户组

# 添加
sudo usermod -aG redis www-data# 刷新
sudo newgrp redis

测试访问 redis 套接字,显示 PONG 即成功

sudo -u www-data redis-cli -s /var/run/redis/redis-server.sock ping

以 root 编辑 /etc/php/8.2/cli/php.ini 添加

[apcu]
apc.enable_cli=1

重启 Nginx 和 PHP-fpm

sudo systemctl restart php8.2-fpm.service nginx

在 Nextcloud 目录下的 config/config.php 添加

  'memcache.local' => '\OC\Memcache\APCu','memcache.locking' => '\OC\Memcache\Redis','redis' => array('host' => '/var/run/redis/redis-server.sock','port' => 0,'timeout' => 0.0,),

file

上传时发生错误,状态码413

在网页端上传大文件的时候遇到,这个是超出了 Nginx 上传限制导致的。Nextcloud 文档给的 Nginx 模板默认配置是限制 512M,把 client_max_body_size 改大再重启 Nginx 就行,比如我这里直接改成 10240M 即 10G
file

插件功能扩展

Two-Factor TOTP Provider【二次验证,一次性密码】

可以绑定 APP,通过 APP 查看一次性密码,在登陆时进行验证
file

file

External storage support 【存储扩展】

可以向 Nextcloud 中添加存储路径,比如挂载了额外的硬盘,把路径添加进去,也能添加其它共享协议或平台
file

Memories 【相册管理】

安装这个插件后,基本功能可以按时间、文件夹、地理位置管理
file

file

反向地理编码下载地球数据库注意

数据库下载后导入时可能处理超时,如果出现超时失败,可以登录数据库,设置延长限制
file

SET GLOBAL wait_timeout = 28800;
SET GLOBAL interactive_timeout = 28800;

图片内容识别功能

可以再安装 Recognize 和 Face Recognition,在此之前最好保证环境配置好

安装 Node.js

# 安装 npm
sudo apt install -y npm# 安装版本管理工具
sudo npm i -g n# 更新 Node.js 到最新稳定版
sudo n stable

配置 Composer

# 安装工具
sudo apt install -y build-essential git# 获取源码
git clone https://github.com/composer/getcomposer.org.git --depth=1 && cd getcomposer/web# 构建
bash installer# 拷贝到系统目录
mv composer.phar /usr/local/bin/composer

安装 PDLIB(人脸识别需要)

# 安装构建工具
sudo apt install -y cmake php-dev# 获取 DLIB 源码
cd /tmp && git clone https://github.com/davisking/dlib.git --depth=1 && cd dlib/dlib# 创建编译目录
mkdir build && cd build# 生成编译脚本
cmake -DBUILD_SHARED_LIBS=ON ..# 编译
make -j$(nproc)# 安装
sudo make install# 获取 PDLIB 源码
cd /tmp && git clone https://github.com/goodspb/pdlib.git && cd pdlib# 生成编译 PHP 扩展的配置文件
phpize# 配置编译
./configure --enable-debug
# you may need to indicate the dlib install location
# PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --enable-debug# 编译
make -j$(nproc)# 安装
sudo make install

编辑 PHP 配置文件 /etc/php/8.2/fpm/php.ini,写入

[pdlib]
extension="pdlib.so"

file

重启 PHP 服务

sudo systemctl restart php8.2-fpm

安装前面提到的两个插件并启用后,管理设置中,配置好 node 路径 /usr/local/bin/node
file

终端进入 Nextcloud 根目录,安装预览生成器

sudo -u www-data php occ app:install previewgenerator

file

可选的人脸识别模型:https://github.com/matiasdelellis/facerecognition/wiki/Models#install-models
在 Nextcloud 目录下执行下载模型

# 设置可用内存大小,比如 2G
sudo -u www-data php occ face:setup -M 2G# 设置模型,比如选 1
sudo -u www-data php occ face:setup -m 1

Nextcloud Office 【在线文档支持】

需要独立搭建 Collabora Online 服务器,或者使用内建版(功能没那么丰富),内建版可以切换终端路径到 Nextcloud 下,然后安装

sudo -u www-data ./occ app:install richdocumentscode_arm64

设置选内建版,会提示安装用什么命令(不同架构可能不同)
file

然后在 Nginx 关于 Nextcloud 的配置中加上
(参考:https://www.collaboraonline.com/blog/connecting-collabora-online-built-in-code-server-with-nginx/ )

    # Collabora Online 支持location ~ \.php(?:$|/) {# Required for legacy supportrewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|oc[ms]\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode_arm64\/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;}

重启 Nginx 服务器,之后在 Nextcloud 中就能使用在线文档了
设置勾选 office open xml,默认就会使用微软的 office 格式
file

file

Music 音乐

支持组织网盘上的音频文件
file

支持互联网电台,可以添加广播电台的流媒体链接听广播
file

世界广播地图:https://worldradiomap.com/zhongwen
可以在这个网站听广播,也能获取流媒体链接添加到 Nextcloud

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

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

相关文章

EXCEL图片链接快速批量转成图片

EXCEL图片链接快速批量转成图片 直接上图 "<table><img src"&C1&" height50 width50></table>"复制F列到txt文件&#xff0c;暂时放置 全选复制&#xff0c;然后插入一列&#xff0c;粘贴到新的一列中去如图一所示。 ps&…

光通信——PON技术

PON网络结构 PON&#xff08;Passive Optical Network&#xff0c;无源光网络&#xff09;系统的基本组成包括OLT&#xff08;Optical Line Terminal&#xff0c;光线路终端&#xff09;、ODN&#xff08;Optical Distribution Network&#xff0c;光分配单元&#xff09;和ON…

初学51单片机之I2C总线与E2PROM二

总结下上篇博文的结论&#xff1a; 1&#xff1a;ACK信号在SCL为高电平期间会一直保持。 2&#xff1a;在字节数据传输过程中如果发送电平跳变&#xff0c;那么电平信号就会变成重复起始或者结束的信号。&#xff08;上篇博文的测试方法还是不能够明确证明这个结论&#xff0…

深入解析 Java 虚拟机:内存区域、类加载与垃圾回收机制

我的主页&#xff1a;2的n次方_ 1. JVM 内存区域划分 程序计数器&#xff08;空间比较小&#xff09;。保存了下一条要执行的指令的地址&#xff08;指向元数据区指令的地址&#xff09;堆。JVM 最大的空间&#xff0c;new 出来的对象都在堆上栈。函数中的局部变量&#x…

linux服务器部署filebeat

# 下载filebeat curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.17.23-linux-x86_64.tar.gz # 解压 tar xzvf filebeat-7.17.23-linux-x86_64.tar.gz# 所在位置&#xff08;自定义&#xff09; /opt/filebeat-7.17.23-linux-x86_64/filebeat.ym…

一篇文章快速学会docker容器技术

目录 一、Docker简介及部署方法 1.1Docker简介 1.1.1什么是docker 1.1.2 docker在企业中的应用场景 1.1.3 docker与虚拟化的对比 1.1.4 docker的优势 二 、部署docker 2.1 容器工作方法 2.2 部署第一个容器 2.2.1 配置软件仓库 2.2.2 安装docker-ce并启动服务 2.2.…

C嘎嘎入门篇:类和对象(2)

前言&#xff1a; 上一篇小编讲了类和对象&#xff08;1&#xff09;&#xff0c;当然&#xff0c;在看这篇文章之前&#xff0c;读者朋友们一定要掌握好前面的基础内容&#xff0c;因为这篇和前面息息相关&#xff0c;废话不多说&#xff0c;下面小编就加快步伐&#xff0c;开…

css的背景background属性

CSS的background属性是一个简写属性&#xff0c;它允许你同时设置元素的多个背景相关的子属性。使用这个属性可以简化代码&#xff0c;使其更加清晰和易于维护。background属性可以设置不同的子属性。 background子属性 定义背景颜色 使用background-color属性 格式&#x…

ARM Process state -- CPSR

Holds PE status and control information. 保存PE状态和控制信息。 N, bit [31] Negative condition flag. Set to bit[31] of the result of the last flag-setting instruction. If the result is regarded as a twos complement signed integer, then N is set to 1 if…

Docker学习和部署ry项目

文章目录 停止Docker重启设置开机自启执行docker ps命令&#xff0c;如果不报错&#xff0c;说明安装启动成功2.然后查看数据卷结果3.查看数据卷详情结果4.查看/var/lib/docker/volumes/html/_data目录可以看到与nginx的html目录内容一样&#xff0c;结果如下&#xff1a;5.进入…

理解:两横三纵 简述

理解&#xff1a;两横三纵 简述 下图:两横三纵-yellow色线分布图 时间&#xff1a;2013年12月提出的城市化战略格局 所谓“两横三纵”&#xff0c; 即以陆桥通道、沿长江通道为两条横轴&#xff0c; 以沿海、京哈京广、包昆通道为三条纵轴&#xff0c; 以主要的城市群地区为…

C#和数据库高级:虚方法

文章目录 一、抽象方法和抽象类中的思考1.1、回顾抽象方法的特点1.2、针对抽象方法问题的引出 二、虚方法的使用步骤2.1、虚方法重写方法的调用2.2、系统自带的虚方法2.3、重写Equals方法2.4、虚方法和抽象方法的比较 三、虚方法和抽象方法的联系3.1、ToString()方法的应用 一、…

SpringBoot技术栈:打造下一代网上租赁系统

第2章 关键技术简介 2.1 Java技术 Java是一种非常常用的编程语言&#xff0c;在全球编程语言排行版上总是前三。在方兴未艾的计算机技术发展历程中&#xff0c;Java的身影无处不在&#xff0c;并且拥有旺盛的生命力。Java的跨平台能力十分强大&#xff0c;只需一次编译&#xf…

Rust语言桌面应用开发GTK3 Gtk3-rs Glade

文章目录 GTK-RSGithub官网Rust 教程Rust 环境安装 GTK安装 Gladedemo.glade 文件完整示例 main.rs创建 Rust 项目Cargo.toml 文件main.rs 文件 编译运行GTK主题 GTK-RS gtk-rs 是一个用于在 Rust 编程语言中使用 GTK 图形用户界面工具包的库。GTK 是一个流行的跨平台 GUI 工具…

SqlAlchemy使用教程(七) 异步访问数据库

SqlAlchemy使用教程(一) 原理与环境搭建SqlAlchemy使用教程(二) 入门示例及编程步骤SqlAlchemy使用教程(三) CoreAPI访问与操作数据库详解SqlAlchemy使用教程(四) MetaData 与 SQL Express Language 的使用SqlAlchemy使用教程(五) ORM API 编程入门SqlAlchemy使用教程(六) – O…

CSS文本格式化

通过 CSS 中的文本属性您可以像操作 Word 文档那样定义网页中文本的字符间距、对齐方式、缩进等等&#xff0c;CSS 中常用的文本属性如下所示&#xff1a; text-align&#xff1a;设置文本的水平对齐方式&#xff1b;text-decoration&#xff1a;设置文本的装饰&#xff1b;te…

【拥抱AIGC】通义灵码扩展管理

通义灵码提供了扩展管理&#xff0c;支持自定义指令&#xff0c;满足企业编码场景的扩展诉求。 适用版本 企业标准版、企业专属版 通义灵码管理员、组织内全局管理员&#xff08;专属版&#xff09;在通义灵码控制台-扩展管理中&#xff0c;进行自定义指令的管理、查看自定义…

leetcode|刷算法 线段树原理以及模板

线段树出现的题目特征 线段树使用的题目。每次操作都要得到返回结果的。 比如 699. 掉落的方块 - 力扣&#xff08;LeetCode&#xff09; 2286. 以组为单位订音乐会的门票 - 力扣&#xff08;LeetCode&#xff09; 1845. 座位预约管理系统 - 力扣&#xff08;LeetCode&#…

【PHP陪玩系统源码】游戏陪玩系统app,陪玩小程序优势

陪玩系统开发运营级别陪玩成品搭建 支持二开源码交付&#xff0c;游戏开黑陪玩系统: 多客陪玩系统&#xff0c;游戏开黑陪玩&#xff0c;线下搭子&#xff0c;开黑陪玩系统 前端uniapp后端php&#xff0c;数据库MySQL 1、长时间的陪玩APP源码开发经验&#xff0c;始终坚持从客户…

Docker镜像命令和容器命令

目录 镜像命令 镜像命名规范 镜像操作命令 DockerHub拉取镜像 利用docker save将nginx镜像导出磁盘&#xff0c;然后再通过load加载回来 总结 容器命令介绍和案例 容器相关命令 案例&#xff1a;创建运行一个Nginx容器 总结 镜像命令 镜像命名规范 镜像名称一般分两…