file-type

PostCSS插件发布:自动降级CSS变量至传统属性

ZIP文件

下载需积分: 50 | 41KB | 更新于2025-09-11 | 13 浏览量 | 0 下载量 举报 收藏
download 立即下载
### PostCSS插件与CSS变量降级 在现代网页设计和开发中,CSS预处理器如Sass、Less以及PostCSS已经成为重要的工具。它们为CSS带来了变量、混入(mixins)、嵌套规则等高级功能,使得样式代码更加模块化、可维护。然而,这些预处理特性并不是所有浏览器都原生支持的。特别是CSS变量(自定义属性),在一些旧版浏览器中无法使用。 为了解决这一兼容性问题,开发者通常需要借助PostCSS这样的工具来转换CSS代码,使其能够兼容旧版浏览器。这就产生了像“postcss-downgrade-variables”这样的PostCSS插件。 #### postcss-downgrade-variables 插件说明 “postcss-downgrade-variables”是一个PostCSS插件,其核心功能是将CSS变量(自定义属性)转换成旧版浏览器能够理解的规则。这样一来,即使是在不支持CSS变量的浏览器中,开发者也能够使用变量带来的便利。 插件的工作原理是查找所有的CSS变量声明,并在适当的位置将它们展开成等价的样式规则。例如,如果一个CSS文件中定义了如下变量: ```css :root { --primary-background: #fff; --green-color: #0f0; } ``` 经过“postcss-downgrade-variables”插件处理后,上述变量声明会被转换为兼容旧浏览器的规则: ```css /* 转换后的CSS代码 */ :root { --primary-background: #fff; --green-color: #0f0; } .class { background: #fff; background-image: linear-gradient(to top, #0f0, #fff); } ``` 在这个转换过程中,`.class` 中的 `var(--primary-background)` 和 `var(--green-color)` 被直接替换成了相应的值。 #### PostCSS PostCSS是一个使用JavaScript工具和插件转换CSS代码的平台。它通过分析CSS的抽象语法树(AST)来进行工作,这意味着它能够精确地识别并操作CSS的每个组成部分。 PostCSS的强大之处在于它拥有一个庞大的插件生态系统。开发者可以根据项目需求选择合适的插件来增强CSS处理能力。例如,除了降级变量的插件外,还可以使用Autoprefixer自动添加浏览器前缀,或者使用cssnano压缩和优化CSS代码等。 #### 关于JavaScript 在PostCSS插件的开发中,JavaScript是实现功能的核心语言。编写PostCSS插件通常需要对JavaScript语法和相关工具链有深入的理解。因此,本插件的标签为“JavaScript”,表明其开发和使用都依赖于JavaScript技术。 #### 压缩包子文件的文件名称列表 压缩包子文件的文件名称列表中的“postcss-downgrade-variables-master”表明该插件可能是一个开源项目,托管在GitHub等代码托管平台。文件名称中的“master”通常代表主分支,意味着该项目是最新版且可能包含最新的功能和修复。 通过该项目的文件结构和内容,开发者可以下载、安装并集成“postcss-downgrade-variables”插件到PostCSS工具链中,以提升其项目的兼容性和可维护性。使用NPM(Node.js的包管理器)进行安装是一个常见的操作流程。一旦安装完成,开发者便可以配置相应的PostCSS配置文件,将“postcss-downgrade-variables”作为处理步骤之一。 总结而言,“postcss-downgrade-variables”插件是解决CSS变量兼容性问题的有效工具。通过使用JavaScript编写的PostCSS插件,开发者能够以自动化的方式将CSS变量转换为兼容旧浏览器的代码,确保在不同环境下都能提供一致的用户体验。同时,PostCSS生态系统的强大和灵活也显示了其在现代前端开发中的重要地位。

相关推荐

filetype

C:\Users\于凡轩>jupyter notebook [I 2025-09-09 23:10:19.001 ServerApp] Extension package panel.io.jupyter_server_extension took 1.2302s to import [I 2025-09-09 23:10:19.002 ServerApp] jupyter_lsp | extension was successfully linked. [I 2025-09-09 23:10:19.014 ServerApp] jupyter_server_terminals | extension was successfully linked. [I 2025-09-09 23:10:19.130 ServerApp] jupyterlab | extension was successfully linked. [I 2025-09-09 23:10:19.154 ServerApp] notebook | extension was successfully linked. [I 2025-09-09 23:10:20.151 ServerApp] notebook_shim | extension was successfully linked. [I 2025-09-09 23:10:20.151 ServerApp] panel.io.jupyter_server_extension | extension was successfully linked. [I 2025-09-09 23:10:20.304 ServerApp] notebook_shim | extension was successfully loaded. [I 2025-09-09 23:10:20.320 ServerApp] jupyter_lsp | extension was successfully loaded. [I 2025-09-09 23:10:20.324 ServerApp] jupyter_server_terminals | extension was successfully loaded. [I 2025-09-09 23:10:20.338 LabApp] JupyterLab extension loaded from D:\python\Lib\site-packages\jupyterlab [I 2025-09-09 23:10:20.338 LabApp] JupyterLab application directory is D:\python\share\jupyter\lab [I 2025-09-09 23:10:20.340 LabApp] Extension Manager is 'pypi'. [I 2025-09-09 23:10:20.947 ServerApp] jupyterlab | extension was successfully loaded. [I 2025-09-09 23:10:20.963 ServerApp] notebook | extension was successfully loaded. [I 2025-09-09 23:10:20.965 ServerApp] panel.io.jupyter_server_extension | extension was successfully loaded. [I 2025-09-09 23:10:20.968 ServerApp] Serving notebooks from local directory: C:\Users\于凡轩 [I 2025-09-09 23:10:20.968 ServerApp] Jupyter Server 2.15.0 is running at: [I 2025-09-09 23:10:20.968 ServerApp] http://localhost:8888/tree?token=9661d4a474779e45a75206b53a327ab461235427a8051fda [I 2025-09-09 23:10:20.968 ServerApp] http://127.0.0.1:8888/tree?token=9661d4a474779e45a75206b53a327ab461235427a8051fda [I 2025-09-09 23:10:20.968 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 2025-09-09 23:10:21.030 ServerApp] To access the server, open this file in a browser: file:///C:/Users/%E4%BA%8E%E5%87%A1%E8%BD%A9/AppData/Roaming/jupyter/runtime/jpserver-18720-open.html Or copy and paste one of these URLs: http://localhost:8888/tree?token=9661d4a474779e45a75206b53a327ab461235427a8051fda http://127.0.0.1:8888/tree?token=9661d4a474779e45a75206b53a327ab461235427a8051fda [I 2025-09-09 23:10:21.347 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server

filetype

[36E8:1828][2025-03-14T12:51:18]i001: Burn v3.14.1.8722, Windows v10.0 (Build 19043: Service Pack 0), path: C:\Windows\Temp\{CD0815AA-6073-489B-A0EC-D340CE63BE86}\.cr\VC_redist.x64.exe [36E8:1828][2025-03-14T12:51:18]i009: Command Line: '-burn.clean.room=C:\shuju\VC_redist.x64.exe -burn.filehandle.attached=556 -burn.filehandle.self=600' [36E8:1828][2025-03-14T12:51:18]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\shuju\VC_redist.x64.exe' [36E8:1828][2025-03-14T12:51:18]i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'C:\shuju\' [36E8:1828][2025-03-14T12:51:18]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\ADMINI~1\AppData\Local\Temp\dd_vcredist_amd64_20250314125118.log' [36E8:1828][2025-03-14T12:51:18]i000: Setting string variable 'WixBundleName' to value 'Microsoft Visual C++ 2017 Redistributable (x64) - 14.16.27052' [36E8:1828][2025-03-14T12:51:18]i000: Setting string variable 'WixBundleManufacturer' to value 'Microsoft Corporation' [36E8:1858][2025-03-14T12:51:18]i000: Setting version variable 'WixBundleFileVersion' to value '14.16.27052.0' [36E8:1828][2025-03-14T12:51:18]i100: Detect begin, 10 packages [36E8:1828][2025-03-14T12:51:18]i000: Setting version variable 'windows_uCRT_DetectKey' to value '10.0.19041.789' [36E8:1828][2025-03-14T12:51:18]i000: Setting numeric variable 'windows_uCRT_DetectKeyExists' to value 1 [36E8:1828][2025-03-14T12:51:18]i102: Detected related bundle: {804e7d66-ccc2-4c12-84ba-476da31d103d}, type: Upgrade, scope: PerMachine, version: 14.42.34433.0, operation: Downgrade [36E8:1828][2025-03-14T12:51:18]i052: Condition '(VersionNT = v6.3 AND NOT VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false. [36E8:1828][2025-03-14T12:51:18]i052: Condition '(VersionNT = v6.3 AND VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false. [36E8:1828][2025-03-14T12:51:18]i052: Co

filetype

[38D8:3A34][2025-03-30T21:35:19]i001: Burn v3.10.1.2213, Windows v10.0 (Build 19045: Service Pack 0), path: F:\鬼泣5\Devil May Cry 5\_CommonRedist\vcredist\2017\vc_redist.x64.exe [38D8:3A34][2025-03-30T21:35:19]i009: Command Line: '' [38D8:3A34][2025-03-30T21:35:20]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\ADMINI~1\AppData\Local\Temp\dd_vcredist_amd64_20250330213520.log' [38D8:3A34][2025-03-30T21:35:20]i000: Setting string variable 'WixBundleOriginalSource' to value 'F:\鬼泣5\Devil May Cry 5\_CommonRedist\vcredist\2017\vc_redist.x64.exe' [38D8:3A34][2025-03-30T21:35:20]i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'F:\鬼泣5\Devil May Cry 5\_CommonRedist\vcredist\2017\' [38D8:3A34][2025-03-30T21:35:20]i000: Setting string variable 'WixBundleName' to value 'Microsoft Visual C++ 2017 Redistributable (x64) - 14.16.27027' [38D8:3A34][2025-03-30T21:35:20]i000: Setting string variable 'WixBundleManufacturer' to value 'Microsoft Corporation' [38D8:1870][2025-03-30T21:35:20]i000: Setting version variable 'WixBundleFileVersion' to value '14.16.27027.1' [38D8:3A34][2025-03-30T21:35:20]i100: Detect begin, 10 packages [38D8:3A34][2025-03-30T21:35:20]i000: Setting version variable 'windows_uCRT_DetectKey' to value '10.0.19041.3636' [38D8:3A34][2025-03-30T21:35:20]i000: Setting numeric variable 'windows_uCRT_DetectKeyExists' to value 1 [38D8:3A34][2025-03-30T21:35:20]i102: Detected related bundle: {804e7d66-ccc2-4c12-84ba-476da31d103d}, type: Upgrade, scope: PerMachine, version: 14.42.34433.0, operation: Downgrade [38D8:3A34][2025-03-30T21:35:20]i052: Condition '(VersionNT = v6.3 AND NOT VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false. [38D8:3A34][2025-03-30T21:35:20]i052: Condition '(VersionNT = v6.3 AND VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false. [38D8:3A34][2025-03-30T21:35:20]i052: Condition '(Versio,什么问题

filetype

root@yz-virtual-machine:/mnt/hgfs/code-docker/app# docker-compose logs mysql Attaching to account-mysql account-mysql | 2025-08-22 07:46:12+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.22-1debian10 started. account-mysql | 2025-08-22 07:46:12+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' account-mysql | 2025-08-22 07:46:12+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.22-1debian10 started. account-mysql | 2025-08-22T07:46:12.423251Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.22) starting as process 1 account-mysql | 2025-08-22T07:46:12.428094Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. account-mysql | 2025-08-22T07:46:12.588219Z 1 [ERROR] [MY-013171] [InnoDB] Cannot boot server version 80022 on data directory built by version 80043. Downgrade is not supported account-mysql | mysqld: Can't open file: 'mysql.ibd' (errno: 0 - ) account-mysql | 2025-08-22T07:46:17.590128Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine account-mysql | 2025-08-22T07:46:17.590577Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. account-mysql | 2025-08-22T07:46:17.590773Z 0 [ERROR] [MY-010119] [Server] Aborting account-mysql | 2025-08-22T07:46:17.591213Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.22) MySQL Community Server - GPL. account-mysql | 2025-08-22 07:46:17+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.22-1debian10 started. account-mysql | 2025-08-22 07:46:17+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' account-mysql | 2025-08-22 07:46:17+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.22-1debian10 started. account-mysql | 2025-08-22T07:46:18.154688Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.22) starting as process 1 account-mysql | 2025-08-22T07:46:18.159965Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. account-mysql | 2025-08-22T07:46:18.364881Z 1 [ERROR] [MY-013171] [InnoDB] Cannot boot server version 80022 on data directory built by version 80043. Downgrade is not supported

filetype

version: '3.7' services: server1: image: base-server container_name: server1 command: ["sh", "-c", "/scripts/start_services.sh"] environment: - VT_HOSTNAME=server1 - VT_TOPOLOGY=etcd:http://server1:2379 ports: - "15000:15000" - "15306:3306" networks: vitess-network: ipv4_address: 172.16.0.101 volumes: - ./scripts:/scripts - etcd-data:/var/lib/etcd # 修改挂载路径 server2: image: mysql-server container_name: server2 command: ["sh", "-c", "while ! nc -z server1 2379; do sleep 1; done; /scripts/init_master.sh"] environment: - VT_HOSTNAME=server2 - VT_TOPOLOGY=etcd:http://server1:2379 - VTDATAROOT=/vt/vtdataroot # 显式指定数据目录 networks: vitess-network: ipv4_address: 172.16.0.102 volumes: - ./scripts:/scripts - mysql-master:/vt/vtdataroot depends_on: - server1 server3: image: mysql-server container_name: server3 command: ["sh", "-c", "while ! nc -z server1 2379; do sleep 1; done; /scripts/init_replica.sh"] environment: - VT_HOSTNAME=server3 - VT_TOPOLOGY=etcd:http://server1:2379 - VTDATAROOT=/vt/vtdataroot networks: vitess-network: ipv4_address: 172.16.0.103 volumes: - ./scripts:/scripts - mysql-replica:/vt/vtdataroot depends_on: - server1 volumes: etcd-data: mysql-master: mysql-replica: networks: vitess-network: driver: bridge ipam: config: - subnet: 172.16.0.0/24 Dockerfile.base: FROM vitess/base USER root RUN chmod 777 /var/lib/etcd USER vitess Dockerfile.server: FROM vitess/base USER root RUN apt-get update && apt-get install -y netcat || yum install -y nc || apk add --no-cache gnu-netcat # 安装 etcdctl 和网络检测工具 RUN apt-get update && \ apt-get install -y curl && \ rm -rf /var/lib/apt/lists/* USER vitess start_services.sh: #!/bin/bash RUN apt-get update && apt-get install -y netcat || yum install -y nc || apk add --no-cache gnu-netcat # 启动 etcd、vtctld、vtgate etcd --data-dir /etcd & sleep 5 vtctld --topo_implementation etcd2 --topo_global_server_address http://localhost:2379 & vtgate --topo_implementation etcd2 --topo_global_server_address http://localhost:2379 --mysql_server_port 3306 & init_master.sh 和 init_replica.sh : #!/bin/bash # 启动 MySQL 从实例和 vttablet vttablet \ --topo_implementation etcd2 \ --topo_global_server_address server1:2379 \ --tablet-path "zone1-101" \ --init_keyspace "test_keyspace" \ --init_shard "0" \ --init_tablet_type "replica" \ --port 15002 \ --grpc_port 16002 \ --db_port 3306 2025-05-21 15:41:10.240 | /scripts/start_services.sh: line 3: RUN: command not found 2025-05-21 15:41:10.244 | /scripts/start_services.sh: line 3: yum: command not found 2025-05-21 15:41:10.248 | /scripts/start_services.sh: line 3: apk: command not found 2025-05-21 15:41:11.117 | {"level":"info","ts":"2025-05-21T07:41:11.109Z","caller":"etcdmain/etcd.go:73","msg":"Running: ","args":["etcd","--data-dir","/etcd"]} 2025-05-21 15:41:11.119 | {"level":"info","ts":"2025-05-21T07:41:11.117Z","caller":"embed/etcd.go:124","msg":"configuring peer listeners","listen-peer-urls":["http://localhost:2380"]} 2025-05-21 15:41:11.124 | {"level":"info","ts":"2025-05-21T07:41:11.124Z","caller":"embed/etcd.go:132","msg":"configuring client listeners","listen-client-urls":["http://localhost:2379"]} 2025-05-21 15:41:11.125 | {"level":"info","ts":"2025-05-21T07:41:11.125Z","caller":"embed/etcd.go:306","msg":"starting an etcd server","etcd-version":"3.5.6","git-sha":"cecbe35ce","go-version":"go1.16.15","go-os":"linux","go-arch":"amd64","max-cpu-set":12,"max-cpu-available":12,"member-initialized":false,"name":"default","data-dir":"/etcd","wal-dir":"","wal-dir-dedicated":"","member-dir":"/etcd/member","force-new-cluster":false,"heartbeat-interval":"100ms","election-timeout":"1s","initial-election-tick-advance":true,"snapshot-count":100000,"max-wals":5,"max-snapshots":5,"snapshot-catchup-entries":5000,"initial-advertise-peer-urls":["http://localhost:2380"],"listen-peer-urls":["http://localhost:2380"],"advertise-client-urls":["http://localhost:2379"],"listen-client-urls":["http://localhost:2379"],"listen-metrics-urls":[],"cors":["*"],"host-whitelist":["*"],"initial-cluster":"default=http://localhost:2380","initial-cluster-state":"new","initial-cluster-token":"etcd-cluster","quota-backend-bytes":2147483648,"max-request-bytes":1572864,"max-concurrent-streams":4294967295,"pre-vote":true,"initial-corrupt-check":false,"corrupt-check-time-interval":"0s","compact-check-time-enabled":false,"compact-check-time-interval":"1m0s","auto-compaction-mode":"periodic","auto-compaction-retention":"0s","auto-compaction-interval":"0s","discovery-url":"","discovery-proxy":"","downgrade-check-interval":"5s"} 2025-05-21 15:41:11.125 | {"level":"info","ts":"2025-05-21T07:41:11.125Z","caller":"embed/etcd.go:373","msg":"closing etcd server","name":"default","data-dir":"/etcd","advertise-peer-urls":["http://localhost:2380"],"advertise-client-urls":["http://localhost:2379"]} 2025-05-21 15:41:11.125 | {"level":"info","ts":"2025-05-21T07:41:11.125Z","caller":"embed/etcd.go:375","msg":"closed etcd server","name":"default","data-dir":"/etcd","advertise-peer-urls":["http://localhost:2380"],"advertise-client-urls":["http://localhost:2379"]} 2025-05-21 15:41:11.125 | {"level":"warn","ts":"2025-05-21T07:41:11.125Z","caller":"etcdmain/etcd.go:146","msg":"failed to start etcd","error":"cannot access data directory: mkdir /etcd: permission denied"} 2025-05-21 15:41:11.126 | {"level":"fatal","ts":"2025-05-21T07:41:11.125Z","caller":"etcdmain/etcd.go:204","msg":"discovery failed","error":"cannot access data directory: mkdir /etcd: permission denied","stacktrace":"go.etcd.io/etcd/server/v3/etcdmain.startEtcdOrProxyV2\n\tgo.etcd.io/etcd/server/v3/etcdmain/etcd.go:204\ngo.etcd.io/etcd/server/v3/etcdmain.Main\n\tgo.etcd.io/etcd/server/v3/etcdmain/main.go:40\nmain.main\n\tgo.etcd.io/etcd/server/v3/main.go:32\nruntime.main\n\truntime/proc.go:225"} nc: getaddrinfo for host "server1" port 2379: No address associated with hostname nc: getaddrinfo for host "server1" port 2379: No address associated with hostname nc: getaddrinfo for host "server1" port 2379: No address associated with hostname nc: getaddrinfo for host "server1" port 2379: No address associated with hostname nc: getaddrinfo for host "server1" port 2379: No address associated with hostname 启动失败

filetype
filetype

结合我们之前沟通及操作历史记录,就我以下系统及操作记录作出下一步操作指命,不要跨步,我会依据执行结果反馈给你,你再依据所有信息分板如何进行下一步操作。 硬件:斐讯N1盒子 底层ARMBIAN系统信息: _ _ _ ___ ___ /_\ _ _ _ __ | |__(_)__ _ _ _ / _ \/ __| / _ \| '_| ' \| '_ \ / _` | ' \ | (_) \__ \ /_/ \_\_| |_|_|_|_.__/_\__,_|_||_| \___/|___/ v25.08.0 for Aml.S905d running Armbian Linux 5.15.186-ophub Packages: Debian stable (bullseye) IPv4: (LAN) 192.168.1.7 (WAN) 113.78.***.*** Performance: Load: 14% Uptime: 2:05 Memory usage: 26% of 1.76G CPU temp: 49°C Usage of /: 42% of 6.4G storage/: 10% of 29G RX today: 303 MiB Commands: 1PANEL安装日志: [1Panel Log]: Docker 服务已成功重启。 设置 1Panel 端口 (默认是 14687): [1Panel Log]: 您设置的端口是: 14687 设置 1Panel 安全入口 (默认是 8382ffe897): haoyong [1Panel Log]: 您设置的面板安全入口是 haoyong 设置 1Panel 面板用户 (默认是 39e66cce8f): haoyong [1Panel Log]: 您设置的面板用户是 haoyong [1Panel Log]: 设置 1Panel 面板密码,设置后按回车键继续 (默认是 1f8ae2a537): ************** [1Panel Log]: 正在配置 1Panel 服务 Created symlink /etc/systemd/system/multi-user.target.wants/1panel-agent.service → /etc/systemd/system/1panel-agent.service. Created symlink /etc/systemd/system/multi-user.target.wants/1panel-core.service → /etc/systemd/system/1panel-core.service. [1Panel Log]: 正在启动 1Panel 服务 [1Panel Log]: 1Panel 服务已成功启动,正在继续执行后续配置,请稍候... [1Panel Log]: [1Panel Log]: =================感谢您的耐心等待,安装已完成================== [1Panel Log]: [1Panel Log]: 请使用您的浏览器访问面板: [1Panel Log]: 外部地址: http://113.78.237.211:14687/haoyong [1Panel Log]: 内部地址: http://192.168.1.7:14687/haoyong [1Panel Log]: 面板用户: haoyong [1Panel Log]: 面板密码: SANDking100005 [1Panel Log]: [1Panel Log]: 官方网站: https://1panel.cn [1Panel Log]: 项目文档: https://1panel.cn/docs [1Panel Log]: 代码仓库: https://github.com/1Panel-dev/1Panel [1Panel Log]: 前往 1Panel 官方论坛获取帮助: https://bbs.fit2cloud.com/c/1p/7 [1Panel Log]: [1Panel Log]: 如果您使用的是云服务器,请在安全组中打开端口 14687 [1Panel Log]: [1Panel Log]: 为了您的服务器安全,离开此屏幕后您将无法再次看到您的密码,请记住您的密码。 [1Panel Log]: [1Panel Log]: ================================================================ root@armbian:~# mysql安装内容: 安装 名称 mysql 版本 Root 密码 100005 端口 3306 容器名称 可以为空,为空自动生成 允许端口外部访问会放开防火墙端口 CPU 限制 0 核心数 限制为 0 则关闭限制,最大可用为 4核 内存限制 0 限制为 0 则关闭限制,最大可用为 1800.98MB 在应用启动之前执行 docker pull 来拉取镜像 编辑 compose 文件可能导致软件安装失败 系统相关检查如下: root@armbian:~# uname -m aarch64 root@armbian:~# uname -r 5.15.186-ophub root@armbian:~# lsb_release -a || cat /etc/os-release No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye root@armbian:~# free -h total used free shared buff/cache available Mem: 1.8Gi 447Mi 598Mi 19Mi 755Mi 1.2Gi Swap: 900Mi 0B 900Mi root@armbian:~# nproc nproc 4 4 root@armbian:~# free -h total used free shared buff/cache available Mem: 1.8Gi 445Mi 599Mi 19Mi 755Mi 1.2Gi Swap: 900Mi 0B 900Mi root@armbian:~# df -h / Filesystem Size Used Avail Use% Mounted on /dev/mmcblk2p2 6.4G 2.7G 3.7G 42% / root@armbian:~# sudo ss -tulpn | grep -E '80|443|3306|6379' tcp LISTEN 0 4096 0.0.0.0:14687 0.0.0.0:* users:(("1panel",pid=801,fd=11)) root@armbian:~# curl -I https://xibo.org.uk HTTP/2 301 server: nginx date: Sat, 19 Jul 2025 07:14:41 GMT content-type: text/html content-length: 169 location: https://xibosignage.com/ referrer-policy: no-referrer-when-downgrade strict-transport-security: max-age=31536000 root@armbian:~# 拉取源的测试如下: oot@armbian:~# docker images | grep hello-world hello-world latest f1f77a0f96b7 5 months ago 5.2kB root@armbian:~# docker images | grep hello-world hello-world latest f1f77a0f96b7 5 months ago 5.2kB root@armbian:~# docker history hello-world IMAGE CREATED CREATED BY SIZE COMMENT f1f77a0f96b7 5 months ago CMD ["/hello"] 0B buildkit.dockerfile.v0 <missing> 5 months ago COPY hello / # buildkit 5.2kB buildkit.dockerfile.v0 root@armbian:~# ^C 用1PANEL设置DOCKER及拉取MYSQL的操作日志: _ _ _ ___ ___ /_\ _ _ _ __ | |__(_)__ _ _ _ / _ \/ __| / _ \| '_| ' \| '_ \ / _` | ' \ | (_) \__ \ /_/ \_\_| |_|_|_|_.__/_\__,_|_||_| \___/|___/ v25.08.0 for Aml.S905d running Armbian Linux 5.15.186-ophub Packages: Debian stable (bullseye) IPv4: (LAN) 192.168.1.7 (WAN) 116.4.***.*** Performance: Load: 13% Uptime: 7:23 Memory usage: 27% of 1.76G CPU temp: 51°C Usage of /: 42% of 6.4G storage/: 19% of 29G RX today: 79 MiB Commands: Configuration : armbian-config Monitoring : htop root@armbian:~# docker run -d \ --name mysql \ -p 3306:3306 \ -v /mnt/docker/mysql/data:/var/lib/mysql \ -v /mnt/docker/mysql/conf:/etc/mysql/conf.d \ -v /mnt/docker/mysql/log:/var/log/mysql \ -e MYSQL_ROOT_PASSWORD=100005 \ --memory=512m \ --cpus=2 \ --restart=always \ mysql:8.0-oracle Unable to find image 'mysql:8.0-oracle' locally 8.0-oracle: Pulling from library/mysql 66c8c73e9d3d: Pull complete e45847b03d78: Pull complete 87befc648177: Pull complete 008e8e968476: Pull complete a72970729c8f: Pull complete 89b1faffd43a: Pull complete 2bd146ae1d6c: Pull complete a0967528f1a2: Pull complete 38c697cea99a: Pull complete fab608026c1e: Pull complete 24e041f1adac: Pull complete Digest: sha256:63823b8e2cbe4ae0c558155e02d00beba56130fbc3d147efccbdb328ae2dbb9e Status: Downloaded newer image for mysql:8.0-oracle 67460db937cbeedc95691f01d4b961e6a42616b45f60cd62107f73bd48b2b2b9 root@armbian:~# ^C root@armbian:~# docker ps -a | grep mysql 67460db937cb mysql:8.0-oracle "docker-entrypoint.s…" 8 minutes ago Up 6 minutes 0.0.0.0:3306->3306/tcp, 33060/tcp mysql root@armbian:~# docker logs mysql 2025-07-19 10:55:41+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.42-1.el9 started. 2025-07-19 10:55:43+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2025-07-19 10:55:43+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.42-1.el9 started. 2025-07-19 10:55:44+00:00 [Note] [Entrypoint]: Initializing database files 2025-07-19T10:55:44.643965Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead. 2025-07-19T10:55:44.644644Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.42) initializing of server in progress as process 82 2025-07-19T10:55:44.722791Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-07-19T10:55:48.060736Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2025-07-19T10:56:03.156308Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option. 2025-07-19 10:56:16+00:00 [Note] [Entrypoint]: Database files initialized 2025-07-19 10:56:16+00:00 [Note] [Entrypoint]: Starting temporary server 2025-07-19T10:56:16.845924Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead. 2025-07-19T10:56:16.851097Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.42) starting as process 126 2025-07-19T10:56:16.917937Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-07-19T10:56:17.897029Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2025-07-19T10:56:21.388398Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2025-07-19T10:56:21.388602Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2025-07-19T10:56:21.415665Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory. 2025-07-19T10:56:21.548697Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock 2025-07-19T10:56:21.549457Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.42' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server - GPL. 2025-07-19 10:56:21+00:00 [Note] [Entrypoint]: Temporary server started. '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock' Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it. 2025-07-19 10:56:44+00:00 [Note] [Entrypoint]: Stopping temporary server 2025-07-19T10:56:44.779995Z 10 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.0.42). 2025-07-19T10:56:46.899809Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-07-19 10:56:47+00:00 [Note] [Entrypoint]: Temporary server stopped 2025-07-19 10:56:47+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up. 2025-07-19T10:56:48.299792Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead. 2025-07-19T10:56:48.305067Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.42) starting as process 1 2025-07-19T10:56:48.334120Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-07-19T10:56:49.180497Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2025-07-19T10:56:54.411653Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2025-07-19T10:56:54.411875Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2025-07-19T10:57:02.537906Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory. 2025-07-19T10:57:02.670404Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock 2025-07-19T10:57:02.670930Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.42' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL. root@armbian:~# docker exec -it mysql mysql -uroot -p100005 -e "SHOW DATABASES;" mysql: [Warning] Using a password on the command line interface can be insecure. +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | +--------------------+ root@armbian:~# mysql -h 192.168.1.7 -P 3306 -uroot -p100005 Welcome to the MariaDB monitor. Commands end with ; or \g. Your MySQL connection id is 9 Server version: 8.0.42 MySQL Community Server - GPL Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MySQL [(none)]> ^接下来怎么操作

Ruin-鸣
  • 粉丝: 32
上传资源 快速赚钱