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

OnlyOffice验证(二)在Centos7上部署OnlyOffice编译结果

在Centos7上部署OnlyOffice编译结果

  此处将尝试将OnlyOffice验证(一)DocumentServer编译验证的结果部署到Centos7上。并且使用其它服务器现有的RabbitMq和Mysql。

安装Nginx

  先安装Nginx需要的依赖环境:

yum install openssl* -y
yum install ncurses-devel -y

  先下载Nginx资源包:

[root@test nginx]# pwd
/usr/local/nginx
[root@test nginx]# ll
总用量 1052
-rw-r--r--. 1 root root 1073948 224 09:25 nginx-1.22.1.tar.gz
[root@test nginx]# tar -zxvf nginx-1.22.1.tar.gz

  解压后目录结构如下(目录为:/usr/local/nginx/nginx-1.22.1):

[root@test nginx]# ll
总用量 1052
drwxr-xr-x. 8 1001 1001     158 1019 16:02 nginx-1.22.1
-rw-r--r--. 1 root root 1073948 224 09:25 nginx-1.22.1.tar.gz
[root@test nginx]# cd nginx-1.22.1
[root@test nginx-1.22.1]# ll
总用量 804
drwxr-xr-x. 6 1001 1001   4096 224 09:34 auto
-rw-r--r--. 1 1001 1001 317399 1019 16:02 CHANGES
-rw-r--r--. 1 1001 1001 485035 1019 16:02 CHANGES.ru
drwxr-xr-x. 2 1001 1001    168 224 09:34 conf
-rwxr-xr-x. 1 1001 1001   2590 1019 16:02 configure
drwxr-xr-x. 4 1001 1001     72 224 09:34 contrib
drwxr-xr-x. 2 1001 1001     40 224 09:34 html
-rw-r--r--. 1 1001 1001   1397 1019 16:02 LICENSE
drwxr-xr-x. 2 1001 1001     21 224 09:34 man
-rw-r--r--. 1 1001 1001     49 1019 16:02 README
drwxr-xr-x. 9 1001 1001     91 224 09:34 src

  开始安装

./configure	&& make

  切换目录到/usr/local/nginx,如果没有新的文件回到安装目录再执行一下:

make install

  最终目录结构应该和下面差不多:

[root@test nginx-1.22.1]# pwd
/usr/local/nginx/nginx-1.22.1
[root@test nginx-1.22.1]# cd ../
[root@test nginx]# ll
总用量 1056
drwxr-xr-x. 2 root root    4096 224 09:45 conf
drwxr-xr-x. 2 root root      40 224 09:45 html
drwxr-xr-x. 2 root root       6 224 09:45 logs
drwxr-xr-x. 9 1001 1001     186 224 09:43 nginx-1.22.1
-rw-r--r--. 1 root root 1073948 224 09:25 nginx-1.22.1.tar.gz
drwxr-xr-x. 2 root root      19 224 09:45 sbin

  切换目录到sbin,启动Nginx:

[root@test nginx]# cd sbin/
[root@test sbin]# pwd
/usr/local/nginx/sbin
[root@test sbin]# ./nginx 
[root@test sbin]#

  当前虚拟机配的IP是192.168.95.131,访问http://192.168.95.131:80/(端口可以不用写):
在这里插入图片描述
  配置自启服务,此处不重要可以略过。这里先关闭Nginx:

[root@test sbin]# pwd
/usr/local/nginx/sbin
[root@test sbin]# ./nginx -s stop
[root@test sbin]# 

  创建一个系统服务配置文件

[root@test sbin]# pwd
/usr/local/nginx/sbin
[root@test sbin]# vim nginx.service
[root@test sbin]# cat nginx.service 
[Unit]
Description=nginx service
After=network.target[Service]
Type=forking
ExecStart=/usr/local/nginx/sbin/nginx
ExecReload=/usr/local/nginx/sbin/nginx -s reload
ExecStop=/usr/local/nginx/sbin/nginx -s stop
WorkingDirectory=/usr/local/nginx/sbin
PrivateTmp=true[Install]
WantedBy=multi-user.target

  创建软连接,随后重新加载服务配置

[root@test sbin]# ln -s /usr/local/nginx/sbin/nginx.service /usr/lib/systemd/system/nginx.service
[root@test sbin]# systemctl daemon-reload

  接下来使用systemctl start nginx来启动Nginx

[root@test sbin]# systemctl start nginx
[root@test sbin]# systemctl status nginx
● nginx.service - nginx serviceLoaded: loaded (/usr/local/nginx/sbin/nginx.service; disabled; vendor preset: disabled)Active: active (running) since 五 2023-02-24 10:18:52 CST; 1s agoProcess: 35348 ExecStart=/usr/local/nginx/sbin/nginx (code=exited, status=0/SUCCESS)Main PID: 35349 (nginx)Memory: 952.0KCGroup: /system.slice/nginx.service├─35349 nginx: master process /usr/local/nginx/sbin/nginx└─35350 nginx: worker process224 10:18:52 test systemd[1]: Starting nginx service...
224 10:18:52 test systemd[1]: Started nginx service.

  配置自启,重启服务器验证即可

[root@test sbin]# systemctl enable nginx
Created symlink from /etc/systemd/system/multi-user.target.wants/nginx.service to /usr/local/nginx/sbin/nginx.service.
Created symlink from /etc/systemd/system/nginx.service to /usr/local/nginx/sbin/nginx.service.

资源准备

Ubuntu虚拟机资源准备

  此处先将安装资源准备一下,将之前编译好的documentserver打个压缩包。然后将资源传到Centos7上。

root@t16:/opt/build_master/build_tools/out/linux_64/onlyoffice# tar -zcvf documentserver.tar.gz documentserver
root@t16:/opt/build_master/build_tools/out/linux_64/onlyoffice# pwd
/opt/build_master/build_tools/out/linux_64/onlyoffice
root@t16:/opt/build_master/build_tools/out/linux_64/onlyoffice# ll
总用量 822728
drwxr-xr-x  5 root root      4096 224 10:35 ./
drwxr-xr-x  3 root root      4096 219 23:26 ../
drwxr-xr-x 10 root root      4096 223 14:00 documentserver/
drwxr-xr-x  3 root root      4096 223 13:56 documentserver-example/
drwxr-xr-x  3 root root      4096 219 23:27 documentserver-snap/
-rw-r--r--  1 root root 842447109 224 10:36 documentserver.tar.gz

  将压缩文件传到目标Centos7上

root@t16:/opt/build_master/build_tools/out/linux_64/onlyoffice# scp documentserver.tar.gz root@192.168.95.131:/usr/local/nginx/html
The authenticity of host '192.168.95.131 (192.168.95.131)' can't be established.
ECDSA key fingerprint is SHA256:P8yATBEzmZX9B7VcnUT6yYWDksUcNMdapeO4alDUYSw.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.95.131' (ECDSA) to the list of known hosts.
root@192.168.95.131's password: 
documentserver.tar.gz                                                                                                100%  803MB 160.7MB/s   00:05    
root@t16:/opt/build_master/build_tools/out/linux_64/onlyoffice# 

Centos7虚拟机资源准备

  在上一步将安装资源打压缩包,传到了Centos7中的/usr/local/nginx/html目录

[root@test html]# pwd
/usr/local/nginx/html
[root@test html]# ll -h
总用量 804M
-rw-r--r--. 1 root root  497 224 09:45 50x.html
-rw-r--r--. 1 root root 804M 224 10:40 documentserver.tar.gz
-rw-r--r--. 1 root root  615 224 09:45 index.html

  解压资源

[root@test html]# tar -zxvf documentserver.tar.gz
[root@test html]# pwd
/usr/local/nginx/html
[root@test html]# ll
总用量 822712
-rw-r--r--.  1 root root       497 224 09:45 50x.html
drwxr-xr-x. 10 root root       147 223 14:00 documentserver
-rw-r--r--.  1 root root 842447109 224 10:40 documentserver.tar.gz
-rw-r--r--.  1 root root       615 224 09:45 index.html

  修改启动配置,切换目录到/usr/local/nginx/html/documentserver/server/Common/config。修改development-linux.json配置文件,此处只保留了修改的配置内容。分别是RabbitMQ连接、欢迎页、Mysql数据库连接和文件上传大小。

{"rabbitmq": {"url": "amqp://test:123456@192.168.95.130:5672"}, "services": {"CoAuthoring": {"server": {"static_content": {"/welcome": {"path": "../../server/welcome"}}},"sql": {"type": "mysql","dbHost": "192.168.95.130","dbPort": "3306","dbName": "onlyoffice","dbUser": "root","dbPass": "123456"} }},"FileConverter": {"converter": {"maxDownloadBytes": "524288000"}}
}

  ※RabbitMQ注意默认用户只能本机访问,注意提前配置好用户权限
  ※Mysql表创建脚本在目录/usr/local/nginx/html/documentserver/server/schema/mysql中,提前创建数据库执行createdb.sql脚本

[root@test mysql]# pwd
/usr/local/nginx/html/documentserver/server/schema/mysql
[root@test mysql]# ll
总用量 12
-rwxrwxrwx. 1 root root 3125 219 19:44 createdb.sql
-rwxrwxrwx. 1 root root   35 219 19:44 removedb.sql
-rwxrwxrwx. 1 root root  146 219 19:44 removetbl.sql
drwxrwxrwx. 2 root root   98 219 19:44 upgrade

功能测试验证

  启动转换服务:

[root@test FileConverter]# pwd
/usr/local/nginx/html/documentserver/server/FileConverter
[root@test FileConverter]# LD_LIBRARY_PATH=$PWD/bin \
> NODE_ENV=development-linux \
> NODE_CONFIG_DIR=$PWD/../Common/config \
> ./converter
[2023-02-24T14:21:50.564] [WARN] [localhost] [docId] [userId] nodeJS - update cluster with 1 workers
[2023-02-24T14:21:50.572] [WARN] [localhost] [docId] [userId] nodeJS - worker 112277 started.
[2023-02-24T14:21:50.575] [WARN] [localhost] [docId] [userId] nodeJS - update cluster with 1 workers
[2023-02-24T14:21:51.170] [DEBUG] [localhost] [docId] [userId] nodeJS - [AMQP] connected

  启动文档服务:

[root@test DocService]# NODE_ENV=development-linux \
> NODE_CONFIG_DIR=$PWD/../Common/config \
> ./docservice
[2023-02-24T14:22:26.774] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2023-02-24T14:22:26.775] [WARN] [localhost] [docId] [userId] nodeJS - Set services.CoAuthoring.token.enable.browser, services.CoAuthoring.token.enable.request.inbox, services.CoAuthoring.token.enable.request.outbox in the Document Server config to prevent an unauthorized access to your documents and the substitution of important parameters in ONLYOFFICE Document Server requests.
[2023-02-24T14:22:26.775] [INFO] [localhost] [docId] [userId] nodeJS - End updateLicense
[2023-02-24T14:22:26.777] [WARN] [localhost] [docId] [userId] nodeJS - Failed to subscribe to plugin folder updates. When changing the list of plugins, you must restart the server. https://nodejs.org/docs/latest/api/fs.html#fs_availability
[2023-02-24T14:22:26.780] [INFO] [localhost] [docId] [userId] nodeJS - End updateLicense
[2023-02-24T14:22:26.840] [DEBUG] [localhost] [docId] [userId] nodeJS - [AMQP] connected
[2023-02-24T14:22:26.901] [DEBUG] [localhost] [docId] [userId] nodeJS - [AMQP] connected
[2023-02-24T14:22:26.922] [INFO] [localhost] [docId] [userId] nodeJS - Start callbackFunction
[2023-02-24T14:22:26.928] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in development-linux mode. Version: 7.3.2. Build: 0

  访问欢迎页,默认端口是8000:
在这里插入图片描述
  接下来测试文档是否可以正常加载:
在这里插入图片描述
  注意此处报错跟Nginx没有关系,目前来看Nginx并不是必须的。怀疑只是在Docker部署的时候占一个前台进程。目前是转换服务报异常提示缺少动态库。
在这里插入图片描述
  经排查确实没有,所以打算升级动态库,参考下面三个连接,升级动态库,主要参考第一个,升级动态库后最好重启一下。

  • 编译动态库看这里 https://www.jianshu.com/p/cedbdf0b6bca
  • 下载资源慢看这里 https://blog.csdn.net/qq_29695701/article/details/115182856
  • 升级动态库补充说明 https://blog.csdn.net/davidhopper/article/details/79681695

  升级动态库后重新启动服务,看看能不能正常加载。目前来看一切正常
在这里插入图片描述
  虽然界面加载看起来没有问题,其实还是有问题的。比如文件修改后保存失败,调用文档格式转换失败。需要补充初始化的操作,切换目录回到解压后的根目录,然后执行初始化命令:
  当前目录结构

[root@test documentserver]# pwd
/usr/local/nginx/html/documentserver
[root@test documentserver]# ll
总用量 20
drwxr-xr-x. 39 root root 4096 223 13:56 core-fonts
drwxr-xr-x. 50 root root 4096 223 13:56 dictionaries
drwxr-xr-x.  4 root root   31 223 13:56 document-templates
drwxr-xr-x.  2 root root 8192 227 09:04 fonts
drwxr-xr-x.  7 root root   68 223 13:53 sdkjs
drwxr-xr-x. 14 root root  234 223 13:56 sdkjs-plugins
drwxr-xr-x. 12 root root  199 223 14:04 server
drwxrwxrwx.  4 root root   32 219 22:58 web-apps
LD_LIBRARY_PATH=${PWD}/server/FileConverter/bin server/tools/allfontsgen \--input="${PWD}/core-fonts" \--allfonts-web="${PWD}/sdkjs/common/AllFonts.js" \--allfonts="${PWD}/server/FileConverter/bin/AllFonts.js" \--images="${PWD}/sdkjs/common/Images" \--selection="${PWD}/server/FileConverter/bin/font_selection.bin" \--output-web='fonts' \--use-system="true"
LD_LIBRARY_PATH=${PWD}/server/FileConverter/bin server/tools/allthemesgen \--converter-dir="${PWD}/server/FileConverter/bin"\--src="${PWD}/sdkjs/slide/themes"\--output="${PWD}/sdkjs/common/Images"

  随后重新启动,这时服务就正常了。文件保存和文档格式转换就可以正常使用了。Ubuntu部署顺便也验证了(验证版本16.04和20.04),跟Centos7的区别就是不用更新动态库,部署起来更方便。

配置Nginx

  到这步其实可配可不配,配了Nginx就是代理了8000端口,让你访问的时候直接调80端口。经验证编译结果其实可以不用放在Nginx目录下。因为除了接口转发OnlyOffice服务跟Nginx并没有设么关系。
  首先切换目录到Nginx配置文件的目录中/usr/local/nginx/conf,这里我创建了一个目录为custom用来存放配置。

[root@test conf]# pwd
/usr/local/nginx/conf
[root@test conf]# ll
总用量 68
drwxr-xr-x. 2 root root   34 224 11:09 custom
-rw-r--r--. 1 root root 1077 224 09:45 fastcgi.conf
-rw-r--r--. 1 root root 1077 224 09:45 fastcgi.conf.default
-rw-r--r--. 1 root root 1007 224 09:45 fastcgi_params
-rw-r--r--. 1 root root 1007 224 09:45 fastcgi_params.default
-rw-r--r--. 1 root root 2837 224 09:45 koi-utf
-rw-r--r--. 1 root root 2223 224 09:45 koi-win
-rw-r--r--. 1 root root 5349 224 09:45 mime.types
-rw-r--r--. 1 root root 5349 224 09:45 mime.types.default
-rw-r--r--. 1 root root 2710 224 11:04 nginx.conf
-rw-r--r--. 1 root root 2656 224 09:45 nginx.conf.default
-rw-r--r--. 1 root root  636 224 09:45 scgi_params
-rw-r--r--. 1 root root  636 224 09:45 scgi_params.default
-rw-r--r--. 1 root root  664 224 09:45 uwsgi_params
-rw-r--r--. 1 root root  664 224 09:45 uwsgi_params.default
-rw-r--r--. 1 root root 3610 224 09:45 win-utf

  切换目录到custom中,创建名为*.conf的配置文件

[root@test conf]# cd custom/
[root@test custom]# ll
总用量 4
-rw-r--r--. 1 root root 763 224 11:09 document_server.conf

  配置内容如下,其实就是官网提供的配置

map $http_host $this_host {"" $host;default $http_host;
}
map $http_x_forwarded_proto $the_scheme {default $http_x_forwarded_proto;"" $scheme;
}
map $http_x_forwarded_host $the_host {default $http_x_forwarded_host;"" $this_host;
}
map $http_upgrade $proxy_connection {default upgrade;"" close;
}
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
proxy_set_header X-Forwarded-Host $the_host;
proxy_set_header X-Forwarded-Proto $the_scheme;
server {listen 0.0.0.0:80;listen [::]:80 default_server;server_tokens off;rewrite ^\/OfficeWeb(\/apps\/.*)$ /web-apps$1 redirect;location / {proxy_pass http://localhost:8000;proxy_http_version 1.1;}
}

  切换目录回到/usr/local/nginx/conf,修改下nginx.conf配置文件,添加如下配置

include /usr/local/nginx/conf/custom/*.conf;

在这里插入图片描述
  最后重新加载Nginx配置,使配置立即生效:

[root@test conf]# systemctl reload nginx

  最终结果就是192.168.95.131:8000192.168.95.131:80都可以正常访问。
在这里插入图片描述

相关文章:

OnlyOffice验证(二)在Centos7上部署OnlyOffice编译结果

在Centos7上部署OnlyOffice编译结果 此处将尝试将OnlyOffice验证(一)DocumentServer编译验证的结果部署到Centos7上。并且使用其它服务器现有的RabbitMq和Mysql。 安装Nginx 先安装Nginx需要的依赖环境: yum install openssl* -y yum insta…...

6.补充和总结【Java面试第三季】

6.补充和总结【Java面试第三季】前言推荐6.补充和总结69_总结闲聊回顾和总结继续学习最后前言 2023-2-4 19:08:01 以下内容源自 【尚硅谷Java大厂面试题第3季,跳槽必刷题目必扫技术盲点(周阳主讲)-哔哩哔哩】 仅供学习交流使用 推荐 Jav…...

基于ssm框架大学生社团管理系统(源码+数据库+文档)

一、项目简介 本项目是一套基于ssm框架大学生社团管理系统,主要针对计算机相关专业的正在做bishe的学生和需要项目实战练习的Java学习者。 包含:项目源码、数据库脚本等,该项目可以直接作为bishe使用。 项目都经过严格调试,确保可…...

vulnhub靶场NAPPING: 1.0.1教程

靶场搭建靶机下载地址:Napping: 1.0.1 ~ VulnHub直接解压双击ova文件即可使用软件:靶机VirtualBox,攻击机VMware攻击机:kali信息收集arp-scan -l上帝之眼直接来看看网站可以注册账号,那就先试试。注册完后登入哦。要输…...

Docker基本介绍

最近需要将项目做成一个web应用并部署到多台服务器上,于是就简单学习了一下docker,做一下小小的记录。 1、简单介绍一下docker 我们经常遇到这样一个问题,自己写的代码在自己的电脑上运行的很流畅,在其他人电脑上就各种bug&…...

可用于标记蛋白质216699-36-4,6-ROX,SE,6-羧基-X-罗丹明琥珀酰亚胺酯

一.6-ROX,SE产品描述:6-羧基-X-罗丹明琥珀酰亚胺酯(6-ROX,SE)是一种用于寡核苷酸标记和自动DNA测序的荧光染料,可用于标记蛋白质,寡核苷酸和其他含胺分子的伯胺(-NH2)。西…...

高数:极限的定义

目录 极限的定义: 数列极限的几何意义: 由极限的定义得出的极限的两个结论: ​编辑 极限的第三个结论: 例题 方法1: ​编辑 方法2: ​编辑 方法3: ​编辑 极限的定义: 如何理…...

大数据技术之Hadoop

第1章 Hadoop概述1.1 Hadoop是什么1.2 Hadoop发展历史(了解)1.3 Hadoop三大发行版本(了解)Hadoop三大发行版本:Apache、Cloudera、Hortonworks。Apache版本最原始(最基础)的版本,对于…...

一文带你搞懂Go语言函数选项模式,Go函数一等公民。

前言 通过这篇文章《为什么说Go的函数是”一等公民“》,我们了解到了什么是“一等公民”,以及都具备哪些特性,同时对函数的基本使用也更加深入。 本文重点介绍下Go设计模式之函数选项模式,它得益于Go的函数是“一等公民”&#…...

Window.location 详细介绍

如果你需要获取网站的 URL 信息,那么 window.location 对象就是为你准备的。使用它提供的属性来获取当前页面地址的信息,或使用其方法进行某些页面的重定向或刷新。 https://www.samanthaming.com/tidbits/?filterJS#2 window.location.origin → htt…...

js侧滑显示删除按钮

效果图&#xff1a; <!DOCTYPE html> <html><head><meta charset"UTF-8"><meta name"viewport" content"widthdevice-width, initial-scale1.0, maximum-scale1.0, user-scalableno"><title>js侧滑显示删…...

Python - DIY - 使用dump取json某些键值对合成新的json文件

Python - Json处理前言&#xff1a;应用场景&#xff1a;基本工具&#xff1a;文件操作&#xff1a;打开文件&#xff1a;写文件&#xff1a;读文件&#xff1a;关闭文件并刷新缓冲区&#xff1a;Json字符串和字典转换&#xff1a;json.loads()&#xff1a;json.dumps():Json文…...

深度剖析指针(中)——“C”

各位CSDN的uu们你们好呀&#xff0c;今天小雅兰的内容仍旧是深度剖析指针噢&#xff0c;在上一篇博客中&#xff0c;我已经写过了字符指针、数组指针、指针数组、数组传参和指针传参的知识点&#xff0c;那么这篇博客小雅兰会讲解一下函数指针、函数指针数组 、指向函数指针数组…...

论文阅读 | Video Frame Synthesis using Deep Voxel Flow

前言&#xff1a; 视频帧生成方法&#xff08;视频插帧/视频预测&#xff09;ICCV2017 oral Video Frame Synthesis using Deep Voxel Flow 引言 当下进行视频帧合成的方法分为两种&#xff0c;第一种是光流法&#xff0c;光流准确的话效果好&#xff0c;光流不准确的话则生…...

我所理解的生活

诞生 人真正意义上的诞生应该是社会学意义上的&#xff0c;是一种意识到自我、自我与社会关系的存在&#xff0c;只有这种诞生&#xff0c;才是完整人生的基点&#xff0c;大千世界中&#xff0c;唯有人类以生活作为自己的存在方式&#xff0c;除人类以外&#xff0c;从无机界…...

debian 部署nginx https

我是flask 处理请求单进程&#xff0c; 差点意思 &#xff0c; 考虑先flask 在往下走 一&#xff1a;安装nginx 因为我是debian 系统&#xff0c;所以我的建议是直接 sudo apt-get install nginx 你也可以选择在官网下载&#xff0c; 但是我搭建ssl 的时候安装openssl非常的麻…...

SQL 层功能改进 - lookupJoin 的优化

一、传统 join 算法lookupJoin 是 join 查询的一种&#xff0c;传统 join 算法为&#xff1a;1. 遍历 A 表&#xff0c;读取一条数据 r2. 遍历 B 表&#xff0c;对于每条数据&#xff0c;与 r 进行 join 操作3. 重复 1、2 操作&#xff0c;直到 A 表遍历完所有数据二、lookupJo…...

动态规划:鸣人的影分身

在火影忍者的世界里&#xff0c;令敌人捉摸不透是非常关键的。我们的主角漩涡鸣人所拥有的一个招数——多重影分身之术——就是一个很好的例子。影分身是由鸣人身体的查克拉能量制造的&#xff0c;使用的查克拉越多&#xff0c;制造出的影分身越强。针对不同的作战情况&#xf…...

如何为三星active2手表安装自己DIY的表盘

一、步骤介绍 Step 1. 下载Galaxy watch studio&#xff1b; Step 2. 按照up主“隔壁张师傅2022”的文章进行安装。 二、安装流程简单说明&#xff1a; ① 电脑端官网下载并安装Galaxy Watch Designer或者Galaxy Watch Studio程序。 ② 关闭手表蓝牙连接&#xff0c;并打开调…...

Android 项目必备(四十二)-->Android 多窗口模式

简介 自由窗口模式: 该模式类似于常见的桌面操作系统&#xff0c; 应用界面的窗口可以自由的拖动和修改大小。 分屏模式 该模式可以在手机上使用&#xff0c; 该模式将屏幕一分为二&#xff0c; 同时显示两个应用界面。 画中画模式: 该模式主要用于TV&#xff0c; 在该模式下…...

变量 varablie 声明- Rust 变量 let mut 声明与 C/C++ 变量声明对比分析

一、变量声明设计&#xff1a;let 与 mut 的哲学解析 Rust 采用 let 声明变量并通过 mut 显式标记可变性&#xff0c;这种设计体现了语言的核心哲学。以下是深度解析&#xff1a; 1.1 设计理念剖析 安全优先原则&#xff1a;默认不可变强制开发者明确声明意图 let x 5; …...

基于大模型的 UI 自动化系统

基于大模型的 UI 自动化系统 下面是一个完整的 Python 系统,利用大模型实现智能 UI 自动化,结合计算机视觉和自然语言处理技术,实现"看屏操作"的能力。 系统架构设计 #mermaid-svg-2gn2GRvh5WCP2ktF {font-family:"trebuchet ms",verdana,arial,sans-…...

React hook之useRef

React useRef 详解 useRef 是 React 提供的一个 Hook&#xff0c;用于在函数组件中创建可变的引用对象。它在 React 开发中有多种重要用途&#xff0c;下面我将全面详细地介绍它的特性和用法。 基本概念 1. 创建 ref const refContainer useRef(initialValue);initialValu…...

云启出海,智联未来|阿里云网络「企业出海」系列客户沙龙上海站圆满落地

借阿里云中企出海大会的东风&#xff0c;以**「云启出海&#xff0c;智联未来&#xff5c;打造安全可靠的出海云网络引擎」为主题的阿里云企业出海客户沙龙云网络&安全专场于5.28日下午在上海顺利举办&#xff0c;现场吸引了来自携程、小红书、米哈游、哔哩哔哩、波克城市、…...

3.3.1_1 检错编码(奇偶校验码)

从这节课开始&#xff0c;我们会探讨数据链路层的差错控制功能&#xff0c;差错控制功能的主要目标是要发现并且解决一个帧内部的位错误&#xff0c;我们需要使用特殊的编码技术去发现帧内部的位错误&#xff0c;当我们发现位错误之后&#xff0c;通常来说有两种解决方案。第一…...

【单片机期末】单片机系统设计

主要内容&#xff1a;系统状态机&#xff0c;系统时基&#xff0c;系统需求分析&#xff0c;系统构建&#xff0c;系统状态流图 一、题目要求 二、绘制系统状态流图 题目&#xff1a;根据上述描述绘制系统状态流图&#xff0c;注明状态转移条件及方向。 三、利用定时器产生时…...

IT供电系统绝缘监测及故障定位解决方案

随着新能源的快速发展&#xff0c;光伏电站、储能系统及充电设备已广泛应用于现代能源网络。在光伏领域&#xff0c;IT供电系统凭借其持续供电性好、安全性高等优势成为光伏首选&#xff0c;但在长期运行中&#xff0c;例如老化、潮湿、隐裂、机械损伤等问题会影响光伏板绝缘层…...

零基础在实践中学习网络安全-皮卡丘靶场(第九期-Unsafe Fileupload模块)(yakit方式)

本期内容并不是很难&#xff0c;相信大家会学的很愉快&#xff0c;当然对于有后端基础的朋友来说&#xff0c;本期内容更加容易了解&#xff0c;当然没有基础的也别担心&#xff0c;本期内容会详细解释有关内容 本期用到的软件&#xff1a;yakit&#xff08;因为经过之前好多期…...

使用Spring AI和MCP协议构建图片搜索服务

目录 使用Spring AI和MCP协议构建图片搜索服务 引言 技术栈概览 项目架构设计 架构图 服务端开发 1. 创建Spring Boot项目 2. 实现图片搜索工具 3. 配置传输模式 Stdio模式&#xff08;本地调用&#xff09; SSE模式&#xff08;远程调用&#xff09; 4. 注册工具提…...

【Android】Android 开发 ADB 常用指令

查看当前连接的设备 adb devices 连接设备 adb connect 设备IP 断开已连接的设备 adb disconnect 设备IP 安装应用 adb install 安装包的路径 卸载应用 adb uninstall 应用包名 查看已安装的应用包名 adb shell pm list packages 查看已安装的第三方应用包名 adb shell pm list…...