mirror of
https://github.com/acepanel/acepanel.github.io.git
synced 2026-02-04 11:27:14 +08:00
feat: 更新文档
This commit is contained in:
@@ -107,10 +107,10 @@ function nav(): DefaultTheme.NavItem[] {
|
||||
function sidebarQuickstart(): DefaultTheme.SidebarItem[] {
|
||||
return [
|
||||
{
|
||||
text: '动态与公告',
|
||||
text: 'News & Announcements',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "AcePanel 3.0 正式发布", link: '/news/acepanel-3-release' },
|
||||
{ text: "AcePanel 3.0 Official Release", link: '/news/acepanel-3-release' },
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -126,15 +126,15 @@ function sidebarQuickstart(): DefaultTheme.SidebarItem[] {
|
||||
link: '/upgrade'
|
||||
},
|
||||
{
|
||||
text: '第一个网站',
|
||||
text: 'First Website',
|
||||
link: '/first-website'
|
||||
},
|
||||
{
|
||||
text: '第一个容器',
|
||||
text: 'First Container',
|
||||
link: '/first-container'
|
||||
},
|
||||
{
|
||||
text: '第一个项目',
|
||||
text: 'First Project',
|
||||
link: '/first-project'
|
||||
},
|
||||
{
|
||||
@@ -151,105 +151,105 @@ function sidebarQuickstart(): DefaultTheme.SidebarItem[] {
|
||||
function sidebarAdvanced(): DefaultTheme.SidebarItem[] {
|
||||
return [
|
||||
{
|
||||
text: "应用",
|
||||
text: "Apps",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "概述", link: '/app' },
|
||||
{ text: "原生应用", link: '/app/native' },
|
||||
{ text: "运行环境", link: '/app/environment' },
|
||||
{ text: "容器模版", link: '/app/template' }
|
||||
{ text: "Overview", link: '/app' },
|
||||
{ text: "Native Apps", link: '/app/native' },
|
||||
{ text: "Runtimes", link: '/app/environment' },
|
||||
{ text: "Container Templates", link: '/app/template' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: "容器",
|
||||
text: "Containers",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "概述", link: '/container' },
|
||||
{ text: "容器", link: '/container/container' },
|
||||
{ text: "编排", link: '/container/compose' },
|
||||
{ text: "镜像", link: '/container/image' },
|
||||
{ text: "网络", link: '/container/network' },
|
||||
{ text: "卷", link: '/container/volume' }
|
||||
{ text: "Overview", link: '/container' },
|
||||
{ text: "Containers", link: '/container/container' },
|
||||
{ text: "Compose", link: '/container/compose' },
|
||||
{ text: "Images", link: '/container/image' },
|
||||
{ text: "Networks", link: '/container/network' },
|
||||
{ text: "Volumes", link: '/container/volume' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: "网站",
|
||||
text: "Websites",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "概述", link: '/website' },
|
||||
{ text: "反向代理", link: '/website/proxy' },
|
||||
{ text: "Overview", link: '/website' },
|
||||
{ text: "Reverse Proxy", link: '/website/proxy' },
|
||||
{ text: "PHP", link: '/website/php' },
|
||||
{ text: "纯静态", link: '/website/static' }
|
||||
{ text: "Static", link: '/website/static' }
|
||||
]
|
||||
}, {
|
||||
text: "项目",
|
||||
text: "Projects",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "概述", link: '/project' },
|
||||
{ text: "Overview", link: '/project' },
|
||||
{ text: "Go", link: '/project/go' },
|
||||
{ text: "Java", link: '/project/java' },
|
||||
{ text: "Node.js", link: '/project/nodejs' },
|
||||
{ text: "PHP", link: '/project/php' },
|
||||
{ text: "Python", link: '/project/python' },
|
||||
{ text: "通用", link: '/project/general' }
|
||||
{ text: "General", link: '/project/general' }
|
||||
]
|
||||
}, {
|
||||
text: "数据库",
|
||||
text: "Databases",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "概述", link: '/database' },
|
||||
{ text: "数据库", link: '/database/database' },
|
||||
{ text: "用户", link: '/database/user' },
|
||||
{ text: "服务器", link: '/database/server' }
|
||||
{ text: "Overview", link: '/database' },
|
||||
{ text: "Databases", link: '/database/database' },
|
||||
{ text: "Users", link: '/database/user' },
|
||||
{ text: "Servers", link: '/database/server' }
|
||||
]
|
||||
},{
|
||||
text: "证书",
|
||||
text: "Certificates",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "概述", link: '/cert' },
|
||||
{ text: "证书", link: '/cert/cert' },
|
||||
{ text: "账号", link: '/cert/account' },
|
||||
{ text: "Overview", link: '/cert' },
|
||||
{ text: "Certificates", link: '/cert/cert' },
|
||||
{ text: "Accounts", link: '/cert/account' },
|
||||
{ text: "DNS", link: '/cert/dns' }
|
||||
]
|
||||
}, {
|
||||
text: "监控",
|
||||
text: "Monitor",
|
||||
link: '/monitor'
|
||||
}, {
|
||||
text: "文件",
|
||||
text: "Files",
|
||||
link: '/file'
|
||||
}, {
|
||||
text: "备份",
|
||||
text: "Backup",
|
||||
link: '/backup'
|
||||
}, {
|
||||
text: "终端",
|
||||
text: "Terminal",
|
||||
link: '/ssh'
|
||||
}, {
|
||||
text: "任务",
|
||||
text: "Tasks",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "计划任务", link: '/task/schedule' },
|
||||
{ text: "面板任务", link: '/task/panel' }
|
||||
{ text: "Scheduled Tasks", link: '/task/schedule' },
|
||||
{ text: "Panel Tasks", link: '/task/panel' }
|
||||
]
|
||||
}, {
|
||||
text: "工具箱",
|
||||
text: "Toolbox",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "概述", link: '/toolbox' },
|
||||
{ text: "进程", link: '/toolbox/process' },
|
||||
{ text: "系统", link: '/toolbox/system' },
|
||||
{ text: "Overview", link: '/toolbox' },
|
||||
{ text: "Processes", link: '/toolbox/process' },
|
||||
{ text: "System", link: '/toolbox/system' },
|
||||
{ text: "SSH", link: '/toolbox/ssh' },
|
||||
{ text: "磁盘", link: '/toolbox/disk' },
|
||||
{ text: "日志清理", link: '/toolbox/log' },
|
||||
{ text: "Web 钩子", link: '/toolbox/webhook' },
|
||||
{ text: "跑分", link: '/toolbox/benchmark' }
|
||||
{ text: "Disk", link: '/toolbox/disk' },
|
||||
{ text: "Log Cleanup", link: '/toolbox/log' },
|
||||
{ text: "Webhooks", link: '/toolbox/webhook' },
|
||||
{ text: "Benchmark", link: '/toolbox/benchmark' }
|
||||
]
|
||||
}, {
|
||||
text: "设置",
|
||||
text: "Settings",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "基本设置", link: '/setting/basic' },
|
||||
{ text: "安全设置", link: '/setting/safe' },
|
||||
{ text: "用户设置", link: '/setting/user' }
|
||||
{ text: "Basic Settings", link: '/setting/basic' },
|
||||
{ text: "Security Settings", link: '/setting/safe' },
|
||||
{ text: "User Management", link: '/setting/user' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -257,7 +257,7 @@ function sidebarAdvanced(): DefaultTheme.SidebarItem[] {
|
||||
link: '/api'
|
||||
},
|
||||
{
|
||||
text: 'Security recommendations',
|
||||
text: 'Security Recommendations',
|
||||
link: '/security'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
# 应用
|
||||
# Application
|
||||
|
||||
应用模块是 AcePanel 的核心功能之一,用于管理服务器上的各类软件。通过应用模块,你可以方便地安装、配置和管理 Web 服务器、数据库、运行环境等常用软件。
|
||||
The application module is one of the core features of AcePanel, used to manage various software on the server. Through the application module, you can conveniently install, configure, and manage common software such as Web servers, databases, runtime environments, etc.
|
||||
|
||||
## 功能分类
|
||||
## Feature Categories
|
||||
|
||||
应用模块分为三个部分:
|
||||
The application module is divided into three parts:
|
||||
|
||||
- **原生应用**:直接安装在系统上的软件,如 Nginx、MySQL、Redis 等
|
||||
- **运行环境**:各类编程语言的运行时环境,如 PHP、Node.js、Python、Go、Java 等
|
||||
- **容器模板**:基于 Docker 的一键部署模板,可快速部署各类应用
|
||||
- **Native Applications**: Software installed directly on the system, such as Nginx, MySQL, Redis, etc.
|
||||
- **Runtime Environments**: Runtime environments for various programming languages, such as PHP, Node.js, Python, Go, Java, etc.
|
||||
- **Container Templates**: One-click deployment templates based on Docker, for quickly deploying various applications
|
||||
|
||||

|
||||

|
||||
|
||||
## 原生应用 vs 容器模板
|
||||
## Native Application vs Container Template
|
||||
|
||||
| 特性 | 原生应用 | 容器模板 |
|
||||
|------|----------|----------|
|
||||
| 性能 | 更高 | 略有损耗 |
|
||||
| 隔离性 | 共享系统环境 | 完全隔离 |
|
||||
| 部署难度 | 需要配置 | 一键部署 |
|
||||
| 资源占用 | 较低 | 较高 |
|
||||
| 适用场景 | 生产环境、高性能需求 | 快速测试、多版本共存 |
|
||||
| Feature | Native Application | Container Template |
|
||||
|---------|-------------------|-------------------|
|
||||
| Performance | Higher | Slight overhead |
|
||||
| Isolation | Shared system environment | Fully isolated |
|
||||
| Deployment Difficulty | Requires configuration | One-click deployment |
|
||||
| Resource Usage | Lower | Higher |
|
||||
| Use Cases | Production environment, high performance needs | Quick testing, multiple version coexistence |
|
||||
|
||||
## 应用分类
|
||||
## Application Categories
|
||||
|
||||
原生应用按功能预设了多个分类,包括但不限于:
|
||||
Native applications are preset with multiple categories by function, including but not limited to:
|
||||
|
||||
- **Web 服务器**:Nginx、OpenResty、Apache
|
||||
- **数据库**:MySQL、MariaDB、PostgreSQL、Percona
|
||||
- **容器**:Docker、Podman
|
||||
- **中间件**:Redis、Memcached
|
||||
- **存储**:MinIO、S3fs
|
||||
- **工具**:phpMyAdmin、Pure-FTPd、Supervisor、Rsync、Frp
|
||||
- **Web Servers**: Nginx, OpenResty, Apache
|
||||
- **Databases**: MySQL, MariaDB, PostgreSQL, Percona
|
||||
- **Containers**: Docker, Podman
|
||||
- **Middleware**: Redis, Memcached
|
||||
- **Storage**: MinIO, S3fs
|
||||
- **Tools**: phpMyAdmin, Pure-FTPd, Supervisor, Rsync, Frp
|
||||
|
||||
## 下一步
|
||||
## Next Steps
|
||||
|
||||
- [原生应用](./app/native) - 了解如何安装和管理原生应用
|
||||
- [运行环境](./app/environment) - 了解如何安装编程语言运行环境
|
||||
- [容器模板](./app/template) - 了解如何使用容器模板快速部署应用
|
||||
- [Native Applications](./app/native) - Learn how to install and manage native applications
|
||||
- [Runtime Environments](./app/environment) - Learn how to install programming language runtime environments
|
||||
- [Container Templates](./app/template) - Learn how to use container templates to quickly deploy applications
|
||||
|
||||
@@ -1,97 +1,97 @@
|
||||
# 运行环境
|
||||
# Runtime Environment
|
||||
|
||||
运行环境用于安装各类编程语言的运行时,为网站和项目提供执行环境。
|
||||
Runtime environments are used to install runtimes for various programming languages, providing execution environments for websites and projects.
|
||||
|
||||
## 支持的语言
|
||||
## Supported Languages
|
||||
|
||||
AcePanel 支持以下编程语言的运行环境:
|
||||
AcePanel supports runtime environments for the following programming languages:
|
||||
|
||||
| 语言 | 可用版本 | 说明 |
|
||||
|------|----------|------|
|
||||
| Go | 1.20 - 1.25 | 适合构建高性能后端服务 |
|
||||
| Java | JDK 8, 11, 17, 21, 25 | 使用 Amazon Corretto 发行版 |
|
||||
| Node.js | 20, 22, 24 | 适合前端构建和 Node 应用 |
|
||||
| PHP | 7.4 - 8.5 | 适合 Web 开发 |
|
||||
| Python | 3.10 - 3.14 | 适合脚本和 Web 应用 |
|
||||
| Language | Available Versions | Description |
|
||||
|----------|-------------------|-------------|
|
||||
| Go | 1.20 - 1.25 | Suitable for building high-performance backend services |
|
||||
| Java | JDK 8, 11, 17, 21, 25 | Uses Amazon Corretto distribution |
|
||||
| Node.js | 20, 22, 24 | Suitable for frontend builds and Node applications |
|
||||
| PHP | 7.4 - 8.5 | Suitable for Web development |
|
||||
| Python | 3.10 - 3.14 | Suitable for scripts and Web applications |
|
||||
|
||||
## 运行环境列表
|
||||
## Runtime Environment List
|
||||
|
||||
进入 **应用** 页面,点击 **运行环境** 标签查看可用的运行环境:
|
||||
Go to the **Applications** page, click the **Runtime Environment** tab to view available runtime environments:
|
||||
|
||||

|
||||

|
||||
|
||||
点击顶部的语言分类可以筛选特定语言的版本:
|
||||
Click the language category at the top to filter versions for a specific language:
|
||||
|
||||

|
||||

|
||||
|
||||
## 安装运行环境
|
||||
## Install Runtime Environment
|
||||
|
||||
1. 进入 **应用** 页面
|
||||
2. 点击 **运行环境** 标签
|
||||
3. 选择需要的语言分类(或查看全部)
|
||||
4. 点击对应版本的 **安装** 按钮
|
||||
1. Go to the **Applications** page
|
||||
2. Click the **Runtime Environment** tab
|
||||
3. Select the desired language category (or view all)
|
||||
4. Click the **Install** button for the corresponding version
|
||||
|
||||
::: tip 版本选择建议
|
||||
- 生产环境建议使用 LTS(长期支持)版本
|
||||
- 标注"已停止维护"的版本不建议用于新项目
|
||||
- 可以同时安装多个版本,在项目中指定使用
|
||||
::: tip Version Selection Recommendations
|
||||
- Production environments are recommended to use LTS (Long Term Support) versions
|
||||
- Versions marked "End of Life" are not recommended for new projects
|
||||
- Multiple versions can be installed simultaneously and specified for use in projects
|
||||
:::
|
||||
|
||||
## 管理运行环境
|
||||
## Manage Runtime Environment
|
||||
|
||||
已安装的运行环境会显示 **管理** 按钮,点击进入管理页面:
|
||||
Installed runtime environments will display a **Manage** button. Click to enter the management page:
|
||||
|
||||

|
||||

|
||||
|
||||
### 运行状态
|
||||
### Running Status
|
||||
|
||||
显示运行环境的当前状态,提供启动、停止、重启、重载等操作。
|
||||
Displays the current status of the runtime environment, providing operations such as start, stop, restart, and reload.
|
||||
|
||||
### 模块管理(PHP)
|
||||
### Module Management (PHP)
|
||||
|
||||
PHP 运行环境提供模块管理功能,可以安装或卸载各种 PHP 模块:
|
||||
PHP runtime environment provides module management functionality, allowing installation or uninstallation of various PHP modules:
|
||||
|
||||

|
||||

|
||||
|
||||
常用模块包括:
|
||||
Common modules include:
|
||||
|
||||
- **OPcache**:PHP 字节码缓存,提升性能
|
||||
- **Redis**:连接 Redis 数据库
|
||||
- **ImageMagick**:图像处理
|
||||
- **Swoole/Swow**:高性能异步框架
|
||||
- **ionCube**:PHP 代码加密解密
|
||||
- **OPcache**: PHP bytecode cache, improves performance
|
||||
- **Redis**: Connect to Redis database
|
||||
- **ImageMagick**: Image processing
|
||||
- **Swoole/Swow**: High-performance asynchronous framework
|
||||
- **ionCube**: PHP code encryption and decryption
|
||||
|
||||
### 配置文件
|
||||
### Configuration Files
|
||||
|
||||
可以编辑 PHP 的主配置文件(php.ini)和 FPM 配置文件。
|
||||
You can edit PHP's main configuration file (php.ini) and FPM configuration file.
|
||||
|
||||
### 设置为 CLI 默认版本
|
||||
### Set as CLI Default Version
|
||||
|
||||
点击 **设置为 CLI 默认版本** 按钮,可以将当前版本设置为命令行默认使用的 PHP 版本。
|
||||
Click the **Set as CLI Default Version** button to set the current version as the default PHP version used by the command line.
|
||||
|
||||
## 多版本共存
|
||||
## Multiple Version Coexistence
|
||||
|
||||
AcePanel 支持同一语言的多个版本共存。例如,你可以同时安装 PHP 7.4 和 PHP 8.3,不同的网站可以使用不同的 PHP 版本。
|
||||
AcePanel supports multiple versions of the same language coexisting. For example, you can install both PHP 7.4 and PHP 8.3 simultaneously, and different websites can use different PHP versions.
|
||||
|
||||
安装路径规则:
|
||||
Installation path rules:
|
||||
|
||||
- **Go**:`/opt/ace/server/go/版本号`
|
||||
- **Java**:`/opt/ace/server/java/版本号`
|
||||
- **Node.js**:`/opt/ace/server/nodejs/版本号`
|
||||
- **PHP**:`/opt/ace/server/php/版本号`
|
||||
- **Python**:`/opt/ace/server/python/版本号`
|
||||
- **Go**: `/opt/ace/server/go/version`
|
||||
- **Java**: `/opt/ace/server/java/version`
|
||||
- **Node.js**: `/opt/ace/server/nodejs/version`
|
||||
- **PHP**: `/opt/ace/server/php/version`
|
||||
- **Python**: `/opt/ace/server/python/version`
|
||||
|
||||
## 在项目中使用
|
||||
## Using in Projects
|
||||
|
||||
创建项目时,可以在项目设置中选择使用的运行环境版本。详见 [项目管理](../project) 文档。
|
||||
When creating a project, you can select the runtime environment version to use in the project settings. See [Project Management](../project) documentation for details.
|
||||
|
||||
## 更新运行环境
|
||||
## Update Runtime Environment
|
||||
|
||||
当有新版本可用时,列表中会显示最新版本号。你可以:
|
||||
When a new version is available, the latest version number will be displayed in the list. You can:
|
||||
|
||||
1. 卸载旧版本,安装新版本
|
||||
2. 保留旧版本,同时安装新版本(推荐)
|
||||
1. Uninstall the old version and install the new version
|
||||
2. Keep the old version and install the new version simultaneously (recommended)
|
||||
|
||||
::: warning 注意
|
||||
更新运行环境版本可能导致依赖该版本的项目出现兼容性问题,请在测试环境验证后再更新生产环境。
|
||||
::: warning Note
|
||||
Updating runtime environment versions may cause compatibility issues with projects that depend on that version. Please verify in a test environment before updating the production environment.
|
||||
:::
|
||||
|
||||
@@ -1,83 +1,83 @@
|
||||
# 原生应用
|
||||
# Native Applications
|
||||
|
||||
原生应用是直接安装在系统上的软件,相比容器化部署具有更好的性能和更低的资源占用。
|
||||
Native applications are software installed directly on the system, offering better performance and lower resource usage compared to containerized deployment.
|
||||
|
||||
## 应用列表
|
||||
## Application List
|
||||
|
||||
进入 **应用** 页面,默认显示原生应用列表。你可以通过顶部的分类标签筛选不同类型的应用。
|
||||
Go to the **Applications** page, which displays the native application list by default. You can filter different types of applications through the category tabs at the top.
|
||||
|
||||

|
||||

|
||||
|
||||
列表中显示以下信息:
|
||||
The list displays the following information:
|
||||
|
||||
- **应用名称**:软件名称
|
||||
- **描述**:软件的简要说明
|
||||
- **已安装版本**:当前安装的版本号(未安装则为空)
|
||||
- **在主页显示**:是否在面板首页的快捷应用中显示
|
||||
- **操作**:安装、管理或卸载
|
||||
- **Application Name**: Software name
|
||||
- **Description**: Brief description of the software
|
||||
- **Installed Version**: Currently installed version number (empty if not installed)
|
||||
- **Show on Homepage**: Whether to display in the quick applications on the panel homepage
|
||||
- **Actions**: Install, manage, or uninstall
|
||||
|
||||
## 安装应用
|
||||
## Install Application
|
||||
|
||||
点击应用右侧的 **安装** 按钮,会弹出安装对话框:
|
||||
Click the **Install** button on the right side of the application, and an installation dialog will pop up:
|
||||
|
||||

|
||||

|
||||
|
||||
### 选择渠道
|
||||
### Select Channel
|
||||
|
||||
部分应用提供多个版本渠道,点击下拉框选择需要的版本系列:
|
||||
Some applications provide multiple version channels. Click the dropdown to select the desired version series:
|
||||
|
||||

|
||||

|
||||
|
||||
### 选择版本
|
||||
### Select Version
|
||||
|
||||
选择渠道后,系统会自动填入该渠道的最新版本号:
|
||||
After selecting a channel, the system will automatically fill in the latest version number for that channel:
|
||||
|
||||

|
||||

|
||||
|
||||
点击 **安装** 按钮开始安装。安装过程中可以在 **任务** 页面查看详细日志。
|
||||
Click the **Install** button to start installation. During installation, you can view detailed logs on the **Tasks** page.
|
||||
|
||||
## 管理应用
|
||||
## Manage Application
|
||||
|
||||
已安装的应用会显示 **管理** 按钮,点击进入应用管理页面。
|
||||
Installed applications will display a **Manage** button. Click to enter the application management page.
|
||||
|
||||
### 运行状态
|
||||
### Running Status
|
||||
|
||||
管理页面首先显示应用的运行状态:
|
||||
The management page first displays the application's running status:
|
||||
|
||||

|
||||

|
||||
|
||||
提供以下操作:
|
||||
The following operations are provided:
|
||||
|
||||
- **启动**:启动已停止的服务
|
||||
- **停止**:停止正在运行的服务
|
||||
- **重启**:重启服务(会中断连接)
|
||||
- **重载**:重新加载配置(不中断连接,推荐)
|
||||
- **Start**: Start a stopped service
|
||||
- **Stop**: Stop a running service
|
||||
- **Restart**: Restart the service (will interrupt connections)
|
||||
- **Reload**: Reload configuration (without interrupting connections, recommended)
|
||||
|
||||
### 修改配置
|
||||
### Modify Configuration
|
||||
|
||||
点击 **修改配置** 标签,可以直接编辑应用的配置文件:
|
||||
Click the **Modify Configuration** tab to directly edit the application's configuration file:
|
||||
|
||||

|
||||

|
||||
|
||||
::: warning 注意
|
||||
修改配置文件前请确保了解每个参数的含义,错误的配置可能导致服务无法启动。
|
||||
::: warning Note
|
||||
Please ensure you understand the meaning of each parameter before modifying configuration files. Incorrect configuration may prevent the service from starting.
|
||||
:::
|
||||
|
||||
### 日志查看
|
||||
### View Logs
|
||||
|
||||
点击 **运行日志** 或 **错误日志** 标签,可以查看应用的日志,便于排查问题。
|
||||
Click the **Run Log** or **Error Log** tab to view application logs, which is helpful for troubleshooting.
|
||||
|
||||
## 卸载应用
|
||||
## Uninstall Application
|
||||
|
||||
点击 **卸载** 按钮可以卸载应用。卸载前请确保:
|
||||
Click the **Uninstall** button to uninstall the application. Before uninstalling, please ensure:
|
||||
|
||||
1. 没有网站或项目依赖该应用
|
||||
2. 已备份重要的配置文件和数据
|
||||
1. No websites or projects depend on this application
|
||||
2. Important configuration files and data have been backed up
|
||||
|
||||
::: danger 警告
|
||||
卸载数据库类应用(如 MySQL、PostgreSQL)会删除所有数据库数据,请务必提前备份!
|
||||
::: danger Warning
|
||||
Uninstalling database applications (such as MySQL, PostgreSQL) will delete all database data. Please make sure to backup in advance!
|
||||
:::
|
||||
|
||||
## 主页快捷方式
|
||||
## Homepage Shortcut
|
||||
|
||||
开启 **在主页显示** 开关后,该应用会出现在面板首页的快捷应用区域,方便快速访问管理页面。
|
||||
After enabling the **Show on Homepage** switch, the application will appear in the quick applications area on the panel homepage for quick access to the management page.
|
||||
|
||||
@@ -1,99 +1,99 @@
|
||||
# 容器模板
|
||||
# Container Templates
|
||||
|
||||
容器模板提供了基于 Docker 的一键部署方案,可以快速部署各类常用应用,无需手动配置。
|
||||
Container templates provide Docker-based one-click deployment solutions for quickly deploying various common applications without manual configuration.
|
||||
|
||||
## 前置要求
|
||||
## Prerequisites
|
||||
|
||||
使用容器模板前,需要先安装 Docker:
|
||||
Before using container templates, you need to install Docker first:
|
||||
|
||||
1. 进入 **应用** > **原生应用**
|
||||
2. 找到 Docker,点击 **安装**
|
||||
3. 等待安装完成
|
||||
1. Go to **Applications** > **Native Applications**
|
||||
2. Find Docker, click **Install**
|
||||
3. Wait for installation to complete
|
||||
|
||||
## 模板列表
|
||||
## Template List
|
||||
|
||||
进入 **应用** 页面,点击 **容器模板** 标签查看可用模板:
|
||||
Go to the **Applications** page, click the **Container Templates** tab to view available templates:
|
||||
|
||||

|
||||

|
||||
|
||||
## 部署应用
|
||||
## Deploy Application
|
||||
|
||||
点击模板卡片上的 **部署** 按钮,会启动部署向导。
|
||||
Click the **Deploy** button on the template card to start the deployment wizard.
|
||||
|
||||
### 第一步:选择部署模式
|
||||
### Step 1: Select Deployment Mode
|
||||
|
||||

|
||||

|
||||
|
||||
- **创建新编排**:从模板创建一个新的 Docker Compose 编排
|
||||
- **更新现有编排**:使用模板更新已有的编排配置
|
||||
- **Create New Compose**: Create a new Docker Compose from the template
|
||||
- **Update Existing Compose**: Use the template to update an existing compose configuration
|
||||
|
||||
### 第二步:配置参数
|
||||
### Step 2: Configure Parameters
|
||||
|
||||
根据应用需求填写配置信息:
|
||||
Fill in configuration information according to application requirements:
|
||||
|
||||

|
||||

|
||||
|
||||
常见配置项:
|
||||
Common configuration items:
|
||||
|
||||
- **编排名称**:用于标识这个部署
|
||||
- **自动启动**:是否在创建后自动启动容器
|
||||
- **自动防火墙**:是否自动放行端口
|
||||
- **数据库配置**:用户名、密码、地址等
|
||||
- **端口配置**:服务监听的端口
|
||||
- **Compose Name**: Used to identify this deployment
|
||||
- **Auto Start**: Whether to automatically start containers after creation
|
||||
- **Auto Firewall**: Whether to automatically allow ports
|
||||
- **Database Configuration**: Username, password, address, etc.
|
||||
- **Port Configuration**: Port the service listens on
|
||||
|
||||
### 第三步:预览与编辑
|
||||
### Step 3: Preview and Edit
|
||||
|
||||
预览生成的 Docker Compose 配置文件:
|
||||
Preview the generated Docker Compose configuration file:
|
||||
|
||||

|
||||

|
||||
|
||||
你可以在这里:
|
||||
Here you can:
|
||||
|
||||
- 查看和编辑 **编排文件**(docker-compose.yml)
|
||||
- 查看和编辑 **环境变量**
|
||||
- View and edit the **Compose File** (docker-compose.yml)
|
||||
- View and edit **Environment Variables**
|
||||
|
||||
### 第四步:确认部署
|
||||
### Step 4: Confirm Deployment
|
||||
|
||||
确认所有配置无误后,点击 **创建** 完成部署:
|
||||
After confirming all configurations are correct, click **Create** to complete deployment:
|
||||
|
||||

|
||||

|
||||
|
||||
部署完成后,应用会出现在 **容器** > **编排** 页面中进行管理。
|
||||
After deployment, the application will appear in the **Containers** > **Compose** page for management.
|
||||
|
||||
## 模板 vs 手动部署
|
||||
## Template vs Manual Deployment
|
||||
|
||||
| 特性 | 使用模板 | 手动部署 |
|
||||
|------|----------|----------|
|
||||
| 配置难度 | 简单,填写基本信息即可 | 需要编写 docker-compose.yml |
|
||||
| 灵活性 | 使用预设配置 | 完全自定义 |
|
||||
| 适用场景 | 快速部署常用应用 | 特殊需求、自定义配置 |
|
||||
| Feature | Using Template | Manual Deployment |
|
||||
|---------|----------------|-------------------|
|
||||
| Configuration Difficulty | Simple, just fill in basic information | Need to write docker-compose.yml |
|
||||
| Flexibility | Uses preset configuration | Fully customizable |
|
||||
| Use Cases | Quick deployment of common applications | Special requirements, custom configuration |
|
||||
|
||||
## 常用模板说明
|
||||
## Common Template Descriptions
|
||||
|
||||
### WordPress
|
||||
|
||||
开源博客和内容管理系统,适合搭建个人博客或企业网站。
|
||||
Open-source blog and content management system, suitable for building personal blogs or corporate websites.
|
||||
|
||||
### pgAdmin 4
|
||||
|
||||
PostgreSQL 数据库的图形化管理工具。
|
||||
Graphical management tool for PostgreSQL databases.
|
||||
|
||||
### phpMyAdmin
|
||||
|
||||
MySQL/MariaDB 数据库的图形化管理工具。
|
||||
Graphical management tool for MySQL/MariaDB databases.
|
||||
|
||||
### Vaultwarden
|
||||
|
||||
轻量级密码管理服务器,兼容 Bitwarden 客户端。
|
||||
Lightweight password management server, compatible with Bitwarden clients.
|
||||
|
||||
### 青龙
|
||||
### Qinglong
|
||||
|
||||
定时任务管理平台,支持 Python、JavaScript、Shell 等脚本。
|
||||
Scheduled task management platform, supporting Python, JavaScript, Shell, and other scripts.
|
||||
|
||||
### OpenList
|
||||
|
||||
多存储聚合的文件列表程序,支持阿里云盘、OneDrive 等。
|
||||
Multi-storage aggregation file listing program, supporting Alibaba Cloud Drive, OneDrive, etc.
|
||||
|
||||
## 更新缓存
|
||||
## Update Cache
|
||||
|
||||
如果模板列表显示不完整或需要获取最新模板,点击页面顶部的 **更新缓存** 按钮刷新模板列表。
|
||||
If the template list is incomplete or you need to get the latest templates, click the **Update Cache** button at the top of the page to refresh the template list.
|
||||
|
||||
@@ -1,228 +1,228 @@
|
||||
# 备份
|
||||
# Backup
|
||||
|
||||
备份模块用于备份和恢复网站文件和数据库,支持本地备份和远程存储。
|
||||
The backup module is used to backup and restore website files and databases, supporting local backup and remote storage.
|
||||
|
||||
## 备份页面
|
||||
## Backup Page
|
||||
|
||||

|
||||

|
||||
|
||||
## 备份类型
|
||||
## Backup Types
|
||||
|
||||
备份模块支持以下类型的备份:
|
||||
The backup module supports the following types of backups:
|
||||
|
||||
| 类型 | 说明 |
|
||||
|------|------------------------------|
|
||||
| 网站 | 备份网站文件 |
|
||||
| MySQL | 备份 Percona/MySQL/MariaDB 数据库 |
|
||||
| PostgreSQL | 备份 PostgreSQL 数据库 |
|
||||
| Type | Description |
|
||||
|------|---------------------------------------|
|
||||
| Website | Backup website files |
|
||||
| MySQL | Backup Percona/MySQL/MariaDB databases |
|
||||
| PostgreSQL | Backup PostgreSQL databases |
|
||||
|
||||
## 创建备份
|
||||
## Create Backup
|
||||
|
||||
1. 选择备份类型标签(网站/MySQL/PostgreSQL)
|
||||
2. 点击 **创建备份**
|
||||
3. 选择要备份的网站或数据库
|
||||
4. 选择存储位置
|
||||
5. 点击确认
|
||||
1. Select the backup type tab (Website/MySQL/PostgreSQL)
|
||||
2. Click **Create Backup**
|
||||
3. Select the website or database to backup
|
||||
4. Select storage location
|
||||
5. Click Confirm
|
||||
|
||||
备份文件格式:
|
||||
- 网站:`.zip` 压缩包
|
||||
- 数据库:`.sql.zip` 压缩的 SQL 文件
|
||||
Backup file formats:
|
||||
- Website: `.zip` compressed package
|
||||
- Database: `.sql.zip` compressed SQL file
|
||||
|
||||
## 备份列表
|
||||
## Backup List
|
||||
|
||||
备份列表显示以下信息:
|
||||
The backup list displays the following information:
|
||||
|
||||
- **文件名**:备份文件名称
|
||||
- **大小**:备份文件大小
|
||||
- **更新日期**:备份时间
|
||||
- **操作**:下载、恢复、删除
|
||||
- **Filename**: Backup file name
|
||||
- **Size**: Backup file size
|
||||
- **Update Date**: Backup time
|
||||
- **Actions**: Download, restore, delete
|
||||
|
||||
## 恢复备份
|
||||
## Restore Backup
|
||||
|
||||
1. 在备份列表中找到要恢复的备份
|
||||
2. 点击 **恢复** 按钮
|
||||
3. 确认恢复操作
|
||||
1. Find the backup to restore in the backup list
|
||||
2. Click the **Restore** button
|
||||
3. Confirm the restore operation
|
||||
|
||||
::: danger 警告
|
||||
恢复操作会覆盖现有数据,请确保已备份当前数据!
|
||||
::: danger Warning
|
||||
The restore operation will overwrite existing data. Please ensure you have backed up current data!
|
||||
:::
|
||||
|
||||
## 上传备份
|
||||
## Upload Backup
|
||||
|
||||
点击 **上传备份** 按钮可以上传本地的备份文件,用于恢复数据。
|
||||
Click the **Upload Backup** button to upload local backup files for data restoration.
|
||||
|
||||
## 存储管理
|
||||
## Storage Management
|
||||
|
||||
切换到 **存储** 标签页管理备份存储位置。
|
||||
Switch to the **Storage** tab to manage backup storage locations.
|
||||
|
||||

|
||||

|
||||
|
||||
### 本地存储
|
||||
### Local Storage
|
||||
|
||||
默认的存储位置,备份文件保存在服务器本地。
|
||||
The default storage location, backup files are saved locally on the server.
|
||||
|
||||
### 远程存储
|
||||
### Remote Storage
|
||||
|
||||
点击 **添加存储** 可以添加远程存储,支持:
|
||||
Click **Add Storage** to add remote storage, supporting:
|
||||
|
||||
- **S3 兼容存储**:AWS S3、阿里云 OSS、腾讯云 COS 等
|
||||
- **FTP/SFTP**:FTP 或 SFTP 服务器
|
||||
- **WebDAV**:WebDAV 服务器
|
||||
- **S3 Compatible Storage**: AWS S3, Alibaba Cloud OSS, Tencent Cloud COS, etc.
|
||||
- **FTP/SFTP**: FTP or SFTP servers
|
||||
- **WebDAV**: WebDAV servers
|
||||
|
||||
远程存储的优势:
|
||||
- 异地备份,防止数据丢失
|
||||
- 不占用服务器磁盘空间
|
||||
- 便于多服务器共享备份
|
||||
Advantages of remote storage:
|
||||
- Off-site backup to prevent data loss
|
||||
- Does not occupy server disk space
|
||||
- Convenient for sharing backups across multiple servers
|
||||
|
||||
### S3 兼容存储配置
|
||||
### S3 Compatible Storage Configuration
|
||||
|
||||
S3 兼容存储是最常用的远程存储方式,大多数云存储服务商都提供 S3 兼容接口。
|
||||
S3 compatible storage is the most commonly used remote storage method. Most cloud storage providers offer S3 compatible interfaces.
|
||||
|
||||
#### 配置参数
|
||||
#### Configuration Parameters
|
||||
|
||||
| 参数 | 说明 |
|
||||
|------|------|
|
||||
| 名称 | 存储配置的名称,便于识别 |
|
||||
| 类型 | 选择 S3 |
|
||||
| Access Key | 访问密钥 ID |
|
||||
| Secret Key | 访问密钥密码 |
|
||||
| 风格 | Virtual Hosted 或 Path Style |
|
||||
| 区域 | 区域代码,如 `us-east-1`、`cn-hangzhou` |
|
||||
| 端点 | S3 服务端点 URL |
|
||||
| 协议 | HTTPS(推荐)或 HTTP |
|
||||
| 存储桶 | 存储桶名称 |
|
||||
| 路径 | 备份文件存储的子路径(可选) |
|
||||
| Parameter | Description |
|
||||
|-----------|-------------|
|
||||
| Name | Name of the storage configuration for identification |
|
||||
| Type | Select S3 |
|
||||
| Access Key | Access Key ID |
|
||||
| Secret Key | Access Key Secret |
|
||||
| Style | Virtual Hosted or Path Style |
|
||||
| Region | Region code, e.g., `us-east-1`, `cn-hangzhou` |
|
||||
| Endpoint | S3 service endpoint URL |
|
||||
| Protocol | HTTPS (recommended) or HTTP |
|
||||
| Bucket | Bucket name |
|
||||
| Path | Sub-path for backup file storage (optional) |
|
||||
|
||||
#### 访问风格说明
|
||||
#### Access Style Explanation
|
||||
|
||||
S3 有两种 URL 访问风格:
|
||||
S3 has two URL access styles:
|
||||
|
||||
- **Virtual Hosted Style**:`https://bucket.endpoint/key`
|
||||
- 桶名作为子域名
|
||||
- AWS S3 默认使用此风格
|
||||
- **Virtual Hosted Style**: `https://bucket.endpoint/key`
|
||||
- Bucket name as subdomain
|
||||
- AWS S3 uses this style by default
|
||||
|
||||
- **Path Style**:`https://endpoint/bucket/key`
|
||||
- 桶名作为路径的一部分
|
||||
- 自建 MinIO 等通常使用此风格
|
||||
- **Path Style**: `https://endpoint/bucket/key`
|
||||
- Bucket name as part of the path
|
||||
- Self-hosted MinIO typically uses this style
|
||||
|
||||
#### 兼容性列表
|
||||
#### Compatibility List
|
||||
|
||||
| 服务商 | 文档 | 兼容访问风格 | 兼容性 |
|
||||
|--------|------|-------------|--------|
|
||||
| 阿里云 OSS | [文档](https://help.aliyun.com/document_detail/410748.html) | Virtual Hosted Style | ✅ |
|
||||
| 腾讯云 COS | [文档](https://cloud.tencent.com/document/product/436/41284) | Virtual Hosted Style / Path Style | ✅ |
|
||||
| 七牛云 | [文档](https://developer.qiniu.com/kodo/4088/s3-access-domainname) | Virtual Hosted Style / Path Style | ✅ |
|
||||
| 百度云 BOS | [文档](https://cloud.baidu.com/doc/BOS/s/Fjwvyq9xo) | Virtual Hosted Style / Path Style | ✅ |
|
||||
| 京东云 | [文档](https://docs.jdcloud.com/cn/object-storage-service/api/regions-and-endpoints) | Virtual Hosted Style | ✅ |
|
||||
| 金山云 | [文档](https://docs.ksyun.com/documents/6761) | Virtual Hosted Style | ✅ |
|
||||
| 青云 QingStor | [文档](https://docsv3.qingcloud.com/storage/object-storage/s3/intro/) | Virtual Hosted Style / Path Style | ✅ |
|
||||
| 网易数帆 | [文档](https://sf.163.com/help/documents/89796157866430464) | Virtual Hosted Style | ✅ |
|
||||
| Cloudflare R2 | [文档](https://developers.cloudflare.com/r2/data-access/s3-api/) | Virtual Hosted Style / Path Style | ✅ |
|
||||
| Oracle Cloud | [文档](https://docs.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi.htm) | Virtual Hosted Style / Path Style | ✅ |
|
||||
| 又拍云 | [文档](https://help.upyun.com/knowledge-base/aws-s3%E5%85%BC%E5%AE%B9/) | Virtual Hosted Style / Path Style | ✅ |
|
||||
| 自建 MinIO | - | Path Style | ✅ |
|
||||
| 华为云 OBS | - | Virtual Hosted Style | ❓ |
|
||||
| Provider | Documentation | Compatible Access Style | Compatibility |
|
||||
|----------|---------------|------------------------|---------------|
|
||||
| Alibaba Cloud OSS | [Docs](https://help.aliyun.com/document_detail/410748.html) | Virtual Hosted Style | ✅ |
|
||||
| Tencent Cloud COS | [Docs](https://cloud.tencent.com/document/product/436/41284) | Virtual Hosted Style / Path Style | ✅ |
|
||||
| Qiniu Cloud | [Docs](https://developer.qiniu.com/kodo/4088/s3-access-domainname) | Virtual Hosted Style / Path Style | ✅ |
|
||||
| Baidu Cloud BOS | [Docs](https://cloud.baidu.com/doc/BOS/s/Fjwvyq9xo) | Virtual Hosted Style / Path Style | ✅ |
|
||||
| JD Cloud | [Docs](https://docs.jdcloud.com/cn/object-storage-service/api/regions-and-endpoints) | Virtual Hosted Style | ✅ |
|
||||
| Kingsoft Cloud | [Docs](https://docs.ksyun.com/documents/6761) | Virtual Hosted Style | ✅ |
|
||||
| QingCloud QingStor | [Docs](https://docsv3.qingcloud.com/storage/object-storage/s3/intro/) | Virtual Hosted Style / Path Style | ✅ |
|
||||
| NetEase Shufan | [Docs](https://sf.163.com/help/documents/89796157866430464) | Virtual Hosted Style | ✅ |
|
||||
| Cloudflare R2 | [Docs](https://developers.cloudflare.com/r2/data-access/s3-api/) | Virtual Hosted Style / Path Style | ✅ |
|
||||
| Oracle Cloud | [Docs](https://docs.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi.htm) | Virtual Hosted Style / Path Style | ✅ |
|
||||
| Upyun | [Docs](https://help.upyun.com/knowledge-base/aws-s3%E5%85%BC%E5%AE%B9/) | Virtual Hosted Style / Path Style | ✅ |
|
||||
| Self-hosted MinIO | - | Path Style | ✅ |
|
||||
| Huawei Cloud OBS | - | Virtual Hosted Style | ❓ |
|
||||
|
||||
::: tip 提示
|
||||
华为云官方文档未说明是否兼容 S3 API,但实际测试可以使用。
|
||||
::: tip Note
|
||||
Huawei Cloud official documentation does not specify S3 API compatibility, but it works in actual testing.
|
||||
:::
|
||||
|
||||
#### 配置示例
|
||||
#### Configuration Examples
|
||||
|
||||
**阿里云 OSS**
|
||||
**Alibaba Cloud OSS**
|
||||
|
||||
```
|
||||
名称: aliyun-oss
|
||||
类型: S3
|
||||
Access Key: 你的 AccessKey ID
|
||||
Secret Key: 你的 AccessKey Secret
|
||||
风格: Virtual Hosted
|
||||
区域: cn-hangzhou
|
||||
端点: oss-cn-hangzhou.aliyuncs.com
|
||||
协议: HTTPS
|
||||
存储桶: your-bucket-name
|
||||
路径: backup(可选)
|
||||
Name: aliyun-oss
|
||||
Type: S3
|
||||
Access Key: Your AccessKey ID
|
||||
Secret Key: Your AccessKey Secret
|
||||
Style: Virtual Hosted
|
||||
Region: cn-hangzhou
|
||||
Endpoint: oss-cn-hangzhou.aliyuncs.com
|
||||
Protocol: HTTPS
|
||||
Bucket: your-bucket-name
|
||||
Path: backup (optional)
|
||||
```
|
||||
|
||||
**腾讯云 COS**
|
||||
**Tencent Cloud COS**
|
||||
|
||||
```
|
||||
名称: tencent-cos
|
||||
类型: S3
|
||||
Access Key: 你的 SecretId
|
||||
Secret Key: 你的 SecretKey
|
||||
风格: Virtual Hosted
|
||||
区域: ap-guangzhou
|
||||
端点: cos.ap-guangzhou.myqcloud.com
|
||||
协议: HTTPS
|
||||
存储桶: your-bucket-name
|
||||
路径: backup(可选)
|
||||
Name: tencent-cos
|
||||
Type: S3
|
||||
Access Key: Your SecretId
|
||||
Secret Key: Your SecretKey
|
||||
Style: Virtual Hosted
|
||||
Region: ap-guangzhou
|
||||
Endpoint: cos.ap-guangzhou.myqcloud.com
|
||||
Protocol: HTTPS
|
||||
Bucket: your-bucket-name
|
||||
Path: backup (optional)
|
||||
```
|
||||
|
||||
**Cloudflare R2**
|
||||
|
||||
```
|
||||
名称: cloudflare-r2
|
||||
类型: S3
|
||||
Access Key: 你的 Access Key ID
|
||||
Secret Key: 你的 Secret Access Key
|
||||
风格: Path Style
|
||||
区域: auto
|
||||
端点: <account-id>.r2.cloudflarestorage.com
|
||||
协议: HTTPS
|
||||
存储桶: your-bucket-name
|
||||
路径: backup(可选)
|
||||
Name: cloudflare-r2
|
||||
Type: S3
|
||||
Access Key: Your Access Key ID
|
||||
Secret Key: Your Secret Access Key
|
||||
Style: Path Style
|
||||
Region: auto
|
||||
Endpoint: <account-id>.r2.cloudflarestorage.com
|
||||
Protocol: HTTPS
|
||||
Bucket: your-bucket-name
|
||||
Path: backup (optional)
|
||||
```
|
||||
|
||||
**自建 MinIO**
|
||||
**Self-hosted MinIO**
|
||||
|
||||
```
|
||||
名称: minio
|
||||
类型: S3
|
||||
Name: minio
|
||||
Type: S3
|
||||
Access Key: minioadmin
|
||||
Secret Key: minioadmin
|
||||
风格: Path Style
|
||||
区域: us-east-1
|
||||
端点: minio.example.com:9000
|
||||
协议: HTTP 或 HTTPS
|
||||
存储桶: backup
|
||||
路径:(可选)
|
||||
Style: Path Style
|
||||
Region: us-east-1
|
||||
Endpoint: minio.example.com:9000
|
||||
Protocol: HTTP or HTTPS
|
||||
Bucket: backup
|
||||
Path: (optional)
|
||||
```
|
||||
|
||||
::: warning 注意
|
||||
- 请确保存储桶已创建且有正确的访问权限
|
||||
- 建议为备份创建专用的访问密钥,并限制权限范围
|
||||
- 部分服务商的 Endpoint 需要包含区域信息
|
||||
::: warning Note
|
||||
- Please ensure the bucket has been created and has correct access permissions
|
||||
- It is recommended to create dedicated access keys for backups with limited permissions
|
||||
- Some providers' Endpoints need to include region information
|
||||
:::
|
||||
|
||||
## 定时备份
|
||||
## Scheduled Backup
|
||||
|
||||
结合 [计划任务](./task/schedule) 功能,可以设置定时自动备份:
|
||||
Combined with the [Scheduled Tasks](./task/schedule) feature, you can set up automatic scheduled backups:
|
||||
|
||||
1. 进入 **任务** > **计划任务**
|
||||
2. 创建新任务
|
||||
3. 选择备份类型
|
||||
4. 设置执行周期
|
||||
5. 选择存储位置
|
||||
1. Go to **Tasks** > **Scheduled Tasks**
|
||||
2. Create a new task
|
||||
3. Select backup type
|
||||
4. Set execution schedule
|
||||
5. Select storage location
|
||||
|
||||
## 备份策略建议
|
||||
## Backup Strategy Recommendations
|
||||
|
||||
### 备份频率
|
||||
### Backup Frequency
|
||||
|
||||
| 数据类型 | 建议频率 |
|
||||
|----------|----------|
|
||||
| 数据库 | 每天 |
|
||||
| 网站文件 | 每周 |
|
||||
| 配置文件 | 修改后立即备份 |
|
||||
| Data Type | Recommended Frequency |
|
||||
|-----------|----------------------|
|
||||
| Database | Daily |
|
||||
| Website Files | Weekly |
|
||||
| Configuration Files | Immediately after modification |
|
||||
|
||||
### 保留策略
|
||||
### Retention Policy
|
||||
|
||||
- 保留最近 7 天的每日备份
|
||||
- 保留最近 4 周的每周备份
|
||||
- 保留最近 3 个月的每月备份
|
||||
- Keep daily backups for the last 7 days
|
||||
- Keep weekly backups for the last 4 weeks
|
||||
- Keep monthly backups for the last 3 months
|
||||
|
||||
### 存储位置
|
||||
### Storage Location
|
||||
|
||||
- 至少保留一份本地备份
|
||||
- 重要数据应同时备份到远程存储
|
||||
- 定期验证备份文件的完整性
|
||||
- Keep at least one local backup
|
||||
- Important data should also be backed up to remote storage
|
||||
- Regularly verify the integrity of backup files
|
||||
|
||||
@@ -1,78 +1,78 @@
|
||||
# 证书
|
||||
# Certificate
|
||||
|
||||
证书模块用于管理 SSL/TLS 证书,支持通过 ACME 协议自动申请免费证书,也支持上传自有证书。
|
||||
The certificate module is used to manage SSL/TLS certificates, supporting automatic free certificate application through the ACME protocol, as well as uploading your own certificates.
|
||||
|
||||
## 功能概览
|
||||
## Feature Overview
|
||||
|
||||
证书模块分为三个部分:
|
||||
The certificate module is divided into three parts:
|
||||
|
||||
| 功能 | 说明 |
|
||||
|------|------|
|
||||
| [证书](./cert/cert) | 管理 SSL 证书 |
|
||||
| [账户](./cert/account) | 管理 ACME 账户 |
|
||||
| [DNS](./cert/dns) | 管理 DNS API 配置 |
|
||||
| Feature | Description |
|
||||
|---------|-------------|
|
||||
| [Certificate](./cert/cert) | Manage SSL certificates |
|
||||
| [Account](./cert/account) | Manage ACME accounts |
|
||||
| [DNS](./cert/dns) | Manage DNS API configuration |
|
||||
|
||||

|
||||

|
||||
|
||||
## 证书类型
|
||||
## Certificate Types
|
||||
|
||||
### 免费证书
|
||||
### Free Certificates
|
||||
|
||||
通过 ACME 协议从 Let's Encrypt 等 CA 自动申请免费证书:
|
||||
Automatically apply for free certificates from CAs like Let's Encrypt through the ACME protocol:
|
||||
|
||||
- **Let's Encrypt**:最流行的免费证书颁发机构
|
||||
- **LiteSSL**:TrustAsia 提供的免费证书服务
|
||||
- **Google**:谷歌的免费证书服务
|
||||
- **GoogleCN**:AcePanel 提供的谷歌证书服务镜像
|
||||
- **ZeroSSL**:另一个免费证书选项
|
||||
- **Buypass**:挪威的免费证书服务
|
||||
- **Let's Encrypt**: The most popular free certificate authority
|
||||
- **LiteSSL**: Free certificate service provided by TrustAsia
|
||||
- **Google**: Google's free certificate service
|
||||
- **GoogleCN**: Google certificate service mirror provided by AcePanel
|
||||
- **ZeroSSL**: Another free certificate option
|
||||
- **Buypass**: Norwegian free certificate service
|
||||
|
||||
免费证书有效期通常为 90 天,AcePanel 支持自动续签。
|
||||
Free certificates are typically valid for 90 days, and AcePanel supports automatic renewal.
|
||||
|
||||
### 付费证书
|
||||
### Paid Certificates
|
||||
|
||||
从商业 CA 购买的证书,通常有效期为 1 年或更长:
|
||||
Certificates purchased from commercial CAs, typically valid for 1 year or longer:
|
||||
|
||||
- 更长的有效期
|
||||
- 更高的信任度
|
||||
- 提供保险和技术支持
|
||||
- Longer validity period
|
||||
- Higher trust level
|
||||
- Provides insurance and technical support
|
||||
|
||||
如有证书购买需求,可通过本页顶部的「证书」链接联系我们。
|
||||
If you need to purchase certificates, you can contact us through the "Certificate" link at the top of this page.
|
||||
|
||||
## 验证方式
|
||||
## Verification Methods
|
||||
|
||||
申请证书时需要验证域名所有权,支持以下方式:
|
||||
When applying for a certificate, you need to verify domain ownership. The following methods are supported:
|
||||
|
||||
### HTTP 验证
|
||||
### HTTP Verification
|
||||
|
||||
在网站根目录放置验证文件,CA 通过 HTTP 访问验证。
|
||||
Place a verification file in the website root directory, and the CA verifies through HTTP access.
|
||||
|
||||
要求:
|
||||
- 域名已解析到服务器
|
||||
- 80 端口可访问
|
||||
Requirements:
|
||||
- Domain is resolved to the server
|
||||
- Port 80 is accessible
|
||||
|
||||
### DNS 验证
|
||||
### DNS Verification
|
||||
|
||||
在域名 DNS 中添加 TXT 记录验证。
|
||||
Add a TXT record in the domain DNS for verification.
|
||||
|
||||
要求:
|
||||
- 有域名 DNS 管理权限
|
||||
- 配置 DNS API(用于自动验证)
|
||||
Requirements:
|
||||
- Have DNS management permissions for the domain
|
||||
- Configure DNS API (for automatic verification)
|
||||
|
||||
DNS 验证的优势:
|
||||
- 支持申请泛域名证书(*.example.com)
|
||||
- 不需要 80 端口可访问
|
||||
- 适合内网服务器
|
||||
Advantages of DNS verification:
|
||||
- Supports applying for wildcard certificates (*.example.com)
|
||||
- Does not require port 80 to be accessible
|
||||
- Suitable for intranet servers
|
||||
|
||||
## 快速开始
|
||||
## Quick Start
|
||||
|
||||
1. 创建 ACME 账户(首次使用)
|
||||
2. 如需 DNS 验证,配置 DNS API
|
||||
3. 创建证书,选择验证方式
|
||||
4. 将证书应用到网站
|
||||
1. Create an ACME account (first time use)
|
||||
2. If DNS verification is needed, configure DNS API
|
||||
3. Create a certificate, select verification method
|
||||
4. Apply the certificate to the website
|
||||
|
||||
## 下一步
|
||||
## Next Steps
|
||||
|
||||
- [证书管理](./cert/cert) - 了解如何申请和管理证书
|
||||
- [账户管理](./cert/account) - 了解如何管理 ACME 账户
|
||||
- [DNS 配置](./cert/dns) - 了解如何配置 DNS API
|
||||
- [Certificate Management](./cert/cert) - Learn how to apply for and manage certificates
|
||||
- [Account Management](./cert/account) - Learn how to manage ACME accounts
|
||||
- [DNS Configuration](./cert/dns) - Learn how to configure DNS API
|
||||
|
||||
@@ -1,84 +1,84 @@
|
||||
# 账户管理
|
||||
# Account Management
|
||||
|
||||
账户管理页面用于管理 ACME 账户,ACME 账户用于向证书颁发机构申请证书。
|
||||
The account management page is used to manage ACME accounts. ACME accounts are used to apply for certificates from certificate authorities.
|
||||
|
||||
## 账户列表
|
||||
## Account List
|
||||
|
||||
进入 **证书** > **账户** 标签页查看账户列表。
|
||||
Go to **Certificate** > **Account** tab to view the account list.
|
||||
|
||||

|
||||

|
||||
|
||||
列表显示以下信息:
|
||||
The list displays the following information:
|
||||
|
||||
- **邮箱**:账户邮箱
|
||||
- **CA**:证书颁发机构
|
||||
- **密钥类型**:账户密钥类型
|
||||
- **操作**:修改、删除
|
||||
- **Email**: Account email
|
||||
- **CA**: Certificate Authority
|
||||
- **Key Type**: Account key type
|
||||
- **Actions**: Modify, delete
|
||||
|
||||
## 创建账户
|
||||
## Create Account
|
||||
|
||||
1. 点击 **创建账户** 按钮
|
||||
2. 填写配置:
|
||||
- **邮箱**:用于接收证书相关通知
|
||||
- **CA**:选择证书颁发机构
|
||||
- **密钥类型**:选择密钥算法
|
||||
- **KID**:可选,部分 CA 需要提供 KID
|
||||
- **HMAC**:可选,部分 CA 需要提供 HMAC 密钥
|
||||
3. 点击创建
|
||||
1. Click the **Create Account** button
|
||||
2. Fill in the configuration:
|
||||
- **Email**: Used to receive certificate-related notifications
|
||||
- **CA**: Select certificate authority
|
||||
- **Key Type**: Select key algorithm
|
||||
- **KID**: Optional, some CAs require KID
|
||||
- **HMAC**: Optional, some CAs require HMAC key
|
||||
3. Click Create
|
||||
|
||||
### 证书颁发机构(CA)
|
||||
### Certificate Authority (CA)
|
||||
|
||||
| CA | 说明 |
|
||||
|---------------|----------------------|
|
||||
| Let's Encrypt | 最流行的免费 CA,证书有效期 90 天 |
|
||||
| LiteSSL | TrustAsia 提供的免费证书服务 |
|
||||
| Google | 谷歌的免费证书服务 |
|
||||
| GoogleCN | AcePanel 提供的谷歌证书服务镜像 |
|
||||
| ZeroSSL | 免费 CA,证书有效期 90 天 |
|
||||
| Buypass | 挪威免费 CA,证书有效期 180 天 |
|
||||
| CA | Description |
|
||||
|---------------|-------------------------------|
|
||||
| Let's Encrypt | Most popular free CA, certificate valid for 90 days |
|
||||
| LiteSSL | Free certificate service provided by TrustAsia |
|
||||
| Google | Google's free certificate service |
|
||||
| GoogleCN | Google certificate service mirror provided by AcePanel |
|
||||
| ZeroSSL | Free CA, certificate valid for 90 days |
|
||||
| Buypass | Norwegian free CA, certificate valid for 180 days |
|
||||
|
||||
### 密钥类型
|
||||
### Key Type
|
||||
|
||||
| 类型 | 说明 |
|
||||
|------|------|
|
||||
| P256 (ECC) | 推荐,密钥更短,性能更好 |
|
||||
| P384 (ECC) | 更高安全性的 ECC 密钥 |
|
||||
| RSA 2048 | 传统 RSA 密钥,兼容性最好 |
|
||||
| RSA 4096 | 更高安全性的 RSA 密钥 |
|
||||
| Type | Description |
|
||||
|------|-------------|
|
||||
| P256 (ECC) | Recommended, shorter key, better performance |
|
||||
| P384 (ECC) | Higher security ECC key |
|
||||
| RSA 2048 | Traditional RSA key, best compatibility |
|
||||
| RSA 4096 | Higher security RSA key |
|
||||
|
||||
::: tip 推荐
|
||||
一般情况下推荐使用 P256 (ECC) 密钥,兼顾安全性和性能。
|
||||
::: tip Recommendation
|
||||
Generally recommended to use P256 (ECC) key, balancing security and performance.
|
||||
:::
|
||||
|
||||
## 修改账户
|
||||
## Modify Account
|
||||
|
||||
点击账户右侧的 **修改** 按钮可以修改账户邮箱。
|
||||
Click the **Modify** button on the right side of the account to modify the account email.
|
||||
|
||||
::: warning 注意
|
||||
修改邮箱后,证书相关通知将发送到新邮箱。
|
||||
::: warning Note
|
||||
After modifying the email, certificate-related notifications will be sent to the new email.
|
||||
:::
|
||||
|
||||
## 删除账户
|
||||
## Delete Account
|
||||
|
||||
点击账户右侧的 **删除** 按钮删除账户。
|
||||
Click the **Delete** button on the right side of the account to delete the account.
|
||||
|
||||
::: warning 注意
|
||||
删除账户后,使用该账户申请的证书将无法续签。请先将证书迁移到其他账户或删除相关证书。
|
||||
::: warning Note
|
||||
After deleting an account, certificates applied with that account cannot be renewed. Please migrate certificates to another account or delete related certificates first.
|
||||
:::
|
||||
|
||||
## 账户用途
|
||||
## Account Usage
|
||||
|
||||
ACME 账户用于:
|
||||
ACME accounts are used for:
|
||||
|
||||
1. 向 CA 证明你的身份
|
||||
2. 接收证书到期提醒
|
||||
3. 管理已申请的证书
|
||||
4. 撤销证书
|
||||
1. Proving your identity to the CA
|
||||
2. Receiving certificate expiration reminders
|
||||
3. Managing applied certificates
|
||||
4. Revoking certificates
|
||||
|
||||
## 多账户
|
||||
## Multiple Accounts
|
||||
|
||||
你可以创建多个账户:
|
||||
You can create multiple accounts:
|
||||
|
||||
- 不同 CA 需要不同账户
|
||||
- 可以为不同项目使用不同账户
|
||||
- 便于管理和区分证书
|
||||
- Different CAs require different accounts
|
||||
- Can use different accounts for different projects
|
||||
- Convenient for managing and distinguishing certificates
|
||||
|
||||
@@ -1,101 +1,101 @@
|
||||
# 证书管理
|
||||
# Certificate Management
|
||||
|
||||
证书管理页面用于申请、上传和管理 SSL/TLS 证书。
|
||||
The certificate management page is used to apply for, upload, and manage SSL/TLS certificates.
|
||||
|
||||
## 证书列表
|
||||
## Certificate List
|
||||
|
||||
进入 **证书** 页面,默认显示证书列表。
|
||||
Go to the **Certificate** page, which displays the certificate list by default.
|
||||
|
||||

|
||||

|
||||
|
||||
列表显示以下信息:
|
||||
The list displays the following information:
|
||||
|
||||
- **域名**:证书包含的域名
|
||||
- **类型**:证书类型(ACME/上传)
|
||||
- **关联账户**:使用的 ACME 账户
|
||||
- **颁发者**:证书颁发机构
|
||||
- **过期时间**:证书到期时间
|
||||
- **下次续签时间**:自动续签时间
|
||||
- **自动续签**:是否启用自动续签
|
||||
- **操作**:续签、下载、删除等
|
||||
- **Domain**: Domains included in the certificate
|
||||
- **Type**: Certificate type (ACME/Upload)
|
||||
- **Associated Account**: ACME account used
|
||||
- **Issuer**: Certificate authority
|
||||
- **Expiration Time**: Certificate expiration time
|
||||
- **Next Renewal Time**: Automatic renewal time
|
||||
- **Auto Renewal**: Whether auto renewal is enabled
|
||||
- **Actions**: Renew, download, delete, etc.
|
||||
|
||||
## 创建证书
|
||||
## Create Certificate
|
||||
|
||||
点击 **创建证书** 按钮申请新证书。
|
||||
Click the **Create Certificate** button to apply for a new certificate.
|
||||
|
||||
### 配置项
|
||||
### Configuration Items
|
||||
|
||||
- **域名**:要申请证书的域名,支持多个域名
|
||||
- **密钥类型**:RSA 或 ECC
|
||||
- **网站**:该证书关联的网站
|
||||
- **账户**:该证书关联的 ACME 账户
|
||||
- **DNS**:该证书关联的 DNS API
|
||||
- **Domain**: Domains to apply certificate for, supports multiple domains
|
||||
- **Key Type**: RSA or ECC
|
||||
- **Website**: Website associated with this certificate
|
||||
- **Account**: ACME account associated with this certificate
|
||||
- **DNS**: DNS API associated with this certificate
|
||||
|
||||
### 域名格式
|
||||
### Domain Format
|
||||
|
||||
```
|
||||
example.com # 单个域名
|
||||
www.example.com # 子域名
|
||||
*.example.com # 泛域名(需要 DNS 验证)
|
||||
example.com # Single domain
|
||||
www.example.com # Subdomain
|
||||
*.example.com # Wildcard domain (requires DNS verification)
|
||||
```
|
||||
|
||||
::: tip 提示
|
||||
泛域名证书(*.example.com)只能通过 DNS 验证方式申请。
|
||||
::: tip Note
|
||||
Wildcard certificates (*.example.com) can only be applied through DNS verification.
|
||||
:::
|
||||
|
||||
## 上传证书
|
||||
## Upload Certificate
|
||||
|
||||
点击 **上传证书** 按钮上传已有证书。
|
||||
Click the **Upload Certificate** button to upload an existing certificate.
|
||||
|
||||
需要提供:
|
||||
- **证书文件**:PEM 格式的证书(.crt 或 .pem),请包含完整证书链
|
||||
- **私钥文件**:PEM 格式的私钥(.key)
|
||||
Required:
|
||||
- **Certificate File**: PEM format certificate (.crt or .pem), please include complete certificate chain
|
||||
- **Private Key File**: PEM format private key (.key)
|
||||
|
||||
## 应用证书
|
||||
## Apply Certificate
|
||||
|
||||
申请或上传证书后,需要在网站设置中启用 HTTPS 并选择证书。
|
||||
After applying or uploading a certificate, you need to enable HTTPS in the website settings and select the certificate.
|
||||
|
||||
1. 进入网站编辑页面
|
||||
2. 切换到 **HTTPS** 标签
|
||||
3. 启用 HTTPS
|
||||
4. 选择证书
|
||||
5. 保存配置
|
||||
1. Enter the website edit page
|
||||
2. Switch to the **HTTPS** tab
|
||||
3. Enable HTTPS
|
||||
4. Select certificate
|
||||
5. Save configuration
|
||||
|
||||
## 自动续签
|
||||
## Auto Renewal
|
||||
|
||||
ACME 证书支持自动续签:
|
||||
ACME certificates support auto renewal:
|
||||
|
||||
- 证书签发后通过 ARI 获取建议的续签时间
|
||||
- 系统会在续签时间前自动尝试续签
|
||||
- 续签成功后自动更新网站配置
|
||||
- 续签失败会发送通知
|
||||
- After certificate issuance, the recommended renewal time is obtained through ARI
|
||||
- The system will automatically attempt renewal before the renewal time
|
||||
- After successful renewal, website configuration is automatically updated
|
||||
- Notification is sent if renewal fails
|
||||
|
||||
## 证书操作
|
||||
## Certificate Operations
|
||||
|
||||
### 手动续签
|
||||
### Manual Renewal
|
||||
|
||||
点击 **续签** 按钮手动触发证书续签。
|
||||
Click the **Renew** button to manually trigger certificate renewal.
|
||||
|
||||
### 下载证书
|
||||
### Download Certificate
|
||||
|
||||
点击 **下载** 按钮下载证书文件,包含:
|
||||
- 完整证书链(.crt)
|
||||
- 私钥文件(.key)
|
||||
Click the **Download** button to download certificate files, including:
|
||||
- Complete certificate chain (.crt)
|
||||
- Private key file (.key)
|
||||
|
||||
### 删除证书
|
||||
### Delete Certificate
|
||||
|
||||
点击 **删除** 按钮删除证书。
|
||||
Click the **Delete** button to delete the certificate.
|
||||
|
||||
## 常见问题
|
||||
## FAQ
|
||||
|
||||
### 申请失败
|
||||
### Application Failed
|
||||
|
||||
- 检查域名是否正确解析到服务器
|
||||
- 检查 80 端口是否可访问(HTTP 验证)
|
||||
- 检查 DNS API 配置是否正确(DNS 验证)
|
||||
- Check if the domain is correctly resolved to the server
|
||||
- Check if port 80 is accessible (HTTP verification)
|
||||
- Check if DNS API configuration is correct (DNS verification)
|
||||
|
||||
### 续签失败
|
||||
### Renewal Failed
|
||||
|
||||
- 检查域名解析是否变更
|
||||
- 检查 DNS API 是否过期
|
||||
- 查看面板日志了解详细错误
|
||||
- Check if domain resolution has changed
|
||||
- Check if DNS API has expired
|
||||
- Check panel logs for detailed errors
|
||||
|
||||
@@ -1,99 +1,99 @@
|
||||
# DNS 配置
|
||||
# DNS Configuration
|
||||
|
||||
DNS 配置页面用于管理 DNS API,用于通过 DNS 验证方式申请证书。
|
||||
The DNS configuration page is used to manage DNS APIs for applying certificates through DNS verification.
|
||||
|
||||
## DNS 列表
|
||||
## DNS List
|
||||
|
||||
进入 **证书** > **DNS** 标签页查看 DNS 配置列表。
|
||||
Go to **Certificate** > **DNS** tab to view the DNS configuration list.
|
||||
|
||||

|
||||

|
||||
|
||||
列表显示以下信息:
|
||||
The list displays the following information:
|
||||
|
||||
- **备注名称**:配置名称
|
||||
- **类型**:DNS 提供商类型
|
||||
- **操作**:修改、删除
|
||||
- **Remark Name**: Configuration name
|
||||
- **Type**: DNS provider type
|
||||
- **Actions**: Modify, delete
|
||||
|
||||
## 创建 DNS 配置
|
||||
## Create DNS Configuration
|
||||
|
||||
1. 点击 **创建 DNS** 按钮
|
||||
2. 选择 DNS 提供商
|
||||
3. 填写 API 凭证
|
||||
4. 点击创建
|
||||
1. Click the **Create DNS** button
|
||||
2. Select DNS provider
|
||||
3. Fill in API credentials
|
||||
4. Click Create
|
||||
|
||||
## 支持的 DNS 提供商
|
||||
## Supported DNS Providers
|
||||
|
||||
### 国内提供商
|
||||
### Domestic Providers
|
||||
|
||||
| 提供商 | 所需凭证 |
|
||||
|--------|----------|
|
||||
| 阿里云 DNS | AccessKey ID、AccessKey Secret |
|
||||
| 腾讯云 DNSPod | SecretId、SecretKey |
|
||||
| 华为云 DNS | AccessKeyId、SecretAccessKey |
|
||||
| 西部数码 DNS | Username、API Password |
|
||||
| Provider | Required Credentials |
|
||||
|----------|---------------------|
|
||||
| Alibaba Cloud DNS | AccessKey ID, AccessKey Secret |
|
||||
| Tencent Cloud DNSPod | SecretId, SecretKey |
|
||||
| Huawei Cloud DNS | AccessKeyId, SecretAccessKey |
|
||||
| West.cn DNS | Username, API Password |
|
||||
|
||||
### 国际提供商
|
||||
### International Providers
|
||||
|
||||
| 提供商 | 所需凭证 |
|
||||
|--------|--------------------|
|
||||
| Provider | Required Credentials |
|
||||
|----------|------------------------------------|
|
||||
| Cloudflare | API Token |
|
||||
| Gcore DNS | API Key |
|
||||
| Porkbun | API Key、Secret Key |
|
||||
| Porkbun | API Key, Secret Key |
|
||||
| NameSilo | API Token |
|
||||
| ClouDNS | Auth ID、Auth Password |
|
||||
| ClouDNS | Auth ID, Auth Password |
|
||||
|
||||
## 获取 API 凭证
|
||||
## Obtaining API Credentials
|
||||
|
||||
### 阿里云
|
||||
### Alibaba Cloud
|
||||
|
||||
1. 登录阿里云控制台
|
||||
2. 进入 **AccessKey 管理**
|
||||
3. 创建 AccessKey
|
||||
4. 记录 AccessKey ID 和 AccessKey Secret
|
||||
1. Log in to Alibaba Cloud console
|
||||
2. Go to **AccessKey Management**
|
||||
3. Create AccessKey
|
||||
4. Record AccessKey ID and AccessKey Secret
|
||||
|
||||
::: warning 安全提示
|
||||
建议创建子账号并只授予 DNS 管理权限,避免使用主账号 AccessKey。
|
||||
::: warning Security Notice
|
||||
It is recommended to create a sub-account and only grant DNS management permissions. Avoid using the main account AccessKey.
|
||||
:::
|
||||
|
||||
### 腾讯云
|
||||
### Tencent Cloud
|
||||
|
||||
1. 登录腾讯云控制台
|
||||
2. 进入 **访问管理** > **API 密钥管理**
|
||||
3. 创建密钥
|
||||
4. 记录 SecretId 和 SecretKey
|
||||
1. Log in to Tencent Cloud console
|
||||
2. Go to **Access Management** > **API Key Management**
|
||||
3. Create key
|
||||
4. Record SecretId and SecretKey
|
||||
|
||||
### Cloudflare
|
||||
|
||||
1. 登录 Cloudflare 控制台
|
||||
2. 进入 **My Profile** > **API Tokens**
|
||||
3. 创建 Token,选择 **Edit zone DNS** 模板
|
||||
4. 记录生成的 Token
|
||||
1. Log in to Cloudflare console
|
||||
2. Go to **My Profile** > **API Tokens**
|
||||
3. Create Token, select **Edit zone DNS** template
|
||||
4. Record the generated Token
|
||||
|
||||
## DNS 验证原理
|
||||
## DNS Verification Principle
|
||||
|
||||
1. 申请证书时,CA 要求在域名 DNS 中添加特定的 TXT 记录
|
||||
2. AcePanel 通过 DNS API 自动添加验证记录
|
||||
3. CA 验证 TXT 记录存在
|
||||
4. 验证通过后颁发证书
|
||||
5. AcePanel 自动删除验证记录
|
||||
1. When applying for a certificate, the CA requires adding a specific TXT record in the domain DNS
|
||||
2. AcePanel automatically adds the verification record through DNS API
|
||||
3. CA verifies the TXT record exists
|
||||
4. Certificate is issued after verification passes
|
||||
5. AcePanel automatically deletes the verification record
|
||||
|
||||
## 使用场景
|
||||
## Use Cases
|
||||
|
||||
DNS 验证适用于:
|
||||
DNS verification is suitable for:
|
||||
|
||||
- 申请泛域名证书(*.example.com)
|
||||
- 服务器 80 端口不可访问
|
||||
- 内网服务器
|
||||
- CDN 后的源站
|
||||
- Applying for wildcard certificates (*.example.com)
|
||||
- Server port 80 is not accessible
|
||||
- Intranet servers
|
||||
- Origin servers behind CDN
|
||||
|
||||
## 常见问题
|
||||
## FAQ
|
||||
|
||||
### 验证失败
|
||||
### Verification Failed
|
||||
|
||||
- 检查 API 凭证是否正确
|
||||
- 检查 API 权限是否足够
|
||||
- 检查域名是否在该 DNS 提供商管理
|
||||
- Check if API credentials are correct
|
||||
- Check if API permissions are sufficient
|
||||
- Check if the domain is managed by that DNS provider
|
||||
|
||||
### DNS 传播延迟
|
||||
### DNS Propagation Delay
|
||||
|
||||
DNS 记录添加后需要一定时间传播,通常几分钟到几小时不等。如果验证失败,可以稍后重试。
|
||||
DNS records need some time to propagate after being added, usually ranging from a few minutes to a few hours. If verification fails, you can retry later.
|
||||
|
||||
@@ -1,56 +1,56 @@
|
||||
# 容器
|
||||
# Container
|
||||
|
||||
容器模块提供了完整的 Docker 容器管理功能,包括容器、编排、镜像、网络和卷的管理。
|
||||
The container module provides complete Docker container management functionality, including management of containers, compose, images, networks, and volumes.
|
||||
|
||||
## 前置要求
|
||||
## Prerequisites
|
||||
|
||||
使用容器功能前,需要先安装 Docker:
|
||||
Before using the container feature, you need to install Docker first:
|
||||
|
||||
1. 进入 **应用** > **原生应用**
|
||||
2. 找到 Docker,点击 **安装**
|
||||
1. Go to **Applications** > **Native Applications**
|
||||
2. Find Docker, click **Install**
|
||||
|
||||
## 功能概览
|
||||
## Feature Overview
|
||||
|
||||
容器模块分为五个部分:
|
||||
The container module is divided into five parts:
|
||||
|
||||
| 功能 | 说明 |
|
||||
|------|------|
|
||||
| [容器](./container/container) | 管理运行中的容器实例 |
|
||||
| [编排](./container/compose) | 使用 Docker Compose 管理多容器应用 |
|
||||
| [镜像](./container/image) | 管理本地镜像 |
|
||||
| [网络](./container/network) | 管理 Docker 网络 |
|
||||
| [卷](./container/volume) | 管理数据卷 |
|
||||
| Feature | Description |
|
||||
|---------|-------------|
|
||||
| [Container](./container/container) | Manage running container instances |
|
||||
| [Compose](./container/compose) | Manage multi-container applications using Docker Compose |
|
||||
| [Image](./container/image) | Manage local images |
|
||||
| [Network](./container/network) | Manage Docker networks |
|
||||
| [Volume](./container/volume) | Manage data volumes |
|
||||
|
||||

|
||||

|
||||
|
||||
## 快速开始
|
||||
## Quick Start
|
||||
|
||||
### 创建容器
|
||||
### Create Container
|
||||
|
||||
1. 进入 **容器** 页面
|
||||
2. 点击 **创建容器**
|
||||
3. 填写镜像名称(如 `nginx:latest`)
|
||||
4. 配置端口映射、卷挂载等
|
||||
5. 点击 **创建**
|
||||
1. Go to the **Container** page
|
||||
2. Click **Create Container**
|
||||
3. Enter the image name (e.g., `nginx:latest`)
|
||||
4. Configure port mapping, volume mounts, etc.
|
||||
5. Click **Create**
|
||||
|
||||
### 使用容器模板
|
||||
### Use Container Templates
|
||||
|
||||
如果你想快速部署常用应用,推荐使用 [容器模板](./app/template),无需手动配置即可一键部署。
|
||||
If you want to quickly deploy common applications, it is recommended to use [Container Templates](./app/template), which allows one-click deployment without manual configuration.
|
||||
|
||||
## 容器 vs 原生应用
|
||||
## Container vs Native Application
|
||||
|
||||
| 特性 | 容器 | 原生应用 |
|
||||
|------|------|----------|
|
||||
| 隔离性 | 完全隔离 | 共享系统环境 |
|
||||
| 性能 | 略有损耗 | 原生性能 |
|
||||
| 部署 | 标准化、可移植 | 依赖系统环境 |
|
||||
| 资源占用 | 较高 | 较低 |
|
||||
| 版本管理 | 方便切换 | 需要手动管理 |
|
||||
| Feature | Container | Native Application |
|
||||
|---------|-----------|-------------------|
|
||||
| Isolation | Fully isolated | Shared system environment |
|
||||
| Performance | Slight overhead | Native performance |
|
||||
| Deployment | Standardized, portable | Depends on system environment |
|
||||
| Resource Usage | Higher | Lower |
|
||||
| Version Management | Easy to switch | Requires manual management |
|
||||
|
||||
## 下一步
|
||||
## Next Steps
|
||||
|
||||
- [容器管理](./container/container) - 了解如何管理容器
|
||||
- [编排管理](./container/compose) - 了解如何使用 Docker Compose
|
||||
- [镜像管理](./container/image) - 了解如何管理镜像
|
||||
- [网络管理](./container/network) - 了解如何管理网络
|
||||
- [卷管理](./container/volume) - 了解如何管理数据卷
|
||||
- [Container Management](./container/container) - Learn how to manage containers
|
||||
- [Compose Management](./container/compose) - Learn how to use Docker Compose
|
||||
- [Image Management](./container/image) - Learn how to manage images
|
||||
- [Network Management](./container/network) - Learn how to manage networks
|
||||
- [Volume Management](./container/volume) - Learn how to manage data volumes
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
# 编排
|
||||
# Compose
|
||||
|
||||
编排功能基于 Docker Compose,用于定义和运行多容器应用。通过一个 YAML 文件描述应用的服务、网络和卷,然后一键启动整个应用。
|
||||
The compose feature is based on Docker Compose, used to define and run multi-container applications. Describe the application's services, networks, and volumes through a YAML file, then start the entire application with one click.
|
||||
|
||||
## 编排列表
|
||||
## Compose List
|
||||
|
||||
进入 **容器** > **编排** 标签页查看编排列表。
|
||||
Go to **Container** > **Compose** tab to view the compose list.
|
||||
|
||||

|
||||

|
||||
|
||||
列表显示以下信息:
|
||||
The list displays the following information:
|
||||
|
||||
- **名称**:编排项目名称
|
||||
- **目录**:docker-compose.yml 文件所在目录
|
||||
- **状态**:运行状态
|
||||
- **创建时间**:创建时间
|
||||
- **操作**:启动、停止、编辑等
|
||||
- **Name**: Compose project name
|
||||
- **Directory**: Directory where docker-compose.yml file is located
|
||||
- **Status**: Running status
|
||||
- **Created Time**: Creation time
|
||||
- **Actions**: Start, stop, edit, etc.
|
||||
|
||||
## 创建编排
|
||||
## Create Compose
|
||||
|
||||
1. 点击 **创建编排** 按钮
|
||||
2. 输入编排名称
|
||||
3. 编写或粘贴 docker-compose.yml 内容
|
||||
4. 配置环境变量(可选)
|
||||
5. 点击创建
|
||||
1. Click the **Create Compose** button
|
||||
2. Enter compose name
|
||||
3. Write or paste docker-compose.yml content
|
||||
4. Configure environment variables (optional)
|
||||
5. Click Create
|
||||
|
||||

|
||||

|
||||
|
||||
### docker-compose.yml 示例
|
||||
### docker-compose.yml Example
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
@@ -54,55 +54,55 @@ volumes:
|
||||
db_data:
|
||||
```
|
||||
|
||||
## 编排操作
|
||||
## Compose Operations
|
||||
|
||||
### 启动编排
|
||||
### Start Compose
|
||||
|
||||
点击 **启动** 按钮会弹出确认对话框:
|
||||
Click the **Start** button and a confirmation dialog will pop up:
|
||||
|
||||

|
||||

|
||||
|
||||
- **强制拉取镜像**:勾选后会在启动前拉取最新镜像
|
||||
- **Force Pull Images**: When checked, will pull the latest images before starting
|
||||
|
||||
点击确认后,会显示启动进度:
|
||||
After clicking confirm, the startup progress will be displayed:
|
||||
|
||||

|
||||

|
||||
|
||||
启动编排会创建并启动所有定义的服务容器。
|
||||
Starting compose will create and start all defined service containers.
|
||||
|
||||
### 停止编排
|
||||
### Stop Compose
|
||||
|
||||
停止编排会停止所有相关容器,但不会删除容器和数据。
|
||||
Stopping compose will stop all related containers, but will not delete containers and data.
|
||||
|
||||
### 删除编排
|
||||
### Delete Compose
|
||||
|
||||
删除编排会停止并删除所有相关容器。
|
||||
Deleting compose will stop and delete all related containers.
|
||||
|
||||
::: warning 注意
|
||||
删除编排不会删除数据卷,如需删除数据卷请在 **卷** 页面手动删除。
|
||||
::: warning Note
|
||||
Deleting compose will not delete data volumes. To delete data volumes, please manually delete them on the **Volume** page.
|
||||
:::
|
||||
|
||||
### 编辑编排
|
||||
### Edit Compose
|
||||
|
||||
点击编排列表中的 **编辑** 按钮,可以修改 docker-compose.yml 文件内容和环境变量。
|
||||
Click the **Edit** button in the compose list to modify the docker-compose.yml file content and environment variables.
|
||||
|
||||

|
||||

|
||||
|
||||
修改后需要重新启动编排才能生效。
|
||||
After modification, you need to restart the compose for changes to take effect.
|
||||
|
||||
## 使用场景
|
||||
## Use Cases
|
||||
|
||||
编排适合以下场景:
|
||||
Compose is suitable for the following scenarios:
|
||||
|
||||
- **多容器应用**:如 Web 应用 + 数据库 + 缓存
|
||||
- **开发环境**:快速搭建一致的开发环境
|
||||
- **微服务架构**:管理多个相互依赖的服务
|
||||
- **Multi-container Applications**: Such as Web application + database + cache
|
||||
- **Development Environment**: Quickly set up a consistent development environment
|
||||
- **Microservices Architecture**: Manage multiple interdependent services
|
||||
|
||||
## 与容器模板的区别
|
||||
## Difference from Container Templates
|
||||
|
||||
| 特性 | 编排 | 容器模板 |
|
||||
|------|------|----------|
|
||||
| 配置方式 | 手写 YAML | 图形界面 |
|
||||
| 灵活性 | 完全自定义 | 使用预设配置+自定义 |
|
||||
| 适用场景 | 自定义复杂应用 | 快速部署常用应用 |
|
||||
| 学习成本 | 需要了解 Compose 语法 | 无需学习 |
|
||||
| Feature | Compose | Container Templates |
|
||||
|---------|---------|-------------------------|
|
||||
| Configuration Method | Write YAML manually | Graphical interface |
|
||||
| Flexibility | Fully customizable | Use preset configuration + customization |
|
||||
| Use Cases | Custom complex applications | Quick deployment of common applications |
|
||||
| Learning Cost | Need to understand Compose syntax | No learning required |
|
||||
|
||||
@@ -1,93 +1,93 @@
|
||||
# 容器管理
|
||||
# Container Management
|
||||
|
||||
容器是 Docker 的核心概念,是镜像的运行实例。通过容器管理页面,你可以创建、启动、停止和管理容器。
|
||||
Containers are the core concept of Docker, being running instances of images. Through the container management page, you can create, start, stop, and manage containers.
|
||||
|
||||
## 容器列表
|
||||
## Container List
|
||||
|
||||
进入 **容器** 页面,默认显示容器列表。
|
||||
Go to the **Container** page, which displays the container list by default.
|
||||
|
||||

|
||||

|
||||
|
||||
列表显示以下信息:
|
||||
The list displays the following information:
|
||||
|
||||
- **容器名称**:容器的名称
|
||||
- **状态**:运行状态开关
|
||||
- **镜像**:容器使用的镜像
|
||||
- **端口**:端口映射(主机端口 -> 容器端口)
|
||||
- **运行状态**:详细的运行状态信息
|
||||
- **操作**:终端、日志、重命名等
|
||||
- **Container Name**: Name of the container
|
||||
- **Status**: Running status switch
|
||||
- **Image**: Image used by the container
|
||||
- **Ports**: Port mapping (host port -> container port)
|
||||
- **Running Status**: Detailed running status information
|
||||
- **Actions**: Terminal, logs, rename, etc.
|
||||
|
||||
## 创建容器
|
||||
## Create Container
|
||||
|
||||
点击 **创建容器** 按钮打开创建对话框。
|
||||
Click the **Create Container** button to open the creation dialog.
|
||||
|
||||

|
||||

|
||||
|
||||
### 基本设置
|
||||
### Basic Settings
|
||||
|
||||
- **容器名称**:可选,留空则自动生成
|
||||
- **镜像**:Docker 镜像名称,如 `nginx:latest`、`mysql:8.0`
|
||||
- **网络**:选择容器使用的网络
|
||||
- **重启策略**:容器退出后的重启行为
|
||||
- 无:不自动重启
|
||||
- always:总是重启
|
||||
- on-failure:失败时重启
|
||||
- unless-stopped:除非手动停止,否则重启
|
||||
- **Container Name**: Optional, auto-generated if left empty
|
||||
- **Image**: Docker image name, e.g., `nginx:latest`, `mysql:8.0`
|
||||
- **Network**: Select the network for the container to use
|
||||
- **Restart Policy**: Restart behavior after container exits
|
||||
- None: Do not auto restart
|
||||
- always: Always restart
|
||||
- on-failure: Restart on failure
|
||||
- unless-stopped: Restart unless manually stopped
|
||||
|
||||
### 高级选项
|
||||
### Advanced Options
|
||||
|
||||
- **TTY (-t)**:分配伪终端
|
||||
- **STDIN (-i)**:保持标准输入打开
|
||||
- **自动移除**:容器停止后自动删除
|
||||
- **特权模式**:赋予容器完整的系统权限(谨慎使用)
|
||||
- **TTY (-t)**: Allocate a pseudo-TTY
|
||||
- **STDIN (-i)**: Keep STDIN open
|
||||
- **Auto Remove**: Automatically delete container when stopped
|
||||
- **Privileged Mode**: Grant container full system privileges (use with caution)
|
||||
|
||||
### 端口映射
|
||||
### Port Mapping
|
||||
|
||||
将容器内部端口映射到主机端口,格式:`主机端口:容器端口`
|
||||
Map container internal ports to host ports, format: `host_port:container_port`
|
||||
|
||||

|
||||

|
||||
|
||||
例如:`8080:80` 表示将容器的 80 端口映射到主机的 8080 端口。
|
||||
For example: `8080:80` means mapping container port 80 to host port 8080.
|
||||
|
||||
### 卷挂载
|
||||
### Volume Mounts
|
||||
|
||||
将主机目录或数据卷挂载到容器内,格式:`主机路径:容器路径`
|
||||
Mount host directories or data volumes to the container, format: `host_path:container_path`
|
||||
|
||||
例如:`/opt/ace/data:/data` 表示将主机的 `/opt/ace/data` 目录挂载到容器的 `/data` 目录。
|
||||
For example: `/opt/ace/data:/data` means mounting the host's `/opt/ace/data` directory to the container's `/data` directory.
|
||||
|
||||
### 资源限制
|
||||
### Resource Limits
|
||||
|
||||
限制容器可使用的 CPU 和内存资源。
|
||||
Limit the CPU and memory resources the container can use.
|
||||
|
||||
### 环境变量
|
||||
### Environment Variables
|
||||
|
||||
设置容器的环境变量,格式:`KEY=VALUE`
|
||||
Set container environment variables, format: `KEY=VALUE`
|
||||
|
||||
## 容器操作
|
||||
## Container Operations
|
||||
|
||||
### 批量操作
|
||||
### Batch Operations
|
||||
|
||||
勾选多个容器后,可以进行批量操作:
|
||||
After selecting multiple containers, you can perform batch operations:
|
||||
|
||||
- **启动**:启动选中的容器
|
||||
- **停止**:停止选中的容器
|
||||
- **重启**:重启选中的容器
|
||||
- **强制停止**:强制停止选中的容器
|
||||
- **暂停**:暂停选中的容器
|
||||
- **恢复**:恢复暂停的容器
|
||||
- **删除**:删除选中的容器
|
||||
- **Start**: Start selected containers
|
||||
- **Stop**: Stop selected containers
|
||||
- **Restart**: Restart selected containers
|
||||
- **Force Stop**: Force stop selected containers
|
||||
- **Pause**: Pause selected containers
|
||||
- **Resume**: Resume paused containers
|
||||
- **Delete**: Delete selected containers
|
||||
|
||||
### 单个容器操作
|
||||
### Single Container Operations
|
||||
|
||||
- **终端**:打开容器的终端,可以在容器内执行命令
|
||||
- **日志**:查看容器的运行日志
|
||||
- **重命名**:修改容器名称
|
||||
- **更多**:查看详情、导出等操作
|
||||
- **Terminal**: Open the container's terminal to execute commands inside the container
|
||||
- **Logs**: View container runtime logs
|
||||
- **Rename**: Modify container name
|
||||
- **More**: View details, export, and other operations
|
||||
|
||||
## 清理容器
|
||||
## Clean Containers
|
||||
|
||||
点击 **清理容器** 可以删除所有已停止的容器,释放系统资源。
|
||||
Click **Clean Containers** to delete all stopped containers and free up system resources.
|
||||
|
||||
::: warning 注意
|
||||
清理操作不可恢复,请确保已停止的容器不再需要。
|
||||
::: warning Note
|
||||
The cleanup operation cannot be undone. Please ensure stopped containers are no longer needed.
|
||||
:::
|
||||
|
||||
@@ -1,76 +1,76 @@
|
||||
# 镜像
|
||||
# Image
|
||||
|
||||
镜像是容器的模板,包含了运行应用所需的所有文件和配置。通过镜像管理页面,你可以拉取、查看和删除本地镜像。
|
||||
Images are templates for containers, containing all files and configurations needed to run applications. Through the image management page, you can pull, view, and delete local images.
|
||||
|
||||
## 镜像列表
|
||||
## Image List
|
||||
|
||||
进入 **容器** > **镜像** 标签页查看本地镜像列表。
|
||||
Go to **Container** > **Image** tab to view the local image list.
|
||||
|
||||

|
||||

|
||||
|
||||
列表显示以下信息:
|
||||
The list displays the following information:
|
||||
|
||||
- **ID**:镜像 ID
|
||||
- **容器数量**:使用该镜像的容器数量
|
||||
- **镜像**:镜像名称和标签
|
||||
- **大小**:镜像占用的磁盘空间
|
||||
- **创建时间**:镜像创建时间
|
||||
- **操作**:删除等
|
||||
- **ID**: Image ID
|
||||
- **Container Count**: Number of containers using this image
|
||||
- **Image**: Image name and tag
|
||||
- **Size**: Disk space occupied by the image
|
||||
- **Created Time**: Image creation time
|
||||
- **Actions**: Delete, etc.
|
||||
|
||||
## 拉取镜像
|
||||
## Pull Image
|
||||
|
||||
1. 点击 **拉取镜像** 按钮
|
||||
2. 输入镜像名称,如 `nginx:latest`、`mysql:8.4`
|
||||
3. 点击确认开始拉取
|
||||
1. Click the **Pull Image** button
|
||||
2. Enter the image name, e.g., `nginx:latest`, `mysql:8.4`
|
||||
3. Click confirm to start pulling
|
||||
|
||||
镜像名称格式:`[仓库地址/]镜像名[:标签]`
|
||||
Image name format: `[registry_address/]image_name[:tag]`
|
||||
|
||||
- `nginx` - 拉取官方 nginx 镜像的 latest 标签
|
||||
- `nginx:1.28` - 拉取指定版本
|
||||
- `mysql:8.4` - 拉取 MySQL 8.4 版本
|
||||
- `registry.cn-hangzhou.aliyuncs.com/xxx/yyy:latest` - 从阿里云镜像仓库拉取
|
||||
- `nginx` - Pull the latest tag of the official nginx image
|
||||
- `nginx:1.28` - Pull a specific version
|
||||
- `mysql:8.4` - Pull MySQL version 8.4
|
||||
- `registry.cn-hangzhou.aliyuncs.com/xxx/yyy:latest` - Pull from Alibaba Cloud image registry
|
||||
|
||||
::: tip 提示
|
||||
国内服务器拉取 Docker Hub 镜像可能较慢,建议配置镜像加速器或使用国内镜像源。
|
||||
::: tip Note
|
||||
Pulling Docker Hub images from servers in China may be slow. It is recommended to configure an image accelerator or use domestic image sources.
|
||||
:::
|
||||
|
||||
## 删除镜像
|
||||
## Delete Image
|
||||
|
||||
选中镜像后点击 **删除** 按钮删除镜像。
|
||||
Select an image and click the **Delete** button to delete the image.
|
||||
|
||||
::: warning 注意
|
||||
如果镜像正在被容器使用,需要先删除相关容器才能删除镜像。
|
||||
::: warning Note
|
||||
If the image is being used by containers, you need to delete the related containers before deleting the image.
|
||||
:::
|
||||
|
||||
## 清理镜像
|
||||
## Clean Images
|
||||
|
||||
点击 **清理镜像** 可以删除所有未被使用的镜像,释放磁盘空间。
|
||||
Click **Clean Images** to delete all unused images and free up disk space.
|
||||
|
||||
清理操作会删除:
|
||||
The cleanup operation will delete:
|
||||
|
||||
- 悬空镜像(dangling images)
|
||||
- 未被任何容器使用的镜像
|
||||
- Dangling images
|
||||
- Images not used by any container
|
||||
|
||||
## 镜像来源
|
||||
## Image Sources
|
||||
|
||||
### Docker Hub
|
||||
|
||||
Docker 官方镜像仓库,包含大量官方和社区镜像。
|
||||
Docker's official image registry, containing a large number of official and community images.
|
||||
|
||||
常用官方镜像:
|
||||
- `nginx` - Web 服务器
|
||||
- `mysql` / `mariadb` - 数据库
|
||||
- `redis` - 缓存
|
||||
- `postgres` - PostgreSQL 数据库
|
||||
- `node` - Node.js 运行环境
|
||||
- `python` - Python 运行环境
|
||||
Common official images:
|
||||
- `nginx` - Web server
|
||||
- `mysql` / `mariadb` - Database
|
||||
- `redis` - Cache
|
||||
- `postgres` - PostgreSQL database
|
||||
- `node` - Node.js runtime environment
|
||||
- `python` - Python runtime environment
|
||||
|
||||
### 国内镜像源
|
||||
### Domestic Image Sources
|
||||
|
||||
- 阿里云:`registry.cn-hangzhou.aliyuncs.com`
|
||||
- 腾讯云:`ccr.ccs.tencentyun.com`
|
||||
- 华为云:`swr.cn-north-4.myhuaweicloud.com`
|
||||
- Alibaba Cloud: `registry.cn-hangzhou.aliyuncs.com`
|
||||
- Tencent Cloud: `ccr.ccs.tencentyun.com`
|
||||
- Huawei Cloud: `swr.cn-north-4.myhuaweicloud.com`
|
||||
|
||||
### 私有仓库
|
||||
### Private Registry
|
||||
|
||||
如果你有私有镜像仓库,可以直接使用完整的镜像地址拉取。
|
||||
If you have a private image registry, you can directly use the full image address to pull.
|
||||
|
||||
@@ -1,74 +1,74 @@
|
||||
# 网络
|
||||
# Network
|
||||
|
||||
Docker 网络用于容器之间的通信。通过网络管理页面,你可以创建、查看和删除网络。
|
||||
Docker networks are used for communication between containers. Through the network management page, you can create, view, and delete networks.
|
||||
|
||||
## 网络列表
|
||||
## Network List
|
||||
|
||||
进入 **容器** > **网络** 标签页查看网络列表。
|
||||
Go to **Container** > **Network** tab to view the network list.
|
||||
|
||||

|
||||

|
||||
|
||||
列表显示以下信息:
|
||||
The list displays the following information:
|
||||
|
||||
- **名称**:网络名称
|
||||
- **驱动**:网络驱动类型
|
||||
- **范围**:网络范围
|
||||
- **子网**:网络的子网地址
|
||||
- **网关**:网络的网关地址
|
||||
- **创建时间**:创建时间
|
||||
- **操作**:删除
|
||||
- **Name**: Network name
|
||||
- **Driver**: Network driver type
|
||||
- **Scope**: Network scope
|
||||
- **Subnet**: Network subnet address
|
||||
- **Gateway**: Network gateway address
|
||||
- **Created Time**: Creation time
|
||||
- **Actions**: Delete
|
||||
|
||||
## 默认网络
|
||||
## Default Networks
|
||||
|
||||
Docker 安装后会自动创建以下网络:
|
||||
Docker automatically creates the following networks after installation:
|
||||
|
||||
| 网络名称 | 驱动 | 说明 |
|
||||
|----------|------|------|
|
||||
| bridge | bridge | 默认网络,容器通过 NAT 访问外部网络 |
|
||||
| host | host | 容器直接使用主机网络,无网络隔离 |
|
||||
| none | null | 无网络,容器完全隔离 |
|
||||
| Network Name | Driver | Description |
|
||||
|--------------|--------|-------------|
|
||||
| bridge | bridge | Default network, containers access external network through NAT |
|
||||
| host | host | Container directly uses host network, no network isolation |
|
||||
| none | null | No network, container is completely isolated |
|
||||
|
||||
AcePanel 还会创建 `acepanel-network` 网络,用于面板编排模版部署的容器,请勿删除。
|
||||
AcePanel also creates the `acepanel-network` network for containers deployed by panel compose templates. Please do not delete it.
|
||||
|
||||
## 创建网络
|
||||
## Create Network
|
||||
|
||||
1. 点击 **创建网络** 按钮
|
||||
2. 输入网络名称
|
||||
3. 选择网络驱动
|
||||
4. 配置子网和网关(可选)
|
||||
5. 点击创建
|
||||
1. Click the **Create Network** button
|
||||
2. Enter network name
|
||||
3. Select network driver
|
||||
4. Configure subnet and gateway (optional)
|
||||
5. Click Create
|
||||
|
||||
### 网络驱动
|
||||
### Network Drivers
|
||||
|
||||
- **bridge**:桥接网络,最常用的网络类型。容器通过虚拟网桥连接,可以相互通信。
|
||||
- **host**:主机网络,容器直接使用主机的网络栈,性能最好但无隔离。
|
||||
- **overlay**:覆盖网络,用于跨主机的容器通信(Swarm 模式)。
|
||||
- **macvlan**:MAC VLAN 网络,为容器分配独立的 MAC 地址。
|
||||
- **bridge**: Bridge network, the most commonly used network type. Containers connect through a virtual bridge and can communicate with each other.
|
||||
- **host**: Host network, container directly uses the host's network stack, best performance but no isolation.
|
||||
- **overlay**: Overlay network, used for cross-host container communication (Swarm mode).
|
||||
- **macvlan**: MAC VLAN network, assigns independent MAC addresses to containers.
|
||||
|
||||
## 网络使用
|
||||
## Network Usage
|
||||
|
||||
### 创建容器时指定网络
|
||||
### Specify Network When Creating Container
|
||||
|
||||
创建容器时,在 **网络** 选项中选择要使用的网络。
|
||||
When creating a container, select the network to use in the **Network** option.
|
||||
|
||||
### 容器间通信
|
||||
### Communication Between Containers
|
||||
|
||||
同一网络中的容器可以通过容器名称相互访问。
|
||||
Containers in the same network can access each other by container name.
|
||||
|
||||
例如,在 `acepanel-network` 网络中:
|
||||
- 容器 A 名称为 `web`
|
||||
- 容器 B 名称为 `db`
|
||||
- 容器 A 可以通过 `db:3306` 访问容器 B 的数据库
|
||||
For example, in the `acepanel-network` network:
|
||||
- Container A is named `web`
|
||||
- Container B is named `db`
|
||||
- Container A can access Container B's database through `db:3306`
|
||||
|
||||
## 删除网络
|
||||
## Delete Network
|
||||
|
||||
选中网络后点击 **删除** 按钮删除网络。
|
||||
Select a network and click the **Delete** button to delete the network.
|
||||
|
||||
::: warning 注意
|
||||
- 默认网络(bridge、host、none)和 `acepanel-network` 不能删除
|
||||
- 如果网络中有容器,需要先删除或断开容器才能删除网络
|
||||
::: warning Note
|
||||
- Default networks (bridge, host, none) and `acepanel-network` cannot be deleted
|
||||
- If there are containers in the network, you need to delete or disconnect the containers before deleting the network
|
||||
:::
|
||||
|
||||
## 清理网络
|
||||
## Clean Networks
|
||||
|
||||
点击 **清理网络** 可以删除所有未被使用的自定义网络。
|
||||
Click **Clean Networks** to delete all unused custom networks.
|
||||
|
||||
@@ -1,76 +1,76 @@
|
||||
# 卷
|
||||
# Volume
|
||||
|
||||
卷(Volume)是 Docker 管理的数据存储,用于持久化容器数据。与直接挂载主机目录相比,卷由 Docker 管理,更加安全和便携。
|
||||
Volumes are Docker-managed data storage used to persist container data. Compared to directly mounting host directories, volumes are managed by Docker, making them more secure and portable.
|
||||
|
||||
## 卷列表
|
||||
## Volume List
|
||||
|
||||
进入 **容器** > **卷** 标签页查看卷列表。
|
||||
Go to **Container** > **Volume** tab to view the volume list.
|
||||
|
||||

|
||||

|
||||
|
||||
列表显示以下信息:
|
||||
The list displays the following information:
|
||||
|
||||
- **名称**:卷名称
|
||||
- **驱动**:存储驱动
|
||||
- **范围**:卷的范围
|
||||
- **挂载点**:卷在主机上的实际存储路径
|
||||
- **创建时间**:创建时间
|
||||
- **操作**:删除
|
||||
- **Name**: Volume name
|
||||
- **Driver**: Storage driver
|
||||
- **Scope**: Volume scope
|
||||
- **Mount Point**: Actual storage path of the volume on the host
|
||||
- **Created Time**: Creation time
|
||||
- **Actions**: Delete
|
||||
|
||||
## 创建卷
|
||||
## Create Volume
|
||||
|
||||
1. 点击 **创建卷** 按钮
|
||||
2. 输入卷名称
|
||||
3. 选择驱动(默认 local)
|
||||
4. 点击创建
|
||||
1. Click the **Create Volume** button
|
||||
2. Enter volume name
|
||||
3. Select driver (default local)
|
||||
4. Click Create
|
||||
|
||||
## 使用卷
|
||||
## Using Volumes
|
||||
|
||||
### 创建容器时挂载卷
|
||||
### Mount Volume When Creating Container
|
||||
|
||||
创建容器时,在 **卷** 选项中添加卷挂载:
|
||||
When creating a container, add volume mounts in the **Volume** option:
|
||||
|
||||
- **卷名称:容器路径** - 使用命名卷
|
||||
- **主机路径:容器路径** - 直接挂载主机目录
|
||||
- **volume_name:container_path** - Use named volume
|
||||
- **host_path:container_path** - Directly mount host directory
|
||||
|
||||
例如:
|
||||
- `mysql_data:/var/lib/mysql` - 将 mysql_data 卷挂载到容器的 /var/lib/mysql
|
||||
- `/opt/ace/data:/data` - 将主机的 /opt/ace/data 目录挂载到容器的 /data
|
||||
For example:
|
||||
- `mysql_data:/var/lib/mysql` - Mount mysql_data volume to container's /var/lib/mysql
|
||||
- `/opt/ace/data:/data` - Mount host's /opt/ace/data directory to container's /data
|
||||
|
||||
### 卷 vs 绑定挂载
|
||||
### Volume vs Bind Mount
|
||||
|
||||
| 特性 | 卷(Volume) | 绑定挂载(Bind Mount) |
|
||||
|------|-------------|----------------------|
|
||||
| 管理方式 | Docker 管理 | 用户管理 |
|
||||
| 存储位置 | Docker 数据目录 | 任意主机路径 |
|
||||
| 备份 | 需要通过 Docker 命令 | 直接备份目录 |
|
||||
| 可移植性 | 高 | 依赖主机路径 |
|
||||
| 适用场景 | 数据库等需要持久化的数据 | 配置文件、代码目录 |
|
||||
| Feature | Volume | Bind Mount |
|
||||
|---------|--------|------------|
|
||||
| Management | Docker managed | User managed |
|
||||
| Storage Location | Docker data directory | Any host path |
|
||||
| Backup | Requires Docker commands | Directly backup directory |
|
||||
| Portability | High | Depends on host path |
|
||||
| Use Cases | Data that needs persistence like databases | Configuration files, code directories |
|
||||
|
||||
## 删除卷
|
||||
## Delete Volume
|
||||
|
||||
选中卷后点击 **删除** 按钮删除卷。
|
||||
Select a volume and click the **Delete** button to delete the volume.
|
||||
|
||||
::: danger 警告
|
||||
删除卷会永久删除卷中的所有数据,此操作不可恢复!
|
||||
::: danger Warning
|
||||
Deleting a volume will permanently delete all data in the volume. This operation cannot be undone!
|
||||
:::
|
||||
|
||||
::: warning 注意
|
||||
如果卷正在被容器使用,需要先删除相关容器才能删除卷。
|
||||
::: warning Note
|
||||
If the volume is being used by containers, you need to delete the related containers before deleting the volume.
|
||||
:::
|
||||
|
||||
## 清理卷
|
||||
## Clean Volumes
|
||||
|
||||
点击 **清理卷** 可以删除所有未被使用的卷,释放磁盘空间。
|
||||
Click **Clean Volumes** to delete all unused volumes and free up disk space.
|
||||
|
||||
::: tip 提示
|
||||
清理前请确认未使用的卷中没有重要数据。
|
||||
::: tip Note
|
||||
Please confirm that unused volumes do not contain important data before cleaning.
|
||||
:::
|
||||
|
||||
## 数据备份
|
||||
## Data Backup
|
||||
|
||||
卷数据存储在 Docker 数据目录中(通常是 `/var/lib/docker/volumes/`),可以通过以下方式备份:
|
||||
Volume data is stored in the Docker data directory (usually `/var/lib/docker/volumes/`). You can backup through the following methods:
|
||||
|
||||
1. 使用 `docker run` 创建临时容器挂载卷并导出数据
|
||||
2. 直接备份 Docker 数据目录(需要停止 Docker 服务)
|
||||
3. (开发中)使用 AcePanel 的 [备份功能](../backup) 进行备份
|
||||
1. Use `docker run` to create a temporary container that mounts the volume and exports data
|
||||
2. Directly backup the Docker data directory (requires stopping Docker service)
|
||||
3. (In development) Use AcePanel's [Backup Feature](../backup) for backup
|
||||
|
||||
@@ -1,77 +1,77 @@
|
||||
# 数据库
|
||||
# Database
|
||||
|
||||
数据库模块用于管理 MySQL、MariaDB、PostgreSQL 等数据库。支持创建数据库、管理用户和配置数据库服务器。
|
||||
The database module is used to manage MySQL, MariaDB, PostgreSQL, and other databases. It supports creating databases, managing users, and configuring database servers.
|
||||
|
||||
## 前置要求
|
||||
## Prerequisites
|
||||
|
||||
使用数据库功能前,需要先安装数据库软件:
|
||||
Before using the database feature, you need to install database software first:
|
||||
|
||||
1. 进入 **应用** > **原生应用**
|
||||
2. 安装 Percona、MySQL、MariaDB 或 PostgreSQL
|
||||
1. Go to **Applications** > **Native Applications**
|
||||
2. Install Percona, MySQL, MariaDB, or PostgreSQL
|
||||
|
||||
## 功能概览
|
||||
## Feature Overview
|
||||
|
||||
数据库模块分为三个部分:
|
||||
The database module is divided into three parts:
|
||||
|
||||
| 功能 | 说明 |
|
||||
|------|------|
|
||||
| [数据库](./database/database) | 创建和管理数据库 |
|
||||
| [用户](./database/user) | 管理数据库用户和权限 |
|
||||
| [服务器](./database/server) | 管理数据库服务器连接 |
|
||||
| Feature | Description |
|
||||
|---------|-------------|
|
||||
| [Database](./database/database) | Create and manage databases |
|
||||
| [User](./database/user) | Manage database users and permissions |
|
||||
| [Server](./database/server) | Manage database server connections |
|
||||
|
||||

|
||||

|
||||
|
||||
## 支持的数据库
|
||||
## Supported Databases
|
||||
|
||||
| 数据库 | 说明 |
|
||||
|--------|------|
|
||||
| Percona | MySQL 的高性能分支,适合高负载场景 |
|
||||
| MySQL | 世界上最流行的开源关系型数据库 |
|
||||
| MariaDB | MySQL 的开源分支,完全兼容 MySQL |
|
||||
| PostgreSQL | 功能强大的开源对象关系型数据库 |
|
||||
| Database | Description |
|
||||
|----------|-------------|
|
||||
| Percona | High-performance fork of MySQL, suitable for high-load scenarios |
|
||||
| MySQL | The world's most popular open-source relational database |
|
||||
| MariaDB | Open-source fork of MySQL, fully compatible with MySQL |
|
||||
| PostgreSQL | Powerful open-source object-relational database |
|
||||
|
||||
## 快速开始
|
||||
## Quick Start
|
||||
|
||||
### 创建数据库
|
||||
### Create Database
|
||||
|
||||
1. 进入 **数据库** 页面
|
||||
2. 点击 **创建数据库**
|
||||
3. 选择数据库类型和服务器
|
||||
4. 输入数据库名称
|
||||
5. 选择是否创建用户并设置权限
|
||||
6. 点击创建
|
||||
1. Go to the **Database** page
|
||||
2. Click **Create Database**
|
||||
3. Select database type and server
|
||||
4. Enter database name
|
||||
5. Choose whether to create a user and set permissions
|
||||
6. Click Create
|
||||
|
||||
### 创建用户
|
||||
### Create User
|
||||
|
||||
1. 切换到 **用户** 标签
|
||||
2. 点击 **创建用户**
|
||||
3. 输入用户名和密码
|
||||
4. 设置访问权限
|
||||
5. 点击创建
|
||||
1. Switch to the **User** tab
|
||||
2. Click **Create User**
|
||||
3. Enter username and password
|
||||
4. Set access permissions
|
||||
5. Click Create
|
||||
|
||||
## 连接数据库
|
||||
## Connect to Database
|
||||
|
||||
### 本地连接
|
||||
### Local Connection
|
||||
|
||||
```
|
||||
主机:127.0.0.1 或 localhost
|
||||
端口:Percona/MySQL/MariaDB 3306,PostgreSQL 5432
|
||||
Socket:Percona/MySQL/MariaDB /tmp/mysql.sock,PostgreSQL /tmp/.s.PGSQL.5432
|
||||
Host: 127.0.0.1 or localhost
|
||||
Port: Percona/MySQL/MariaDB 3306, PostgreSQL 5432
|
||||
Socket: Percona/MySQL/MariaDB /tmp/mysql.sock, PostgreSQL /tmp/.s.PGSQL.5432
|
||||
```
|
||||
|
||||
### 远程连接
|
||||
### Remote Connection
|
||||
|
||||
如需远程连接数据库:
|
||||
To connect to the database remotely:
|
||||
|
||||
1. 在防火墙中开放数据库端口
|
||||
2. 创建允许远程访问的用户(主机设为 `%`)
|
||||
1. Open the database port in the firewall
|
||||
2. Create a user that allows remote access (set host to `%`)
|
||||
|
||||
::: warning 安全提示
|
||||
不建议将数据库端口暴露到公网,如需远程管理建议使用 SSH 隧道或 VPN。
|
||||
::: warning Security Notice
|
||||
It is not recommended to expose database ports to the public network. For remote management, it is recommended to use SSH tunnels or VPN.
|
||||
:::
|
||||
|
||||
## 下一步
|
||||
## Next Steps
|
||||
|
||||
- [数据库管理](./database/database) - 了解如何创建和管理数据库
|
||||
- [用户管理](./database/user) - 了解如何管理数据库用户
|
||||
- [服务器管理](./database/server) - 了解如何管理数据库服务器
|
||||
- [Database Management](./database/database) - Learn how to create and manage databases
|
||||
- [User Management](./database/user) - Learn how to manage database users
|
||||
- [Server Management](./database/server) - Learn how to manage database servers
|
||||
|
||||
@@ -1,58 +1,58 @@
|
||||
# 数据库管理
|
||||
# Database Management
|
||||
|
||||
数据库管理页面用于创建、查看和删除数据库,AcePanel 已全面默认使用 UTF-8 编码创建数据库。
|
||||
The database management page is used to create, view, and delete databases. AcePanel now uses UTF-8 encoding by default when creating databases.
|
||||
|
||||
## 数据库列表
|
||||
## Database List
|
||||
|
||||
进入 **数据库** 页面,默认显示数据库列表。
|
||||
Go to the **Database** page, which displays the database list by default.
|
||||
|
||||

|
||||

|
||||
|
||||
列表显示以下信息:
|
||||
The list displays the following information:
|
||||
|
||||
- **类型**:数据库类型(MySQL/PostgreSQL)
|
||||
- **数据库名称**:数据库名称
|
||||
- **服务器**:所属的数据库服务器
|
||||
- **编码**:字符编码
|
||||
- **注释**:备注信息(PostgreSQL 支持)
|
||||
- **操作**:删除
|
||||
- **Type**: Database type (MySQL/PostgreSQL)
|
||||
- **Database Name**: Database name
|
||||
- **Server**: The database server it belongs to
|
||||
- **Encoding**: Character encoding
|
||||
- **Comment**: Remarks (PostgreSQL supported)
|
||||
- **Actions**: Delete
|
||||
|
||||
## 创建数据库
|
||||
## Create Database
|
||||
|
||||
1. 点击 **创建数据库** 按钮
|
||||
2. 填写配置:
|
||||
- **服务器**:选择数据库服务器
|
||||
- **数据库名称**:只能使用字母、数字和下划线
|
||||
3. 选择是否创建用户并设置权限(可选)
|
||||
4. 点击创建
|
||||
1. Click the **Create Database** button
|
||||
2. Fill in the configuration:
|
||||
- **Server**: Select database server
|
||||
- **Database Name**: Can only use letters, numbers, and underscores
|
||||
3. Choose whether to create a user and set permissions (optional)
|
||||
4. Click Create
|
||||
|
||||
## 删除数据库
|
||||
## Delete Database
|
||||
|
||||
点击数据库右侧的 **删除** 按钮删除数据库。
|
||||
Click the **Delete** button on the right side of the database to delete it.
|
||||
|
||||
::: danger 警告
|
||||
删除数据库会永久删除该数据库中的所有数据,此操作不可恢复!请务必提前备份重要数据。
|
||||
::: danger Warning
|
||||
Deleting a database will permanently delete all data in that database. This operation cannot be undone! Please make sure to backup important data in advance.
|
||||
:::
|
||||
|
||||
## 数据库命名规范
|
||||
## Database Naming Conventions
|
||||
|
||||
- 只能使用字母、数字和下划线
|
||||
- 不能以数字开头
|
||||
- 避免使用数据库保留字
|
||||
- 建议使用有意义的名称,如 `wordpress`、`myapp_production`
|
||||
- Can only use letters, numbers, and underscores
|
||||
- Cannot start with a number
|
||||
- Avoid using database reserved words
|
||||
- Recommend using meaningful names, such as `wordpress`, `myapp_production`
|
||||
|
||||
## 常见问题
|
||||
## FAQ
|
||||
|
||||
### 创建数据库失败
|
||||
### Failed to Create Database
|
||||
|
||||
- 检查数据库名称是否符合命名规范
|
||||
- 检查是否已存在同名数据库
|
||||
- 检查数据库服务是否正常运行
|
||||
- Check if the database name follows naming conventions
|
||||
- Check if a database with the same name already exists
|
||||
- Check if the database service is running normally
|
||||
|
||||
### 数据库编码问题
|
||||
### Database Encoding Issues
|
||||
|
||||
如果出现乱码,检查:
|
||||
If garbled characters appear, check:
|
||||
|
||||
1. 数据库编码是否正确
|
||||
2. 连接时是否指定了正确的编码
|
||||
3. 应用程序的编码设置
|
||||
1. Whether the database encoding is correct
|
||||
2. Whether the correct encoding is specified when connecting
|
||||
3. The encoding settings of the application
|
||||
|
||||
@@ -1,86 +1,86 @@
|
||||
# 服务器管理
|
||||
# Server Management
|
||||
|
||||
服务器管理页面用于管理数据库服务器连接,支持本地和远程数据库服务器。
|
||||
The server management page is used to manage database server connections, supporting both local and remote database servers.
|
||||
|
||||
## 服务器列表
|
||||
## Server List
|
||||
|
||||
进入 **数据库** > **服务器** 标签页查看服务器列表。
|
||||
Go to **Database** > **Server** tab to view the server list.
|
||||
|
||||

|
||||

|
||||
|
||||
列表显示以下信息:
|
||||
The list displays the following information:
|
||||
|
||||
- **类型**:数据库类型(MySQL/PostgreSQL)
|
||||
- **名称**:服务器名称
|
||||
- **用户名**:管理员用户名
|
||||
- **密码**:管理员密码
|
||||
- **主机**:服务器地址和端口
|
||||
- **注释**:备注信息
|
||||
- **状态**:连接状态
|
||||
- **更新日期**:最后更新时间
|
||||
- **操作**:终端、同步、修改、删除
|
||||
- **Type**: Database type (MySQL/PostgreSQL)
|
||||
- **Name**: Server name
|
||||
- **Username**: Administrator username
|
||||
- **Password**: Administrator password
|
||||
- **Host**: Server address and port
|
||||
- **Comment**: Remarks
|
||||
- **Status**: Connection status
|
||||
- **Update Date**: Last update time
|
||||
- **Actions**: Terminal, sync, modify, delete
|
||||
|
||||
## 本地服务器
|
||||
## Local Server
|
||||
|
||||
安装数据库软件后,AcePanel 会自动添加本地服务器,此类服务器不支持自行删除:
|
||||
After installing database software, AcePanel will automatically add local servers. These servers cannot be deleted by users:
|
||||
|
||||
- **local_mysql**:本地 Percona/MySQL/MariaDB 服务器
|
||||
- **local_postgresql**:本地 PostgreSQL 服务器
|
||||
- **local_mysql**: Local Percona/MySQL/MariaDB server
|
||||
- **local_postgresql**: Local PostgreSQL server
|
||||
|
||||
## 添加远程服务器
|
||||
## Add Remote Server
|
||||
|
||||
1. 点击 **添加服务器** 按钮
|
||||
2. 填写配置:
|
||||
- **类型**:选择数据库类型
|
||||
- **名称**:服务器名称(用于标识)
|
||||
- **主机**:服务器地址
|
||||
- **端口**:数据库端口
|
||||
- **用户名**:管理员用户名
|
||||
- **密码**:管理员密码
|
||||
3. 点击添加
|
||||
1. Click the **Add Server** button
|
||||
2. Fill in the configuration:
|
||||
- **Type**: Select database type
|
||||
- **Name**: Server name (for identification)
|
||||
- **Host**: Server address
|
||||
- **Port**: Database port
|
||||
- **Username**: Administrator username
|
||||
- **Password**: Administrator password
|
||||
3. Click Add
|
||||
|
||||
### 远程服务器使用场景
|
||||
### Remote Server Use Cases
|
||||
|
||||
- 连接云数据库(如阿里云 RDS、腾讯云 CDB)
|
||||
- 连接容器中的数据库服务
|
||||
- 连接其他服务器上的数据库
|
||||
- 数据库读写分离架构
|
||||
- Connect to cloud databases (such as Alibaba Cloud RDS, Tencent Cloud CDB)
|
||||
- Connect to database services in containers
|
||||
- Connect to databases on other servers
|
||||
- Database read-write separation architecture
|
||||
|
||||
## 服务器操作
|
||||
## Server Operations
|
||||
|
||||
### 终端
|
||||
### Terminal
|
||||
|
||||
点击 **终端** 按钮打开数据库命令行终端,可以直接执行 SQL 语句。
|
||||
Click the **Terminal** button to open the database command line terminal, where you can directly execute SQL statements.
|
||||
|
||||
### 同步
|
||||
### Sync
|
||||
|
||||
点击 **同步** 按钮同步数据库和用户信息。当直接在数据库中创建了数据库或用户时,可以使用此功能同步到面板。
|
||||
Click the **Sync** button to synchronize database and user information. When databases or users are created directly in the database, you can use this function to sync to the panel.
|
||||
|
||||
### 修改
|
||||
### Modify
|
||||
|
||||
点击 **修改** 按钮可以修改服务器连接信息,如密码、主机地址等。
|
||||
Click the **Modify** button to modify server connection information, such as password, host address, etc.
|
||||
|
||||
### 删除
|
||||
### Delete
|
||||
|
||||
点击 **删除** 按钮删除服务器配置。
|
||||
Click the **Delete** button to delete the server configuration.
|
||||
|
||||
::: warning 注意
|
||||
删除服务器配置不会删除实际的数据库服务,只是从面板中移除该服务器的管理。
|
||||
::: warning Note
|
||||
Deleting the server configuration will not delete the actual database service, it only removes the server management from the panel.
|
||||
:::
|
||||
|
||||
## 连接测试
|
||||
## Connection Test
|
||||
|
||||
添加或修改服务器后,系统会自动测试连接。如果连接失败,请检查:
|
||||
After adding or modifying a server, the system will automatically test the connection. If the connection fails, please check:
|
||||
|
||||
1. 服务器地址和端口是否正确
|
||||
2. 用户名和密码是否正确
|
||||
3. 防火墙是否允许连接
|
||||
4. 数据库服务是否正常运行
|
||||
5. 数据库用户是否允许从当前主机连接
|
||||
1. Whether the server address and port are correct
|
||||
2. Whether the username and password are correct
|
||||
3. Whether the firewall allows the connection
|
||||
4. Whether the database service is running normally
|
||||
5. Whether the database user is allowed to connect from the current host
|
||||
|
||||
## 默认端口
|
||||
## Default Ports
|
||||
|
||||
| 数据库 | 默认端口 |
|
||||
|-----------------------|----------|
|
||||
| Percona/MySQL/MariaDB | 3306 |
|
||||
| PostgreSQL | 5432 |
|
||||
| Database | Default Port |
|
||||
|-------------------------|--------------|
|
||||
| Percona/MySQL/MariaDB | 3306 |
|
||||
| PostgreSQL | 5432 |
|
||||
|
||||
@@ -1,83 +1,83 @@
|
||||
# 用户管理
|
||||
# User Management
|
||||
|
||||
用户管理页面用于创建和管理数据库用户,设置用户权限。
|
||||
The user management page is used to create and manage database users and set user permissions.
|
||||
|
||||
## 用户列表
|
||||
## User List
|
||||
|
||||
进入 **数据库** > **用户** 标签页查看用户列表。
|
||||
Go to **Database** > **User** tab to view the user list.
|
||||
|
||||

|
||||

|
||||
|
||||
列表显示以下信息:
|
||||
The list displays the following information:
|
||||
|
||||
- **类型**:数据库类型
|
||||
- **用户名**:数据库用户名
|
||||
- **密码**:用户密码(点击复制)
|
||||
- **主机**:允许连接的主机
|
||||
- **服务器**:所属的数据库服务器
|
||||
- **权限**:用户拥有权限的数据库
|
||||
- **注释**:备注信息
|
||||
- **状态**:用户状态
|
||||
- **更新日期**:最后更新时间
|
||||
- **操作**:修改、删除
|
||||
- **Type**: Database type
|
||||
- **Username**: Database username
|
||||
- **Password**: User password (click to copy)
|
||||
- **Host**: Allowed connection hosts
|
||||
- **Server**: The database server it belongs to
|
||||
- **Permissions**: Databases the user has permissions for
|
||||
- **Comment**: Remarks
|
||||
- **Status**: User status
|
||||
- **Update Date**: Last update time
|
||||
- **Actions**: Modify, delete
|
||||
|
||||
## 创建用户
|
||||
## Create User
|
||||
|
||||
1. 点击 **创建用户** 按钮
|
||||
2. 填写配置:
|
||||
- **服务器**:选择数据库服务器
|
||||
- **用户名**:数据库用户名
|
||||
- **密码**:用户密码(建议使用强密码)
|
||||
- **主机**:允许连接的主机地址
|
||||
- **权限**:选择用户可以访问的数据库
|
||||
3. 点击创建
|
||||
1. Click the **Create User** button
|
||||
2. Fill in the configuration:
|
||||
- **Server**: Select database server
|
||||
- **Username**: Database username
|
||||
- **Password**: User password (strong password recommended)
|
||||
- **Host**: Allowed connection host address
|
||||
- **Permissions**: Select databases the user can access
|
||||
3. Click Create
|
||||
|
||||
### 主机设置
|
||||
### Host Settings
|
||||
|
||||
| 值 | 说明 |
|
||||
|------|------|
|
||||
| `localhost` | 只允许本地连接 |
|
||||
| `127.0.0.1` | 只允许本地 IP 连接 |
|
||||
| `%` | 允许任意主机连接 |
|
||||
| `192.168.1.%` | 允许指定网段连接 |
|
||||
| `192.168.1.100` | 只允许指定 IP 连接 |
|
||||
| Value | Description |
|
||||
|-------|-------------|
|
||||
| `localhost` | Only allow local connections |
|
||||
| `127.0.0.1` | Only allow local IP connections |
|
||||
| `%` | Allow connections from any host |
|
||||
| `192.168.1.%` | Allow connections from specified subnet |
|
||||
| `192.168.1.100` | Only allow connections from specified IP |
|
||||
|
||||
::: warning 安全提示
|
||||
生产环境不建议使用 `%` 允许任意主机连接,应限制为具体的 IP 地址或网段。
|
||||
::: warning Security Notice
|
||||
Production environments are not recommended to use `%` to allow connections from any host. Should be restricted to specific IP addresses or subnets.
|
||||
:::
|
||||
|
||||
## 修改用户
|
||||
## Modify User
|
||||
|
||||
点击用户右侧的 **修改** 按钮可以:
|
||||
Click the **Modify** button on the right side of the user to:
|
||||
|
||||
- 修改密码
|
||||
- 修改允许连接的主机
|
||||
- 修改数据库权限
|
||||
- Modify password
|
||||
- Modify allowed connection hosts
|
||||
- Modify database permissions
|
||||
|
||||
## 删除用户
|
||||
## Delete User
|
||||
|
||||
点击用户右侧的 **删除** 按钮删除用户。
|
||||
Click the **Delete** button on the right side of the user to delete the user.
|
||||
|
||||
::: warning 注意
|
||||
删除用户后,使用该用户连接数据库的应用将无法正常工作。
|
||||
::: warning Note
|
||||
After deleting a user, applications using that user to connect to the database will not work properly.
|
||||
:::
|
||||
|
||||
## 权限说明
|
||||
## Permission Explanation
|
||||
|
||||
### Percona/MySQL/MariaDB 权限
|
||||
### Percona/MySQL/MariaDB Permissions
|
||||
|
||||
创建用户时可以选择授予权限的数据库:
|
||||
When creating a user, you can select databases to grant permissions:
|
||||
|
||||
- 选择具体数据库:用户只能访问选中的数据库
|
||||
- 不选择:用户没有任何数据库权限
|
||||
- Select specific databases: User can only access selected databases
|
||||
- No selection: User has no database permissions
|
||||
|
||||
### PostgreSQL 权限
|
||||
### PostgreSQL Permissions
|
||||
|
||||
PostgreSQL 的权限管理更加细粒度,可以自行针对数据库、模式、表等设置不同权限,面板仅支持授予数据库访问权限。
|
||||
PostgreSQL permission management is more fine-grained. You can set different permissions for databases, schemas, tables, etc. The panel only supports granting database access permissions.
|
||||
|
||||
## 密码安全
|
||||
## Password Security
|
||||
|
||||
- 使用强密码,包含大小写字母、数字和特殊字符
|
||||
- 密码长度建议 16 位以上
|
||||
- 不同应用使用不同的数据库用户
|
||||
- 定期更换密码
|
||||
- Use strong passwords containing uppercase and lowercase letters, numbers, and special characters
|
||||
- Password length recommended 16 characters or more
|
||||
- Use different database users for different applications
|
||||
- Change passwords regularly
|
||||
|
||||
@@ -1,198 +1,198 @@
|
||||
# 文件
|
||||
# File
|
||||
|
||||
文件模块提供了功能强大的图形化文件管理器,设计理念是尽可能还原 Windows 资源管理器的操作体验,支持右键菜单、拖拽上传、快捷键等特性。
|
||||
The file module provides a powerful graphical file manager. The design philosophy is to restore the Windows Explorer operation experience as much as possible, supporting right-click menus, drag-and-drop upload, keyboard shortcuts, and other features.
|
||||
|
||||
## 文件管理器
|
||||
## File Manager
|
||||
|
||||

|
||||

|
||||
|
||||
## 核心特性
|
||||
## Core Features
|
||||
|
||||
### 类 Windows 操作体验
|
||||
### Windows-like Operation Experience
|
||||
|
||||
- **右键菜单**:右键点击文件或目录弹出操作菜单
|
||||
- **拖拽上传**:直接将本地文件拖拽到浏览器窗口即可上传
|
||||
- **多选操作**:支持 Ctrl+点击 多选,Shift+点击 范围选择
|
||||
- **快捷键支持**:常用操作都有对应的快捷键
|
||||
- **Right-click Menu**: Right-click on files or directories to pop up an action menu
|
||||
- **Drag-and-drop Upload**: Directly drag local files to the browser window to upload
|
||||
- **Multi-select Operations**: Support Ctrl+click for multi-select, Shift+click for range selection
|
||||
- **Keyboard Shortcuts**: Common operations have corresponding keyboard shortcuts
|
||||
|
||||
### 快捷键
|
||||
### Keyboard Shortcuts
|
||||
|
||||
| 快捷键 | 功能 |
|
||||
|--------|------|
|
||||
| `Ctrl+C` | 复制 |
|
||||
| `Ctrl+X` | 剪切 |
|
||||
| `Ctrl+V` | 粘贴 |
|
||||
| `Delete` | 删除 |
|
||||
| `F2` | 重命名 |
|
||||
| `Ctrl+A` | 全选 |
|
||||
| Shortcut | Function |
|
||||
|----------|----------|
|
||||
| `Ctrl+C` | Copy |
|
||||
| `Ctrl+X` | Cut |
|
||||
| `Ctrl+V` | Paste |
|
||||
| `Delete` | Delete |
|
||||
| `F2` | Rename |
|
||||
| `Ctrl+A` | Select All |
|
||||
|
||||
## 导航
|
||||
## Navigation
|
||||
|
||||
### 路径导航
|
||||
### Path Navigation
|
||||
|
||||
顶部显示当前路径的面包屑导航,点击可以快速跳转到任意上级目录。
|
||||
The top displays breadcrumb navigation of the current path. Click to quickly jump to any parent directory.
|
||||
|
||||
### 快捷按钮
|
||||
### Quick Buttons
|
||||
|
||||
- **后退**:返回上一个访问的目录
|
||||
- **前进**:前进到下一个目录
|
||||
- **上级目录**:返回上级目录
|
||||
- **刷新**:刷新当前目录
|
||||
- **主目录**:返回默认目录
|
||||
- **Back**: Return to the previous visited directory
|
||||
- **Forward**: Go to the next directory
|
||||
- **Parent Directory**: Return to parent directory
|
||||
- **Refresh**: Refresh current directory
|
||||
- **Home Directory**: Return to default directory
|
||||
|
||||
## 文件列表
|
||||
## File List
|
||||
|
||||
文件列表显示以下信息:
|
||||
The file list displays the following information:
|
||||
|
||||
| 列 | 说明 |
|
||||
|------|------|
|
||||
| 名称 | 文件或目录名称 |
|
||||
| 大小 | 文件大小,目录显示"计算"可点击计算 |
|
||||
| 权限 | 文件权限(如 0755) |
|
||||
| 所有者/组 | 文件的所有者和所属组 |
|
||||
| 修改时间 | 最后修改时间 |
|
||||
| 操作 | 打开、压缩、重命名、删除、更多 |
|
||||
| Column | Description |
|
||||
|--------|-------------|
|
||||
| Name | File or directory name |
|
||||
| Size | File size, directories show "Calculate" which can be clicked to calculate |
|
||||
| Permissions | File permissions (e.g., 0755) |
|
||||
| Owner/Group | File owner and group |
|
||||
| Modified Time | Last modified time |
|
||||
| Actions | Open, compress, rename, delete, more |
|
||||
|
||||
### 选择文件
|
||||
### Select Files
|
||||
|
||||

|
||||

|
||||
|
||||
选择文件后,顶部会显示批量操作按钮:
|
||||
After selecting files, batch operation buttons appear at the top:
|
||||
|
||||
- **复制**:复制选中的文件
|
||||
- **移动**:移动选中的文件
|
||||
- **压缩**:压缩选中的文件
|
||||
- **权限**:修改权限
|
||||
- **删除**:删除选中的文件
|
||||
- **Copy**: Copy selected files
|
||||
- **Move**: Move selected files
|
||||
- **Compress**: Compress selected files
|
||||
- **Permissions**: Modify permissions
|
||||
- **Delete**: Delete selected files
|
||||
|
||||
### 更多操作
|
||||
### More Actions
|
||||
|
||||
点击文件行的 **更多** 按钮,显示更多操作选项:
|
||||
Click the **More** button on the file row to display more action options:
|
||||
|
||||

|
||||

|
||||
|
||||
- **复制**:复制文件到其他目录
|
||||
- **移动**:移动文件到其他目录
|
||||
- **权限**:修改文件权限和所有者
|
||||
- **压缩**:压缩文件
|
||||
- **复制路径**:复制文件的完整路径
|
||||
- **属性**:查看文件详细属性
|
||||
- **Copy**: Copy file to another directory
|
||||
- **Move**: Move file to another directory
|
||||
- **Permissions**: Modify file permissions and owner
|
||||
- **Compress**: Compress file
|
||||
- **Copy Path**: Copy the full path of the file
|
||||
- **Properties**: View detailed file properties
|
||||
|
||||
## 工具栏
|
||||
## Toolbar
|
||||
|
||||
### 新建
|
||||
### New
|
||||
|
||||
点击 **新建** 按钮可以:
|
||||
- 新建文件
|
||||
- 新建目录
|
||||
Click the **New** button to:
|
||||
- Create new file
|
||||
- Create new directory
|
||||
|
||||
### 上传
|
||||
### Upload
|
||||
|
||||
点击 **上传** 按钮上传本地文件到服务器。
|
||||
Click the **Upload** button to upload local files to the server.
|
||||
|
||||
支持的上传方式:
|
||||
- 点击选择文件上传
|
||||
- **拖拽上传**:直接将文件拖拽到页面即可上传
|
||||
Supported upload methods:
|
||||
- Click to select files for upload
|
||||
- **Drag-and-drop Upload**: Directly drag files to the page to upload
|
||||
|
||||
### 远程下载
|
||||
### Remote Download
|
||||
|
||||
点击 **远程下载** 按钮,输入 URL 地址,将远程文件下载到当前目录。
|
||||
Click the **Remote Download** button, enter a URL address to download remote files to the current directory.
|
||||
|
||||
适用场景:
|
||||
- 下载软件安装包
|
||||
- 下载远程备份文件
|
||||
- 从其他服务器获取文件
|
||||
Use cases:
|
||||
- Download software installation packages
|
||||
- Download remote backup files
|
||||
- Get files from other servers
|
||||
|
||||
### 搜索
|
||||
### Search
|
||||
|
||||
在搜索框输入关键词搜索文件:
|
||||
- 默认搜索当前目录
|
||||
- 勾选 **包括子目录** 可以递归搜索
|
||||
Enter keywords in the search box to search for files:
|
||||
- Default searches current directory
|
||||
- Check **Include Subdirectories** to search recursively
|
||||
|
||||
### 终端
|
||||
### Terminal
|
||||
|
||||
点击 **终端** 按钮可以在当前目录打开终端,方便执行命令行操作。
|
||||
Click the **Terminal** button to open a terminal in the current directory for convenient command line operations.
|
||||
|
||||
### 排序
|
||||
### Sort
|
||||
|
||||
点击 **排序** 按钮可以按不同字段排序文件列表。
|
||||
Click the **Sort** button to sort the file list by different fields.
|
||||
|
||||
## 文件编辑器
|
||||
## File Editor
|
||||
|
||||
AcePanel 内置了功能强大的代码编辑器,基于 Monaco Editor(VS Code 同款编辑器内核)。
|
||||
AcePanel has a built-in powerful code editor based on Monaco Editor (the same editor core as VS Code).
|
||||
|
||||

|
||||

|
||||
|
||||
### 编辑器特性
|
||||
### Editor Features
|
||||
|
||||
- **语法高亮**:支持各种编程语言的语法高亮
|
||||
- **代码折叠**:支持代码块折叠
|
||||
- **行号显示**:显示行号,方便定位
|
||||
- **小地图**:右侧显示代码缩略图
|
||||
- **自动换行**:可切换自动换行模式
|
||||
- **多文件编辑**:支持同时打开多个文件,标签页切换
|
||||
- **Syntax Highlighting**: Supports syntax highlighting for various programming languages
|
||||
- **Code Folding**: Supports code block folding
|
||||
- **Line Numbers**: Displays line numbers for easy positioning
|
||||
- **Minimap**: Displays code thumbnail on the right side
|
||||
- **Word Wrap**: Can toggle word wrap mode
|
||||
- **Multi-file Editing**: Supports opening multiple files simultaneously with tab switching
|
||||
|
||||
### 编辑器快捷键
|
||||
### Editor Shortcuts
|
||||
|
||||
| 快捷键 | 功能 |
|
||||
|--------|------|
|
||||
| `Ctrl+S` | 保存当前文件 |
|
||||
| `Ctrl+Shift+S` | 保存所有文件 |
|
||||
| `Ctrl+F` | 搜索 |
|
||||
| `Ctrl+H` | 替换 |
|
||||
| `Ctrl+G` | 转到指定行 |
|
||||
| Shortcut | Function |
|
||||
|----------|----------|
|
||||
| `Ctrl+S` | Save current file |
|
||||
| `Ctrl+Shift+S` | Save all files |
|
||||
| `Ctrl+F` | Search |
|
||||
| `Ctrl+H` | Replace |
|
||||
| `Ctrl+G` | Go to line |
|
||||
|
||||
### 编辑器工具栏
|
||||
### Editor Toolbar
|
||||
|
||||
- **保存**:保存当前文件
|
||||
- **保存所有**:保存所有修改的文件
|
||||
- **刷新**:重新加载文件内容
|
||||
- **搜索**:打开搜索面板
|
||||
- **替换**:打开替换面板
|
||||
- **转到**:跳转到指定行
|
||||
- **字体大小**:调整编辑器字体大小
|
||||
- **切换自动换行**:开启/关闭自动换行
|
||||
- **切换小地图**:显示/隐藏右侧小地图
|
||||
- **设置**:编辑器设置
|
||||
- **Save**: Save current file
|
||||
- **Save All**: Save all modified files
|
||||
- **Refresh**: Reload file content
|
||||
- **Search**: Open search panel
|
||||
- **Replace**: Open replace panel
|
||||
- **Go to**: Jump to specified line
|
||||
- **Font Size**: Adjust editor font size
|
||||
- **Toggle Word Wrap**: Enable/disable word wrap
|
||||
- **Toggle Minimap**: Show/hide right-side minimap
|
||||
- **Settings**: Editor settings
|
||||
|
||||
### 全屏模式
|
||||
### Fullscreen Mode
|
||||
|
||||
点击 **最大化** 按钮可以全屏编辑,获得更大的编辑空间:
|
||||
Click the **Maximize** button for fullscreen editing to get more editing space:
|
||||
|
||||

|
||||

|
||||
|
||||
### 侧边栏文件树
|
||||
### Sidebar File Tree
|
||||
|
||||
编辑器左侧显示当前目录的文件树,可以:
|
||||
- 快速切换编辑其他文件
|
||||
- 新建文件
|
||||
- 搜索文件
|
||||
The left side of the editor displays the file tree of the current directory, allowing you to:
|
||||
- Quickly switch to edit other files
|
||||
- Create new files
|
||||
- Search files
|
||||
|
||||
### 状态栏
|
||||
### Status Bar
|
||||
|
||||
编辑器底部状态栏显示:
|
||||
- 文件完整路径
|
||||
- 换行符类型(LF/CRLF)
|
||||
- 光标位置(行、列)
|
||||
- 缩进设置(空格/Tab)
|
||||
- 文件语言类型
|
||||
The editor bottom status bar displays:
|
||||
- Full file path
|
||||
- Line ending type (LF/CRLF)
|
||||
- Cursor position (line, column)
|
||||
- Indentation settings (spaces/Tab)
|
||||
- File language type
|
||||
|
||||
## 权限说明
|
||||
## Permission Explanation
|
||||
|
||||
Linux 文件权限由三组数字表示:
|
||||
Linux file permissions are represented by three groups of numbers:
|
||||
|
||||
| 权限 | 数字 | 说明 |
|
||||
|------|------|------|
|
||||
| r | 4 | 读取 |
|
||||
| w | 2 | 写入 |
|
||||
| x | 1 | 执行 |
|
||||
| Permission | Number | Description |
|
||||
|------------|--------|-------------|
|
||||
| r | 4 | Read |
|
||||
| w | 2 | Write |
|
||||
| x | 1 | Execute |
|
||||
|
||||
例如 `0755`:
|
||||
- 所有者:7 (4+2+1) = 读+写+执行
|
||||
- 所属组:5 (4+1) = 读+执行
|
||||
- 其他用户:5 (4+1) = 读+执行
|
||||
For example `0755`:
|
||||
- Owner: 7 (4+2+1) = read+write+execute
|
||||
- Group: 5 (4+1) = read+execute
|
||||
- Others: 5 (4+1) = read+execute
|
||||
|
||||
常用权限:
|
||||
- `0644`:普通文件
|
||||
- `0755`:可执行文件和目录
|
||||
- `0600`:私密文件(如密钥)
|
||||
Common permissions:
|
||||
- `0644`: Regular files
|
||||
- `0755`: Executable files and directories
|
||||
- `0600`: Private files (such as keys)
|
||||
|
||||
@@ -1,99 +1,99 @@
|
||||
# 监控
|
||||
# Monitor
|
||||
|
||||
监控模块用于记录和查看服务器的性能数据,包括 CPU、内存、磁盘 I/O 和网络流量。
|
||||
The monitor module is used to record and view server performance data, including CPU, memory, disk I/O, and network traffic.
|
||||
|
||||
## 监控页面
|
||||
## Monitor Page
|
||||
|
||||

|
||||

|
||||
|
||||
## 监控设置
|
||||
## Monitor Settings
|
||||
|
||||
### 启用监控
|
||||
### Enable Monitoring
|
||||
|
||||
开启 **启用监控** 开关后,系统会定期采集性能数据。
|
||||
After turning on the **Enable Monitoring** switch, the system will periodically collect performance data.
|
||||
|
||||
### 保存天数
|
||||
### Retention Days
|
||||
|
||||
设置监控数据的保留时间,默认 30 天。超过保留时间的数据会自动清理。
|
||||
Set the retention time for monitoring data, default is 30 days. Data exceeding the retention time will be automatically cleaned up.
|
||||
|
||||
### 清除监控记录
|
||||
### Clear Monitor Records
|
||||
|
||||
点击 **清除监控记录** 按钮可以手动清除所有历史监控数据。
|
||||
Click the **Clear Monitor Records** button to manually clear all historical monitoring data.
|
||||
|
||||
## 监控指标
|
||||
## Monitoring Metrics
|
||||
|
||||
### 负载(Load Average)
|
||||
### Load Average
|
||||
|
||||
系统负载反映了 CPU 的繁忙程度:
|
||||
System load reflects the busyness of the CPU:
|
||||
|
||||
- **1 分钟负载**:最近 1 分钟的平均负载
|
||||
- **5 分钟负载**:最近 5 分钟的平均负载
|
||||
- **15 分钟负载**:最近 15 分钟的平均负载
|
||||
- **1-minute load**: Average load over the last 1 minute
|
||||
- **5-minute load**: Average load over the last 5 minutes
|
||||
- **15-minute load**: Average load over the last 15 minutes
|
||||
|
||||
负载值的参考:
|
||||
- 负载 < CPU 核心数:系统运行流畅
|
||||
- 负载 = CPU 核心数:系统满负荷运行
|
||||
- 负载 > CPU 核心数:系统过载,可能出现卡顿
|
||||
Load value reference:
|
||||
- Load < CPU cores: System running smoothly
|
||||
- Load = CPU cores: System running at full capacity
|
||||
- Load > CPU cores: System overloaded, may experience lag
|
||||
|
||||
### CPU 使用率
|
||||
### CPU Usage
|
||||
|
||||
显示 CPU 的使用百分比,包括:
|
||||
- 用户态使用率
|
||||
- 系统态使用率
|
||||
- 空闲率
|
||||
Displays CPU usage percentage, including:
|
||||
- User mode usage
|
||||
- System mode usage
|
||||
- Idle rate
|
||||
|
||||
### 内存使用
|
||||
### Memory Usage
|
||||
|
||||
显示内存的使用情况:
|
||||
- 已使用内存
|
||||
- 可用内存
|
||||
- 缓存/缓冲区
|
||||
Displays memory usage:
|
||||
- Used memory
|
||||
- Available memory
|
||||
- Cache/Buffer
|
||||
|
||||
### 磁盘 I/O
|
||||
### Disk I/O
|
||||
|
||||
显示磁盘的读写速度:
|
||||
- 读取速度(KB/s 或 MB/s)
|
||||
- 写入速度(KB/s 或 MB/s)
|
||||
Displays disk read/write speed:
|
||||
- Read speed (KB/s or MB/s)
|
||||
- Write speed (KB/s or MB/s)
|
||||
|
||||
可以选择要监控的磁盘设备。
|
||||
You can select the disk device to monitor.
|
||||
|
||||
### 网络流量
|
||||
### Network Traffic
|
||||
|
||||
显示网络接口的流量:
|
||||
- 发送速度
|
||||
- 接收速度
|
||||
Displays network interface traffic:
|
||||
- Send speed
|
||||
- Receive speed
|
||||
|
||||
可以选择要监控的网络接口。
|
||||
You can select the network interface to monitor.
|
||||
|
||||
## 时间范围
|
||||
## Time Range
|
||||
|
||||
每个监控图表都支持选择时间范围:
|
||||
Each monitoring chart supports selecting a time range:
|
||||
|
||||
- **昨天**:查看昨天的数据
|
||||
- **今天**:查看今天的数据
|
||||
- **近 7 天**:查看最近一周的数据
|
||||
- **自定义**:选择任意时间范围
|
||||
- **Yesterday**: View yesterday's data
|
||||
- **Today**: View today's data
|
||||
- **Last 7 days**: View data from the last week
|
||||
- **Custom**: Select any time range
|
||||
|
||||
## 使用场景
|
||||
## Use Cases
|
||||
|
||||
### 性能分析
|
||||
### Performance Analysis
|
||||
|
||||
通过监控数据分析服务器性能瓶颈:
|
||||
- CPU 持续高负载:考虑优化程序或升级 CPU
|
||||
- 内存不足:考虑增加内存或优化内存使用
|
||||
- 磁盘 I/O 高:考虑使用 SSD 或优化数据库查询
|
||||
- 网络带宽不足:考虑升级带宽
|
||||
Analyze server performance bottlenecks through monitoring data:
|
||||
- Sustained high CPU load: Consider optimizing programs or upgrading CPU
|
||||
- Insufficient memory: Consider adding memory or optimizing memory usage
|
||||
- High disk I/O: Consider using SSD or optimizing database queries
|
||||
- Insufficient network bandwidth: Consider upgrading bandwidth
|
||||
|
||||
### 故障排查
|
||||
### Troubleshooting
|
||||
|
||||
出现问题时,查看历史监控数据定位问题发生的时间和原因。
|
||||
When problems occur, view historical monitoring data to locate the time and cause of the problem.
|
||||
|
||||
### 容量规划
|
||||
### Capacity Planning
|
||||
|
||||
根据历史数据趋势,预测未来的资源需求,提前进行扩容。
|
||||
Based on historical data trends, predict future resource needs and plan for expansion in advance.
|
||||
|
||||
## 注意事项
|
||||
## Notes
|
||||
|
||||
- 监控数据会占用一定的磁盘空间
|
||||
- 保存天数越长,占用空间越大
|
||||
- 建议根据实际需求设置合适的保存天数
|
||||
- Monitoring data will occupy some disk space
|
||||
- The longer the retention days, the more space it occupies
|
||||
- It is recommended to set appropriate retention days based on actual needs
|
||||
|
||||
@@ -1,156 +1,156 @@
|
||||
# 项目
|
||||
# Project
|
||||
|
||||
项目模块用于管理后端应用程序,支持 Go、Java、Node.js、PHP、Python 等多种语言。项目会作为系统服务运行,支持自动重启、开机自启等功能。
|
||||
The project module is used to manage backend applications, supporting multiple languages including Go, Java, Node.js, PHP, Python, etc. Projects run as system services, supporting automatic restart, auto-start on boot, and other features.
|
||||
|
||||
## 项目类型
|
||||
## Project Types
|
||||
|
||||
| 类型 | 说明 | 适用场景 |
|
||||
|------|------|----------|
|
||||
| [Go](./project/go) | Go 语言项目 | Gin、Echo、Fiber 等框架 |
|
||||
| [Java](./project/java) | Java 项目 | Spring Boot、Tomcat 等 |
|
||||
| [Node.js](./project/nodejs) | Node.js 项目 | Express、Koa、NestJS 等 |
|
||||
| [PHP](./project/php) | PHP 项目 | Laravel Octane、Swoole 等 |
|
||||
| [Python](./project/python) | Python 项目 | Django、Flask、FastAPI 等 |
|
||||
| [通用](./project/general) | 其他类型项目 | 任意可执行程序 |
|
||||
| Type | Description | Use Cases |
|
||||
|------|-------------|-----------|
|
||||
| [Go](./project/go) | Go language projects | Gin, Echo, Fiber frameworks |
|
||||
| [Java](./project/java) | Java projects | Spring Boot, Tomcat, etc. |
|
||||
| [Node.js](./project/nodejs) | Node.js projects | Express, Koa, NestJS, etc. |
|
||||
| [PHP](./project/php) | PHP projects | Laravel Octane, Swoole, etc. |
|
||||
| [Python](./project/python) | Python projects | Django, Flask, FastAPI, etc. |
|
||||
| [General](./project/general) | Other types of projects | Any executable program |
|
||||
|
||||

|
||||

|
||||
|
||||
## 项目 vs 网站
|
||||
## Project vs Website
|
||||
|
||||
| 特性 | 项目 | 网站 |
|
||||
|------|------|------|
|
||||
| 运行方式 | 独立进程 | 依赖 Web 服务器 |
|
||||
| 进程管理 | 自动重启、开机自启 | 由 Web 服务器管理 |
|
||||
| 适用场景 | 后端服务、API | 传统 Web 应用 |
|
||||
| 对外访问 | 需要配合反向代理 | 直接访问 |
|
||||
| Feature | Project | Website |
|
||||
|---------|---------|---------|
|
||||
| Run Mode | Independent process | Depends on Web server |
|
||||
| Process Management | Auto restart, auto-start on boot | Managed by Web server |
|
||||
| Use Cases | Backend services, APIs | Traditional Web applications |
|
||||
| External Access | Requires reverse proxy | Direct access |
|
||||
|
||||
## 创建项目
|
||||
## Create Project
|
||||
|
||||
1. 进入 **项目** 页面
|
||||
2. 点击 **创建项目**
|
||||
1. Go to the **Project** page
|
||||
2. Click **Create Project**
|
||||
|
||||

|
||||

|
||||
|
||||
### 配置项
|
||||
### Configuration Items
|
||||
|
||||
- **项目名**:项目标识,用作服务名称
|
||||
- **项目目录**:项目文件所在目录
|
||||
- **运行用户**:运行项目的系统用户,默认 www
|
||||
- **启动命令**:启动项目的命令
|
||||
- **反向代理**:是否自动创建反向代理网站
|
||||
- **Project Name**: Project identifier, used as service name
|
||||
- **Project Directory**: Directory where project files are located
|
||||
- **Run User**: System user to run the project, default www
|
||||
- **Start Command**: Command to start the project
|
||||
- **Reverse Proxy**: Whether to automatically create a reverse proxy website
|
||||
|
||||
## 项目管理
|
||||
## Project Management
|
||||
|
||||
项目列表显示以下信息:
|
||||
The project list displays the following information:
|
||||
|
||||
- **名称**:项目名称
|
||||
- **描述**:项目描述
|
||||
- **类型**:项目类型(Go/Java/Node.js 等)
|
||||
- **状态**:运行状态
|
||||
- **自启动**:是否开机自启
|
||||
- **目录**:项目目录
|
||||
- **操作**:启动、停止、重启、日志等
|
||||
- **Name**: Project name
|
||||
- **Description**: Project description
|
||||
- **Type**: Project type (Go/Java/Node.js, etc.)
|
||||
- **Status**: Running status
|
||||
- **Auto Start**: Whether to auto-start on boot
|
||||
- **Directory**: Project directory
|
||||
- **Actions**: Start, stop, restart, logs, etc.
|
||||
|
||||
### 项目操作
|
||||
### Project Operations
|
||||
|
||||
- **启动**:启动项目
|
||||
- **停止**:停止项目
|
||||
- **重启**:重启项目
|
||||
- **日志**:查看项目运行日志
|
||||
- **编辑**:修改项目配置
|
||||
- **删除**:删除项目
|
||||
- **Start**: Start the project
|
||||
- **Stop**: Stop the project
|
||||
- **Restart**: Restart the project
|
||||
- **Logs**: View project runtime logs
|
||||
- **Edit**: Modify project configuration
|
||||
- **Delete**: Delete the project
|
||||
|
||||
## 编辑项目
|
||||
## Edit Project
|
||||
|
||||
点击项目列表中的 **编辑** 按钮,可以修改项目配置。编辑对话框包含多个标签页:
|
||||
Click the **Edit** button in the project list to modify project configuration. The edit dialog contains multiple tabs:
|
||||
|
||||
### 基本设置
|
||||
### Basic Settings
|
||||
|
||||
配置项目的基本信息:
|
||||
Configure basic project information:
|
||||
|
||||

|
||||

|
||||
|
||||
- **项目名**:项目标识,用作服务名称
|
||||
- **描述**:项目描述信息
|
||||
- **项目目录**:项目文件所在目录
|
||||
- **工作目录**:程序运行时的工作目录,默认为项目目录
|
||||
- **运行用户**:运行项目的系统用户
|
||||
- **Project Name**: Project identifier, used as service name
|
||||
- **Description**: Project description information
|
||||
- **Project Directory**: Directory where project files are located
|
||||
- **Working Directory**: Working directory when the program runs, defaults to project directory
|
||||
- **Run User**: System user to run the project
|
||||
|
||||
### 运行设置
|
||||
### Run Settings
|
||||
|
||||
配置项目的运行参数:
|
||||
Configure project runtime parameters:
|
||||
|
||||

|
||||

|
||||
|
||||
- **启动命令**:启动项目的命令
|
||||
- **预启动命令**:启动前运行的命令(可选)
|
||||
- **启动后命令**:启动后运行的命令(可选)
|
||||
- **停止命令**:自定义停止命令(可选)
|
||||
- **重载命令**:自定义重载命令(可选)
|
||||
- **重启策略**:失败时重启、总是重启、不重启
|
||||
- **重启间隔**:重启之间的等待时间
|
||||
- **最大重启次数**:连续重启的最大次数
|
||||
- **启动超时**:等待服务启动的超时时间
|
||||
- **停止超时**:等待服务停止的超时时间
|
||||
- **标准输出**:标准输出的处理方式
|
||||
- **标准错误**:标准错误的处理方式
|
||||
- **环境变量**:设置项目运行时的环境变量
|
||||
- **Start Command**: Command to start the project
|
||||
- **Pre-start Command**: Command to run before starting (optional)
|
||||
- **Post-start Command**: Command to run after starting (optional)
|
||||
- **Stop Command**: Custom stop command (optional)
|
||||
- **Reload Command**: Custom reload command (optional)
|
||||
- **Restart Policy**: Restart on failure, always restart, never restart
|
||||
- **Restart Interval**: Wait time between restarts
|
||||
- **Max Restart Count**: Maximum number of consecutive restarts
|
||||
- **Start Timeout**: Timeout for waiting for service to start
|
||||
- **Stop Timeout**: Timeout for waiting for service to stop
|
||||
- **Standard Output**: How to handle standard output
|
||||
- **Standard Error**: How to handle standard error
|
||||
- **Environment Variables**: Set environment variables for project runtime
|
||||
|
||||
### 依赖
|
||||
### Dependencies
|
||||
|
||||
配置服务依赖关系以控制启动顺序:
|
||||
Configure service dependencies to control startup order:
|
||||
|
||||

|
||||

|
||||
|
||||
- **Requires**:强依赖,如果这些服务不可用,项目将会失败
|
||||
- **Wants**:弱依赖,如果这些服务失败,项目仍然会启动
|
||||
- **After**:在指定服务之后启动此项目
|
||||
- **Before**:在指定服务之前启动此项目
|
||||
- **Requires**: Strong dependencies, if these services are unavailable, the project will fail
|
||||
- **Wants**: Weak dependencies, if these services fail, the project will still start
|
||||
- **After**: Start this project after the specified services
|
||||
- **Before**: Start this project before the specified services
|
||||
|
||||
常见服务:`network.target`、`mysqld.service`、`postgresql.service`、`redis.service`
|
||||
Common services: `network.target`, `mysqld.service`, `postgresql.service`, `redis.service`
|
||||
|
||||
### 资源限制
|
||||
### Resource Limits
|
||||
|
||||
设置资源限制以防止服务消耗过多系统资源:
|
||||
Set resource limits to prevent services from consuming too many system resources:
|
||||
|
||||

|
||||

|
||||
|
||||
- **内存限制**:限制项目使用的最大内存,0 表示无限制
|
||||
- **CPU 配额**:限制 CPU 使用率,100% = 1 个 CPU 核心
|
||||
- **Memory Limit**: Limit the maximum memory used by the project, 0 means unlimited
|
||||
- **CPU Quota**: Limit CPU usage, 100% = 1 CPU core
|
||||
|
||||
### 安全设置
|
||||
### Security Settings
|
||||
|
||||
增强服务隔离的安全选项:
|
||||
Security options to enhance service isolation:
|
||||
|
||||

|
||||

|
||||
|
||||
- **没有新权限**:防止进程获取新的权限
|
||||
- **保护 /tmp**:为服务创建私有的 /tmp 目录
|
||||
- **保护 /home**:限制对 /home 目录的访问
|
||||
- **保护系统**:设置系统目录的只读保护级别
|
||||
- `true`:/usr、/boot 为只读
|
||||
- `full`:+ /etc 为只读
|
||||
- `strict`:整个文件系统为只读
|
||||
- **读写路径**:服务可以读写的路径
|
||||
- **只读路径**:服务只能读取的路径
|
||||
- **No New Privileges**: Prevent the process from gaining new privileges
|
||||
- **Protect /tmp**: Create a private /tmp directory for the service
|
||||
- **Protect /home**: Restrict access to the /home directory
|
||||
- **Protect System**: Set read-only protection level for system directories
|
||||
- `true`: /usr, /boot are read-only
|
||||
- `full`: + /etc is read-only
|
||||
- `strict`: Entire filesystem is read-only
|
||||
- **Read-Write Paths**: Paths the service can read and write
|
||||
- **Read-Only Paths**: Paths the service can only read
|
||||
|
||||
::: warning 注意
|
||||
安全设置可能会影响某些功能,请在启用之前进行充分测试。
|
||||
::: warning Note
|
||||
Security settings may affect certain features. Please test thoroughly before enabling.
|
||||
:::
|
||||
|
||||
## 进程管理
|
||||
## Process Management
|
||||
|
||||
项目使用 systemd 进行进程管理,具有以下特性:
|
||||
Projects use systemd for process management, with the following features:
|
||||
|
||||
- **自动重启**:进程异常退出后自动重启
|
||||
- **开机自启**:系统启动时自动启动项目
|
||||
- **日志管理**:自动记录标准输出和错误输出
|
||||
- **Auto Restart**: Automatically restart after abnormal process exit
|
||||
- **Auto Start on Boot**: Automatically start the project when the system boots
|
||||
- **Log Management**: Automatically record standard output and error output
|
||||
|
||||
## 下一步
|
||||
## Next Steps
|
||||
|
||||
- [Go 项目](./project/go) - 部署 Go 应用
|
||||
- [Java 项目](./project/java) - 部署 Java 应用
|
||||
- [Node.js 项目](./project/nodejs) - 部署 Node.js 应用
|
||||
- [PHP 项目](./project/php) - 部署 PHP 应用
|
||||
- [Python 项目](./project/python) - 部署 Python 应用
|
||||
- [通用项目](./project/general) - 部署其他类型应用
|
||||
- [Go Project](./project/go) - Deploy Go applications
|
||||
- [Java Project](./project/java) - Deploy Java applications
|
||||
- [Node.js Project](./project/nodejs) - Deploy Node.js applications
|
||||
- [PHP Project](./project/php) - Deploy PHP applications
|
||||
- [Python Project](./project/python) - Deploy Python applications
|
||||
- [General Project](./project/general) - Deploy other types of applications
|
||||
|
||||
@@ -1,50 +1,50 @@
|
||||
# 通用项目
|
||||
# General Project
|
||||
|
||||
通用项目用于部署任意类型的可执行程序,不限于特定编程语言。
|
||||
General projects are used to deploy any type of executable program, not limited to specific programming languages.
|
||||
|
||||
## 适用场景
|
||||
## Use Cases
|
||||
|
||||
- Rust 应用
|
||||
- C/C++ 应用
|
||||
- Shell 脚本
|
||||
- 其他编译型语言应用
|
||||
- 自定义启动脚本
|
||||
- Rust applications
|
||||
- C/C++ applications
|
||||
- Shell scripts
|
||||
- Other compiled language applications
|
||||
- Custom startup scripts
|
||||
|
||||
## 创建通用项目
|
||||
## Creating a General Project
|
||||
|
||||
1. 进入 **项目** 页面
|
||||
2. 点击 **创建项目**
|
||||
3. 填写配置:
|
||||
- **项目名**:项目标识
|
||||
- **项目目录**:可执行文件所在目录
|
||||
- **启动命令**:启动程序的命令
|
||||
4. 根据需要开启 **反向代理**
|
||||
1. Go to the **Projects** page
|
||||
2. Click **Create Project**
|
||||
3. Fill in the configuration:
|
||||
- **Project Name**: Project identifier
|
||||
- **Project Directory**: Directory where the executable is located
|
||||
- **Startup Command**: Command to start the program
|
||||
4. Enable **Reverse Proxy** as needed
|
||||
|
||||
## 启动命令示例
|
||||
## Startup Command Examples
|
||||
|
||||
### Rust 应用
|
||||
### Rust Application
|
||||
|
||||
```bash
|
||||
# 运行编译好的二进制文件
|
||||
# Run compiled binary
|
||||
./myapp
|
||||
|
||||
# 带参数运行
|
||||
# Run with arguments
|
||||
./myapp --config config.toml --port 8080
|
||||
```
|
||||
|
||||
### Shell 脚本
|
||||
### Shell Script
|
||||
|
||||
```bash
|
||||
# 运行脚本
|
||||
# Run script
|
||||
/bin/bash start.sh
|
||||
|
||||
# 或直接运行(需要 shebang 和执行权限)
|
||||
# Or run directly (requires shebang and execute permission)
|
||||
./start.sh
|
||||
```
|
||||
|
||||
### 自定义启动脚本
|
||||
### Custom Startup Script
|
||||
|
||||
创建 `start.sh`:
|
||||
Create `start.sh`:
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
@@ -53,75 +53,75 @@ export ENV=production
|
||||
./myapp
|
||||
```
|
||||
|
||||
启动命令:`/bin/bash start.sh`
|
||||
Startup command: `/bin/bash start.sh`
|
||||
|
||||
## 环境变量
|
||||
## Environment Variables
|
||||
|
||||
可以在启动命令中设置环境变量:
|
||||
You can set environment variables in the startup command:
|
||||
|
||||
```bash
|
||||
# 单个环境变量
|
||||
# Single environment variable
|
||||
ENV=production ./myapp
|
||||
|
||||
# 多个环境变量
|
||||
# Multiple environment variables
|
||||
ENV=production PORT=8080 ./myapp
|
||||
```
|
||||
|
||||
或直接编辑项目,在 **运行设置** 中添加环境变量。
|
||||
Or edit the project directly and add environment variables in **Runtime Settings**.
|
||||
|
||||
## 工作目录
|
||||
## Working Directory
|
||||
|
||||
项目会在指定的项目目录下运行,相对路径会基于该目录解析。
|
||||
The project runs in the specified project directory, and relative paths are resolved based on that directory.
|
||||
|
||||
如果需要切换目录,可以在启动命令中使用 `cd`:
|
||||
If you need to change directories, you can use `cd` in the startup command:
|
||||
|
||||
```bash
|
||||
cd /opt/ace/project/myapp/bin && ./myapp
|
||||
```
|
||||
|
||||
## 权限设置
|
||||
## Permission Settings
|
||||
|
||||
确保可执行文件有执行权限:
|
||||
Ensure the executable has execute permission:
|
||||
|
||||
```bash
|
||||
chmod +x myapp
|
||||
chmod +x start.sh
|
||||
```
|
||||
|
||||
## 运行用户
|
||||
## Running User
|
||||
|
||||
默认使用 `www` 用户运行项目。如果程序需要特殊权限,可以选择其他用户。
|
||||
By default, projects run as the `www` user. If the program requires special permissions, you can select a different user.
|
||||
|
||||
::: warning 注意
|
||||
使用 root 用户运行可能带来安全风险,请谨慎选择。
|
||||
::: warning Note
|
||||
Running as root user may pose security risks, please choose carefully.
|
||||
:::
|
||||
|
||||
## 日志输出
|
||||
## Log Output
|
||||
|
||||
程序的标准输出(stdout)和标准错误(stderr)会被记录到日志中,可以在项目管理页面查看。
|
||||
The program's standard output (stdout) and standard error (stderr) are recorded in logs, which can be viewed on the project management page.
|
||||
|
||||
建议程序将日志输出到标准输出,而非写入文件,便于统一管理。
|
||||
It is recommended that programs output logs to standard output rather than writing to files for unified management.
|
||||
|
||||
## 信号处理
|
||||
## Signal Handling
|
||||
|
||||
项目停止时会发送 SIGTERM 信号,程序应正确处理该信号以实现优雅关闭:
|
||||
When a project stops, a SIGTERM signal is sent. The program should handle this signal properly to achieve graceful shutdown:
|
||||
|
||||
```rust
|
||||
// Rust 示例
|
||||
// Rust example
|
||||
use signal_hook::{consts::SIGTERM, iterator::Signals};
|
||||
|
||||
fn main() {
|
||||
let mut signals = Signals::new(&[SIGTERM]).unwrap();
|
||||
// 处理 SIGTERM 信号
|
||||
// Handle SIGTERM signal
|
||||
}
|
||||
```
|
||||
|
||||
```c
|
||||
// C 示例
|
||||
// C example
|
||||
#include <signal.h>
|
||||
|
||||
void handle_sigterm(int sig) {
|
||||
// 清理资源
|
||||
// Clean up resources
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,65 +1,65 @@
|
||||
# Go 项目
|
||||
# Go Project
|
||||
|
||||
Go 项目用于部署使用 Go 语言开发的后端应用,如 Gin、Echo、Fiber 等框架。
|
||||
Go projects are used to deploy backend applications developed with Go language, such as Gin, Echo, Fiber frameworks.
|
||||
|
||||
## 前置要求
|
||||
## Prerequisites
|
||||
|
||||
1. 安装 Go 运行环境:**应用** > **运行环境** > **Go**
|
||||
2. 编译好的 Go 可执行文件或源代码
|
||||
1. Install Go runtime environment: **Applications** > **Runtime Environment** > **Go**
|
||||
2. Compiled Go executable file or source code
|
||||
|
||||
## 部署方式
|
||||
## Deployment Methods
|
||||
|
||||
### 方式一:部署编译好的二进制文件
|
||||
### Method 1: Deploy Compiled Binary File
|
||||
|
||||
1. 在本地编译 Go 项目:
|
||||
1. Compile Go project locally:
|
||||
|
||||
```bash
|
||||
# 交叉编译为 Linux amd64
|
||||
# Cross-compile for Linux amd64
|
||||
GOOS=linux GOARCH=amd64 go build -o myapp
|
||||
```
|
||||
|
||||
2. 上传二进制文件到服务器
|
||||
3. 创建项目,启动命令填写:`./myapp`
|
||||
2. Upload binary file to server
|
||||
3. Create project, fill in start command: `./myapp`
|
||||
|
||||
### 方式二:在服务器上编译
|
||||
### Method 2: Compile on Server
|
||||
|
||||
1. 上传源代码到服务器
|
||||
2. 在终端中编译:
|
||||
1. Upload source code to server
|
||||
2. Compile in terminal:
|
||||
|
||||
```bash
|
||||
cd /opt/ace/project/myapp
|
||||
go build -o myapp
|
||||
```
|
||||
|
||||
3. 创建项目,启动命令填写:`./myapp`
|
||||
3. Create project, fill in start command: `./myapp`
|
||||
|
||||
## 创建 Go 项目
|
||||
## Create Go Project
|
||||
|
||||
1. 进入 **项目** 页面
|
||||
2. 点击 **创建项目**
|
||||
3. 填写配置:
|
||||
- **项目名**:`myapp`
|
||||
- **项目目录**:`/opt/ace/project/myapp`
|
||||
- **启动命令**:`./myapp` 或 `go1.24 run main.go`
|
||||
4. 开启 **反向代理** 以便外部访问
|
||||
1. Go to the **Project** page
|
||||
2. Click **Create Project**
|
||||
3. Fill in configuration:
|
||||
- **Project Name**: `myapp`
|
||||
- **Project Directory**: `/opt/ace/project/myapp`
|
||||
- **Start Command**: `./myapp` or `go1.24 run main.go`
|
||||
4. Enable **Reverse Proxy** for external access
|
||||
|
||||
## 启动命令示例
|
||||
## Start Command Examples
|
||||
|
||||
```bash
|
||||
# 运行编译好的二进制文件
|
||||
# Run compiled binary file
|
||||
./myapp
|
||||
|
||||
# 使用指定版本的 Go 运行
|
||||
# Run with specified Go version
|
||||
go1.24 run main.go
|
||||
|
||||
# 带参数运行
|
||||
# Run with parameters
|
||||
./myapp -port 8080 -config ./config.yaml
|
||||
|
||||
# 设置环境变量
|
||||
# Set environment variables
|
||||
GIN_MODE=release ./myapp
|
||||
```
|
||||
|
||||
## 常用框架
|
||||
## Common Frameworks
|
||||
|
||||
### Gin
|
||||
|
||||
@@ -77,7 +77,7 @@ func main() {
|
||||
}
|
||||
```
|
||||
|
||||
启动命令:`GIN_MODE=release ./myapp`
|
||||
Start command: `GIN_MODE=release ./myapp`
|
||||
|
||||
### Echo
|
||||
|
||||
@@ -113,8 +113,8 @@ func main() {
|
||||
}
|
||||
```
|
||||
|
||||
## 注意事项
|
||||
## Notes
|
||||
|
||||
1. 确保二进制文件有执行权限:`chmod +x myapp`
|
||||
2. 生产环境建议使用编译好的二进制文件,而非 `go run`
|
||||
3. 建议使用环境变量或配置文件管理配置,避免硬编码
|
||||
1. Ensure binary file has execute permission: `chmod +x myapp`
|
||||
2. Production environments are recommended to use compiled binary files, not `go run`
|
||||
3. It is recommended to use environment variables or configuration files to manage configuration, avoid hardcoding
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
# Java 项目
|
||||
# Java Project
|
||||
|
||||
Java 项目用于部署 Spring Boot、Tomcat 等 Java 应用。
|
||||
Java projects are used to deploy Spring Boot, Tomcat, and other Java applications.
|
||||
|
||||
## 前置要求
|
||||
## Prerequisites
|
||||
|
||||
1. 安装 Java 运行环境:**应用** > **运行环境** > **Java**(Corretto JDK)
|
||||
2. 打包好的 JAR 文件或 WAR 文件
|
||||
1. Install Java runtime environment: **Applications** > **Runtime Environment** > **Java** (Corretto JDK)
|
||||
2. Packaged JAR file or WAR file
|
||||
|
||||
## 部署 Spring Boot 应用
|
||||
## Deploy Spring Boot Application
|
||||
|
||||
### 打包项目
|
||||
### Package Project
|
||||
|
||||
```bash
|
||||
# Maven
|
||||
@@ -19,35 +19,35 @@ mvn clean package -DskipTests
|
||||
./gradlew build -x test
|
||||
```
|
||||
|
||||
### 上传并部署
|
||||
### Upload and Deploy
|
||||
|
||||
1. 上传 JAR 文件到服务器(如 `/opt/ace/project/myapp/app.jar`)
|
||||
2. 创建项目:
|
||||
- **项目名**:`myapp`
|
||||
- **项目目录**:`/opt/ace/project/myapp`
|
||||
- **启动命令**:`java21 -jar app.jar`
|
||||
3. 开启 **反向代理**
|
||||
1. Upload JAR file to server (e.g., `/opt/ace/project/myapp/app.jar`)
|
||||
2. Create project:
|
||||
- **Project Name**: `myapp`
|
||||
- **Project Directory**: `/opt/ace/project/myapp`
|
||||
- **Start Command**: `java21 -jar app.jar`
|
||||
3. Enable **Reverse Proxy**
|
||||
|
||||
## 启动命令示例
|
||||
## Start Command Examples
|
||||
|
||||
```bash
|
||||
# 基本启动
|
||||
# Basic startup
|
||||
java21 -jar app.jar
|
||||
|
||||
# 指定配置文件
|
||||
# Specify configuration file
|
||||
java21 -jar app.jar --spring.profiles.active=prod
|
||||
|
||||
# 设置 JVM 参数
|
||||
# Set JVM parameters
|
||||
java21 -Xms512m -Xmx1024m -jar app.jar
|
||||
|
||||
# 指定端口
|
||||
# Specify port
|
||||
java21 -jar app.jar --server.port=8080
|
||||
```
|
||||
|
||||
## JVM 参数建议
|
||||
## JVM Parameter Recommendations
|
||||
|
||||
```bash
|
||||
# 生产环境推荐配置
|
||||
# Recommended production environment configuration
|
||||
java21 \
|
||||
-Xms512m \
|
||||
-Xmx1024m \
|
||||
@@ -56,22 +56,22 @@ java21 \
|
||||
-jar app.jar
|
||||
```
|
||||
|
||||
常用参数说明:
|
||||
Common parameter descriptions:
|
||||
|
||||
| 参数 | 说明 |
|
||||
|------|------|
|
||||
| `-Xms` | 初始堆内存大小 |
|
||||
| `-Xmx` | 最大堆内存大小 |
|
||||
| `-XX:+UseG1GC` | 使用 G1 垃圾收集器 |
|
||||
| `-XX:MaxGCPauseMillis` | 最大 GC 停顿时间 |
|
||||
| Parameter | Description |
|
||||
|-----------|-------------|
|
||||
| `-Xms` | Initial heap memory size |
|
||||
| `-Xmx` | Maximum heap memory size |
|
||||
| `-XX:+UseG1GC` | Use G1 garbage collector |
|
||||
| `-XX:MaxGCPauseMillis` | Maximum GC pause time |
|
||||
|
||||
## 多版本 JDK
|
||||
## Multiple JDK Versions
|
||||
|
||||
AcePanel 支持安装多个 JDK 版本,路径如 `/opt/ace/server/java/{version}/bin/java`,已默认链接 `java{version}` 命令方便使用。
|
||||
AcePanel supports installing multiple JDK versions, paths like `/opt/ace/server/java/{version}/bin/java`, with `java{version}` commands linked by default for convenience.
|
||||
|
||||
## 配置文件
|
||||
## Configuration File
|
||||
|
||||
Spring Boot 配置文件 `application.yml` 示例:
|
||||
Spring Boot configuration file `application.yml` example:
|
||||
|
||||
```yaml
|
||||
server:
|
||||
@@ -84,27 +84,27 @@ spring:
|
||||
password: your_password
|
||||
```
|
||||
|
||||
## 常见问题
|
||||
## FAQ
|
||||
|
||||
### 内存不足
|
||||
### Out of Memory
|
||||
|
||||
增加 JVM 堆内存:
|
||||
Increase JVM heap memory:
|
||||
|
||||
```bash
|
||||
java21 -Xms1g -Xmx2g -jar app.jar
|
||||
```
|
||||
|
||||
### 端口冲突
|
||||
### Port Conflict
|
||||
|
||||
修改启动端口:
|
||||
Modify startup port:
|
||||
|
||||
```bash
|
||||
java21 -jar app.jar --server.port=8081
|
||||
```
|
||||
|
||||
### 启动慢
|
||||
### Slow Startup
|
||||
|
||||
检查是否有外部依赖连接超时,或添加以下参数加速启动:
|
||||
Check if there are external dependency connection timeouts, or add the following parameters to speed up startup:
|
||||
|
||||
```bash
|
||||
-XX:TieredStopAtLevel=1 -noverify
|
||||
|
||||
@@ -1,48 +1,48 @@
|
||||
# Node.js 项目
|
||||
# Node.js Project
|
||||
|
||||
Node.js 项目用于部署 Express、Koa、NestJS、Next.js 等 Node.js 应用。
|
||||
Node.js projects are used to deploy Express, Koa, NestJS, Next.js, and other Node.js applications.
|
||||
|
||||
## 前置要求
|
||||
## Prerequisites
|
||||
|
||||
1. 安装 Node.js 运行环境:**应用** > **运行环境** > **Node.js**
|
||||
2. 项目源代码
|
||||
1. Install Node.js runtime environment: **Applications** > **Runtime Environment** > **Node.js**
|
||||
2. Project source code
|
||||
|
||||
## 部署步骤
|
||||
## Deployment Steps
|
||||
|
||||
1. 上传项目代码到服务器
|
||||
2. 安装依赖:
|
||||
1. Upload project code to server
|
||||
2. Install dependencies:
|
||||
|
||||
```bash
|
||||
cd /opt/ace/project/myapp
|
||||
npm24 install
|
||||
```
|
||||
|
||||
3. 创建项目:
|
||||
- **项目名**:`myapp`
|
||||
- **项目目录**:`/opt/ace/project/myapp`
|
||||
- **启动命令**:`node24 app.js`
|
||||
4. 开启 **反向代理**
|
||||
3. Create project:
|
||||
- **Project Name**: `myapp`
|
||||
- **Project Directory**: `/opt/ace/project/myapp`
|
||||
- **Start Command**: `node24 app.js`
|
||||
4. Enable **Reverse Proxy**
|
||||
|
||||
## 启动命令示例
|
||||
## Start Command Examples
|
||||
|
||||
```bash
|
||||
# 直接运行
|
||||
# Run directly
|
||||
node24 app.js
|
||||
|
||||
# 使用 npm scripts
|
||||
# Use npm scripts
|
||||
npm24 start
|
||||
|
||||
# 使用 npm run
|
||||
# Use npm run
|
||||
npm24 run start:prod
|
||||
|
||||
# 设置环境变量
|
||||
# Set environment variables
|
||||
NODE_ENV=production node24 app.js
|
||||
|
||||
# 指定端口
|
||||
# Specify port
|
||||
PORT=3000 node24 app.js
|
||||
```
|
||||
|
||||
## 常用框架
|
||||
## Common Frameworks
|
||||
|
||||
### Express
|
||||
|
||||
@@ -57,46 +57,46 @@ app.get('/', (req, res) => {
|
||||
app.listen(3000);
|
||||
```
|
||||
|
||||
启动命令:`node24 app.js`
|
||||
Start command: `node24 app.js`
|
||||
|
||||
### NestJS
|
||||
|
||||
```bash
|
||||
# 构建
|
||||
# Build
|
||||
npm24 run build
|
||||
```
|
||||
|
||||
启动命令:`node24 dist/main.js`
|
||||
Start command: `node24 dist/main.js`
|
||||
|
||||
### Next.js
|
||||
|
||||
```bash
|
||||
# 构建
|
||||
# Build
|
||||
npm24 run build
|
||||
```
|
||||
|
||||
启动命令:`npm24 start`
|
||||
Start command: `npm24 start`
|
||||
|
||||
### Nuxt.js
|
||||
|
||||
```bash
|
||||
# 构建
|
||||
# Build
|
||||
npm24 run build
|
||||
```
|
||||
|
||||
启动命令:`node24 .output/server/index.mjs`
|
||||
Start command: `node24 .output/server/index.mjs`
|
||||
|
||||
## 进程管理
|
||||
## Process Management
|
||||
|
||||
AcePanel 使用 systemd 管理 Node.js 进程,自动处理:
|
||||
AcePanel uses systemd to manage Node.js processes, automatically handling:
|
||||
|
||||
- 进程崩溃自动重启
|
||||
- 开机自动启动
|
||||
- 日志记录
|
||||
- Automatic restart on process crash
|
||||
- Automatic startup on boot
|
||||
- Log recording
|
||||
|
||||
## 环境变量
|
||||
## Environment Variables
|
||||
|
||||
推荐使用 `.env` 文件管理环境变量:
|
||||
It is recommended to use `.env` files to manage environment variables:
|
||||
|
||||
```bash
|
||||
# .env
|
||||
@@ -105,31 +105,31 @@ PORT=3000
|
||||
DATABASE_URL=mysql://localhost:3306/mydb
|
||||
```
|
||||
|
||||
使用 `dotenv` 包加载:
|
||||
Load using the `dotenv` package:
|
||||
|
||||
```javascript
|
||||
require('dotenv').config();
|
||||
```
|
||||
|
||||
## 常见问题
|
||||
## FAQ
|
||||
|
||||
### 依赖安装失败
|
||||
### Dependency Installation Failed
|
||||
|
||||
尝试清除缓存重新安装:
|
||||
Try clearing cache and reinstalling:
|
||||
|
||||
```bash
|
||||
rm -rf node_modules package-lock.json
|
||||
npm24 install
|
||||
```
|
||||
|
||||
### 内存不足
|
||||
### Out of Memory
|
||||
|
||||
增加 Node.js 内存限制:
|
||||
Increase Node.js memory limit:
|
||||
|
||||
```bash
|
||||
NODE_OPTIONS="--max-old-space-size=4096" node24 app.js
|
||||
```
|
||||
|
||||
### 端口被占用
|
||||
### Port Already in Use
|
||||
|
||||
修改应用监听的端口,或检查是否有其他进程占用。
|
||||
Modify the port the application listens on, or check if another process is using it.
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
# PHP 项目
|
||||
# PHP Project
|
||||
|
||||
PHP 项目用于部署需要常驻进程的 PHP 应用,如 Laravel Octane、Swoole、Workerman 等。
|
||||
PHP projects are used to deploy PHP applications that require long-running processes, such as Laravel Octane, Swoole, Workerman, etc.
|
||||
|
||||
::: tip 提示
|
||||
传统的 PHP-FPM 应用(如 WordPress、Laravel)应使用 [PHP 网站](../website/php) 方式部署,而非项目。
|
||||
::: tip Tip
|
||||
Traditional PHP-FPM applications (such as WordPress, Laravel) should be deployed using [PHP Website](../website/php), not as projects.
|
||||
:::
|
||||
|
||||
## 适用场景
|
||||
## Use Cases
|
||||
|
||||
- Laravel Octane(Swoole/RoadRunner)
|
||||
- Swoole 应用
|
||||
- Workerman 应用
|
||||
- ReactPHP 应用
|
||||
- 其他需要常驻进程的 PHP 应用
|
||||
- Laravel Octane (Swoole/RoadRunner)
|
||||
- Swoole applications
|
||||
- Workerman applications
|
||||
- ReactPHP applications
|
||||
- Other PHP applications requiring long-running processes
|
||||
|
||||
## 前置要求
|
||||
## Prerequisites
|
||||
|
||||
1. 安装 PHP 运行环境:**应用** > **运行环境** > **PHP**
|
||||
2. 根据需要安装 Swoole 等模块
|
||||
1. Install PHP runtime: **Apps** > **Runtimes** > **PHP**
|
||||
2. Install Swoole or other modules as needed
|
||||
|
||||
## 部署 Laravel Octane
|
||||
## Deploying Laravel Octane
|
||||
|
||||
### 创建项目
|
||||
### Creating a Project
|
||||
|
||||
1. 创建项目:
|
||||
- **项目名**:`myapp`
|
||||
- **项目目录**:`/opt/ace/project/myapp`
|
||||
- **启动命令**:`php84 artisan octane:start --host=0.0.0.0 --port=8000`
|
||||
2. 开启 **反向代理**
|
||||
1. Create project:
|
||||
- **Project Name**: `myapp`
|
||||
- **Project Directory**: `/opt/ace/project/myapp`
|
||||
- **Startup Command**: `php84 artisan octane:start --host=0.0.0.0 --port=8000`
|
||||
2. Enable **Reverse Proxy**
|
||||
|
||||
## 启动命令示例
|
||||
## Startup Command Examples
|
||||
|
||||
```bash
|
||||
# Laravel Octane (Swoole)
|
||||
@@ -48,7 +48,7 @@ php84 start.php start
|
||||
php84 artisan queue:work --daemon
|
||||
```
|
||||
|
||||
## Swoole 应用示例
|
||||
## Swoole Application Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
@@ -62,9 +62,9 @@ $server->on("request", function ($request, $response) {
|
||||
$server->start();
|
||||
```
|
||||
|
||||
启动命令:`php84 server.php`
|
||||
Startup command: `php84 server.php`
|
||||
|
||||
## Workerman 应用示例
|
||||
## Workerman Application Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
@@ -80,18 +80,18 @@ $worker->onMessage = function($connection, $request) {
|
||||
Worker::runAll();
|
||||
```
|
||||
|
||||
启动命令:`php84 start.php start`
|
||||
Startup command: `php84 start.php start`
|
||||
|
||||
## 队列处理
|
||||
## Queue Processing
|
||||
|
||||
Laravel 队列 Worker 也可以作为项目运行:
|
||||
Laravel Queue Worker can also run as a project:
|
||||
|
||||
```bash
|
||||
php84 artisan queue:work --daemon --tries=3
|
||||
```
|
||||
|
||||
## 注意事项
|
||||
## Notes
|
||||
|
||||
1. 常驻进程的 PHP 应用需要注意内存泄漏问题
|
||||
2. 代码更新后需要重启项目才能生效
|
||||
3. 建议配置进程监控,异常时自动重启
|
||||
1. Long-running PHP applications need to be aware of memory leak issues
|
||||
2. Code updates require restarting the project to take effect
|
||||
3. It is recommended to configure process monitoring for automatic restart on exceptions
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
# Python 项目
|
||||
# Python Project
|
||||
|
||||
Python 项目用于部署 Django、Flask、FastAPI 等 Python Web 应用。
|
||||
Python projects are used to deploy Django, Flask, FastAPI, and other Python web applications.
|
||||
|
||||
## 前置要求
|
||||
## Prerequisites
|
||||
|
||||
1. 安装 Python 运行环境:**应用** > **运行环境** > **Python**
|
||||
2. 项目源代码
|
||||
1. Install Python runtime: **Apps** > **Runtimes** > **Python**
|
||||
2. Project source code
|
||||
|
||||
## 部署步骤
|
||||
## Deployment Steps
|
||||
|
||||
1. 上传项目代码到服务器
|
||||
2. 创建虚拟环境并安装依赖:
|
||||
1. Upload project code to the server
|
||||
2. Create virtual environment and install dependencies:
|
||||
|
||||
```bash
|
||||
cd /opt/ace/project/myapp
|
||||
@@ -19,50 +19,50 @@ source venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
3. 创建项目:
|
||||
- **项目名**:`myapp`
|
||||
- **项目目录**:`/opt/ace/project/myapp`
|
||||
- **启动命令**:见下方示例
|
||||
4. 开启 **反向代理**
|
||||
3. Create project:
|
||||
- **Project Name**: `myapp`
|
||||
- **Project Directory**: `/opt/ace/project/myapp`
|
||||
- **Startup Command**: See examples below
|
||||
4. Enable **Reverse Proxy**
|
||||
|
||||
## 启动命令示例
|
||||
## Startup Command Examples
|
||||
|
||||
### Django
|
||||
|
||||
```bash
|
||||
# 开发服务器(不推荐生产使用)
|
||||
# Development server (not recommended for production)
|
||||
/opt/ace/project/myapp/venv/bin/python manage.py runserver 0.0.0.0:8000
|
||||
|
||||
# 使用 Gunicorn(推荐)
|
||||
# Using Gunicorn (recommended)
|
||||
/opt/ace/project/myapp/venv/bin/gunicorn myproject.wsgi:application -b 0.0.0.0:8000 -w 4
|
||||
|
||||
# 使用 uWSGI
|
||||
# Using uWSGI
|
||||
/opt/ace/project/myapp/venv/bin/uwsgi --http 0.0.0.0:8000 --module myproject.wsgi
|
||||
```
|
||||
|
||||
### Flask
|
||||
|
||||
```bash
|
||||
# 开发服务器(不推荐生产使用)
|
||||
# Development server (not recommended for production)
|
||||
/opt/ace/project/myapp/venv/bin/python app.py
|
||||
|
||||
# 使用 Gunicorn(推荐)
|
||||
# Using Gunicorn (recommended)
|
||||
/opt/ace/project/myapp/venv/bin/gunicorn app:app -b 0.0.0.0:8000 -w 4
|
||||
```
|
||||
|
||||
### FastAPI
|
||||
|
||||
```bash
|
||||
# 使用 Uvicorn
|
||||
# Using Uvicorn
|
||||
/opt/ace/project/myapp/venv/bin/uvicorn main:app --host 0.0.0.0 --port 8000
|
||||
|
||||
# 使用 Gunicorn + Uvicorn Workers(推荐)
|
||||
# Using Gunicorn + Uvicorn Workers (recommended)
|
||||
/opt/ace/project/myapp/venv/bin/gunicorn main:app -b 0.0.0.0:8000 -w 4 -k uvicorn.workers.UvicornWorker
|
||||
```
|
||||
|
||||
## 常用框架配置
|
||||
## Common Framework Configurations
|
||||
|
||||
### Django 生产配置
|
||||
### Django Production Configuration
|
||||
|
||||
`settings.py`:
|
||||
|
||||
@@ -72,13 +72,13 @@ ALLOWED_HOSTS = ['your-domain.com']
|
||||
STATIC_ROOT = '/opt/ace/project/myapp/static/'
|
||||
```
|
||||
|
||||
收集静态文件:
|
||||
Collect static files:
|
||||
|
||||
```bash
|
||||
/opt/ace/project/myapp/venv/bin/python manage.py collectstatic
|
||||
```
|
||||
|
||||
### FastAPI 示例
|
||||
### FastAPI Example
|
||||
|
||||
```python
|
||||
from fastapi import FastAPI
|
||||
@@ -90,47 +90,47 @@ def read_root():
|
||||
return {"Hello": "World"}
|
||||
```
|
||||
|
||||
## Gunicorn 配置
|
||||
## Gunicorn Configuration
|
||||
|
||||
创建 `gunicorn.conf.py`:
|
||||
Create `gunicorn.conf.py`:
|
||||
|
||||
```python
|
||||
bind = "0.0.0.0:8000"
|
||||
workers = 4
|
||||
worker_class = "sync" # 或 "uvicorn.workers.UvicornWorker" for FastAPI
|
||||
worker_class = "sync" # Or "uvicorn.workers.UvicornWorker" for FastAPI
|
||||
timeout = 30
|
||||
keepalive = 2
|
||||
```
|
||||
|
||||
启动命令:
|
||||
Startup command:
|
||||
|
||||
```bash
|
||||
/opt/ace/project/myapp/venv/bin/gunicorn -c gunicorn.conf.py myproject.wsgi:application
|
||||
```
|
||||
|
||||
## 虚拟环境
|
||||
## Virtual Environment
|
||||
|
||||
强烈建议使用虚拟环境隔离项目依赖:
|
||||
It is strongly recommended to use virtual environments to isolate project dependencies:
|
||||
|
||||
```bash
|
||||
# 创建虚拟环境
|
||||
# Create virtual environment
|
||||
python3.13 -m venv venv
|
||||
|
||||
# 激活虚拟环境
|
||||
# Activate virtual environment
|
||||
source venv/bin/activate
|
||||
|
||||
# 安装依赖
|
||||
# Install dependencies
|
||||
pip install -r requirements.txt
|
||||
|
||||
# 退出虚拟环境
|
||||
# Deactivate virtual environment
|
||||
deactivate
|
||||
```
|
||||
|
||||
## 常见问题
|
||||
## Common Issues
|
||||
|
||||
### 依赖安装失败
|
||||
### Dependency Installation Failed
|
||||
|
||||
某些包需要编译,确保安装了必要的系统依赖:
|
||||
Some packages require compilation, ensure necessary system dependencies are installed:
|
||||
|
||||
```bash
|
||||
# AlmaLinux/Rocky Linux
|
||||
@@ -140,10 +140,10 @@ yum install gcc python3-devel
|
||||
apt install gcc python3-dev
|
||||
```
|
||||
|
||||
### 静态文件 404
|
||||
### Static Files 404
|
||||
|
||||
Django 生产环境需要配置 Nginx 直接提供静态文件,或使用 WhiteNoise。
|
||||
Django production environment needs to configure Nginx to serve static files directly, or use WhiteNoise.
|
||||
|
||||
### 数据库连接问题
|
||||
### Database Connection Issues
|
||||
|
||||
检查数据库配置和网络连接,确保数据库服务正常运行。
|
||||
Check database configuration and network connection, ensure the database service is running properly.
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
# 安全建议
|
||||
# Security Recommendations
|
||||
|
||||
## 网站安全
|
||||
## Website Security
|
||||
|
||||
大多数入侵和挂马事件源于程序漏洞,与面板或环境无关。
|
||||
Most intrusion and malware incidents originate from program vulnerabilities, unrelated to the panel or environment.
|
||||
|
||||
- 不使用盗版程序,因为无法确认是否被篡改
|
||||
- 及时更新网站程序和运行环境
|
||||
- 后台密码使用随机生成的 20 位以上混合字符,启用两步验证
|
||||
- 配置定时备份
|
||||
- 保留 PHP 默认禁用的高危函数(`disable_functions`)
|
||||
- Do not use pirated programs, as you cannot confirm whether they have been tampered with
|
||||
- Update website programs and runtime environments promptly
|
||||
- Use randomly generated passwords of 20+ mixed characters for admin panels, enable two-factor authentication
|
||||
- Configure scheduled backups
|
||||
- Keep PHP's default disabled high-risk functions (`disable_functions`)
|
||||
|
||||
## 系统安全
|
||||
## System Security
|
||||
|
||||
- 定期更新系统:`dnf update` 或 `apt upgrade`
|
||||
- SSH 禁用默认 22 端口,使用强密码或密钥认证
|
||||
- 安装 Fail2ban 防止暴力破解
|
||||
- 不随意设置 777 权限或给 www 用户执行权限
|
||||
- 有 VNC 的情况下可考虑关闭 SSH
|
||||
- Update the system regularly: `dnf update` or `apt upgrade`
|
||||
- Disable the default SSH port 22, use strong passwords or key authentication
|
||||
- Install Fail2ban to prevent brute force attacks
|
||||
- Do not arbitrarily set 777 permissions or give the www user execute permissions
|
||||
- Consider disabling SSH if VNC is available
|
||||
|
||||
## 面板安全
|
||||
## Panel Security
|
||||
|
||||
AcePanel 拥有 root 权限,需重点保护。
|
||||
AcePanel has root privileges and needs to be protected carefully.
|
||||
|
||||
- 保持面板和应用更新
|
||||
- 修改默认端口,使用强密码
|
||||
- 启用安全入口,开启 HTTPS
|
||||
- 内部服务端口(Redis 6379、MySQL 3306、PostgreSQL 5432 等)不要对外开放
|
||||
- 高安全要求场景可在不使用时停止面板进程,不影响已部署的服务
|
||||
- Keep the panel and applications updated
|
||||
- Change the default port, use strong passwords
|
||||
- Enable security entrance, enable HTTPS
|
||||
- Do not expose internal service ports (Redis 6379, MySQL 3306, PostgreSQL 5432, etc.) to the public
|
||||
- For high security requirements, you can stop the panel process when not in use without affecting deployed services
|
||||
|
||||
@@ -1,58 +1,58 @@
|
||||
# 基本设置
|
||||
# Basic Settings
|
||||
|
||||
基本设置页面用于配置面板的基础参数。
|
||||
The basic settings page is used to configure the panel's basic parameters.
|
||||
|
||||

|
||||

|
||||
|
||||
## 面板名称
|
||||
## Panel Name
|
||||
|
||||
自定义面板显示的名称,默认为 "AcePanel"。修改后刷新页面会显示在浏览器标题和面板左上角。
|
||||
Customize the name displayed by the panel, default is "AcePanel". After modification, refresh the page to see it displayed in the browser title and the top left corner of the panel.
|
||||
|
||||
## 语言
|
||||
## Language
|
||||
|
||||
选择面板界面语言:
|
||||
Select the panel interface language:
|
||||
|
||||
- 简体中文
|
||||
- 繁体中文
|
||||
- Simplified Chinese
|
||||
- Traditional Chinese
|
||||
- English
|
||||
|
||||
## 更新渠道
|
||||
## Update Channel
|
||||
|
||||
选择面板更新的版本渠道:
|
||||
Select the version channel for panel updates:
|
||||
|
||||
- **稳定版**:经过充分测试的正式版本,推荐生产环境使用
|
||||
- **测试版**:包含最新功能但可能存在问题,适合尝鲜用户
|
||||
- **Stable**: Fully tested official versions, recommended for production environments
|
||||
- **Beta**: Contains the latest features but may have issues, suitable for early adopters
|
||||
|
||||
## 端口
|
||||
## Port
|
||||
|
||||
面板的访问端口,默认为 8888。修改端口后需要:
|
||||
The access port for the panel, default is 8888. After changing the port:
|
||||
|
||||
1. 确保新端口未被占用
|
||||
2. 在服务器安全组中开放新端口
|
||||
3. 保存后面板会自动重启
|
||||
1. Ensure the new port is not occupied
|
||||
2. Open the new port in the server security group
|
||||
3. The panel will automatically restart after saving
|
||||
|
||||
::: warning 注意
|
||||
修改端口前请确保服务器安全组已开放新端口,否则可能无法访问面板。
|
||||
::: warning Note
|
||||
Before changing the port, please ensure the new port is open in the server security group, otherwise you may be unable to access the panel.
|
||||
:::
|
||||
|
||||
## 默认目录
|
||||
## Default Directories
|
||||
|
||||
配置各类资源的默认存储路径:
|
||||
Configure the default storage paths for various resources:
|
||||
|
||||
| 设置项 | 默认值 | 说明 |
|
||||
|--------|--------|------|
|
||||
| 默认网站目录 | /opt/ace/sites | 网站文件存放目录 |
|
||||
| 默认备份目录 | /opt/ace/backup | 备份文件存放目录 |
|
||||
| 默认项目目录 | /opt/ace/projects | 项目文件存放目录 |
|
||||
| Setting | Default Value | Description |
|
||||
|---------|---------------|-------------|
|
||||
| Default Website Directory | /opt/ace/sites | Directory for storing website files |
|
||||
| Default Backup Directory | /opt/ace/backup | Directory for storing backup files |
|
||||
| Default Project Directory | /opt/ace/projects | Directory for storing project files |
|
||||
|
||||
修改目录后,新创建的网站/备份/项目会使用新目录,已有的不受影响。
|
||||
After changing directories, newly created websites/backups/projects will use the new directory, existing ones are not affected.
|
||||
|
||||
## 自定义 Logo
|
||||
## Custom Logo
|
||||
|
||||
输入图片的完整 URL 地址,可以替换面板左上角的 Logo。支持 PNG、JPG、SVG 等格式。
|
||||
Enter the full URL of an image to replace the logo in the top left corner of the panel. Supports PNG, JPG, SVG, and other formats.
|
||||
|
||||
## 隐藏菜单
|
||||
## Hide Menu
|
||||
|
||||
选择要隐藏的菜单项。隐藏后的菜单不会显示在左侧导航栏中,但功能仍然可用(通过直接访问 URL)。
|
||||
Select menu items to hide. Hidden menus will not be displayed in the left navigation bar, but the features are still available (by directly accessing the URL).
|
||||
|
||||
适用于简化界面或限制普通用户可见的功能范围。
|
||||
Suitable for simplifying the interface or limiting the range of features visible to regular users.
|
||||
|
||||
@@ -1,97 +1,97 @@
|
||||
# 安全设置
|
||||
# Security Settings
|
||||
|
||||
安全设置页面用于配置面板的安全相关选项,保护面板免受未授权访问。
|
||||
The security settings page is used to configure panel security-related options to protect the panel from unauthorized access.
|
||||
|
||||

|
||||

|
||||
|
||||
## 登录超时
|
||||
## Login Timeout
|
||||
|
||||
设置登录会话的有效时间,单位为分钟。超过该时间未操作将自动退出登录,需要重新认证。
|
||||
Set the validity period of login sessions in minutes. If there is no activity beyond this time, you will be automatically logged out and need to re-authenticate.
|
||||
|
||||
默认值为 120 分钟。
|
||||
The default value is 120 minutes.
|
||||
|
||||
## 访问入口
|
||||
## Access Entry
|
||||
|
||||
设置面板的访问路径,设置访问入口后需要通过 `https://IP:端口/入口路径` 才能访问。
|
||||
Set the access path for the panel. After setting the access entry, you need to access via `https://IP:port/entry-path`.
|
||||
|
||||
例如设置为 `/admin`,则访问地址变为 `https://IP:端口/admin`。
|
||||
For example, if set to `/admin`, the access address becomes `https://IP:port/admin`.
|
||||
|
||||
这是一个简单但有效的安全措施,可以防止面板被扫描器发现。
|
||||
This is a simple but effective security measure that can prevent the panel from being discovered by scanners.
|
||||
|
||||
## 入口错误页
|
||||
## Entry Error Page
|
||||
|
||||
当访问错误的入口路径时返回的 HTTP 状态码:
|
||||
The HTTP status code returned when accessing an incorrect entry path:
|
||||
|
||||
- **418 I'm a teapot**:返回一个有趣的错误码与错误页
|
||||
- **Nginx 404**:返回 Nginx 同款 404 页面
|
||||
- **关闭连接**:直接关闭连接不返回任何内容
|
||||
- **418 I'm a teapot**: Returns an interesting error code and error page
|
||||
- **Nginx 404**: Returns the same 404 page as Nginx
|
||||
- **Close Connection**: Closes the connection directly without returning any content
|
||||
|
||||
## 登录验证码
|
||||
## Login Captcha
|
||||
|
||||
开启后登录时多次输入错误密码会触发验证码,防止暴力破解。
|
||||
When enabled, entering the wrong password multiple times during login will trigger a captcha to prevent brute force attacks.
|
||||
|
||||
## 请求 IP 头
|
||||
## Request IP Header
|
||||
|
||||
当面板部署在反向代理(如 Nginx、CDN)后面时,需要设置正确的 IP 头才能获取真实的客户端 IP。
|
||||
When the panel is deployed behind a reverse proxy (such as Nginx, CDN), you need to set the correct IP header to obtain the real client IP.
|
||||
|
||||
常用值:
|
||||
- `X-Real-IP`:Nginx 默认使用
|
||||
- `X-Forwarded-For`:标准代理头
|
||||
- `CF-Connecting-IP`:Cloudflare 使用
|
||||
Common values:
|
||||
- `X-Real-IP`: Default used by Nginx
|
||||
- `X-Forwarded-For`: Standard proxy header
|
||||
- `CF-Connecting-IP`: Used by Cloudflare
|
||||
|
||||
## 绑定域名
|
||||
## Bind Domain
|
||||
|
||||
限制只能通过指定域名访问面板。添加域名后,通过 IP 或其他域名将无法访问。
|
||||
Restrict panel access to specified domains only. After adding a domain, access via IP or other domains will be blocked.
|
||||
|
||||
适用于:
|
||||
- 提高安全性
|
||||
- 配合 SSL 证书使用
|
||||
Suitable for:
|
||||
- Improving security
|
||||
- Using with SSL certificates
|
||||
|
||||
## 绑定 IP
|
||||
## Bind IP
|
||||
|
||||
限制只能从指定 IP 地址访问面板。可以添加多个 IP 地址。
|
||||
Restrict panel access to specified IP addresses only. Multiple IP addresses can be added.
|
||||
|
||||
适用于:
|
||||
- 固定办公网络
|
||||
- 跳板机访问
|
||||
Suitable for:
|
||||
- Fixed office networks
|
||||
- Jump server access
|
||||
|
||||
::: warning 注意
|
||||
绑定 IP 前请确保你的 IP 地址是固定的,否则可能导致无法访问面板。
|
||||
::: warning Note
|
||||
Before binding IP, please ensure your IP address is static, otherwise you may be unable to access the panel.
|
||||
:::
|
||||
|
||||
## 绑定 UA
|
||||
## Bind UA
|
||||
|
||||
限制只能使用指定 User-Agent 的浏览器访问面板。
|
||||
Restrict panel access to browsers with specified User-Agent only.
|
||||
|
||||
这是一个高级安全选项,可以配合自定义浏览器插件使用。
|
||||
This is an advanced security option that can be used with custom browser plugins.
|
||||
|
||||
## 离线模式
|
||||
## Offline Mode
|
||||
|
||||
开启后面板将不会连接外部网络,包括:
|
||||
- 检查更新
|
||||
- 下载应用
|
||||
- 同步缓存数据
|
||||
When enabled, the panel will not connect to external networks, including:
|
||||
- Checking for updates
|
||||
- Downloading applications
|
||||
- Syncing cache data
|
||||
|
||||
适用于内网环境或有严格网络限制的场景。
|
||||
Suitable for intranet environments or scenarios with strict network restrictions.
|
||||
|
||||
## 自动更新
|
||||
## Auto Update
|
||||
|
||||
开启后面板会每日自动检查并安装更新。建议保持开启以获取最新的安全修复。
|
||||
When enabled, the panel will automatically check and install updates daily. It is recommended to keep this enabled to receive the latest security fixes.
|
||||
|
||||
## 面板 HTTPS
|
||||
## Panel HTTPS
|
||||
|
||||
为面板启用 HTTPS 加密访问:
|
||||
Enable HTTPS encrypted access for the panel:
|
||||
|
||||
- **禁用**:使用 HTTP 访问
|
||||
- **ACME(自动)**:自动申请和续签 Let's Encrypt 证书,需要 IP 支持 80 端口访问
|
||||
- **自定义证书**:使用自己的 SSL 证书
|
||||
- **Disabled**: Access via HTTP
|
||||
- **ACME (Auto)**: Automatically apply for and renew Let's Encrypt certificates, requires IP to support port 80 access
|
||||
- **Custom Certificate**: Use your own SSL certificate
|
||||
|
||||
::: tip 推荐
|
||||
生产环境建议启用 HTTPS,保护登录凭据和敏感数据的传输安全。
|
||||
::: tip Recommended
|
||||
It is recommended to enable HTTPS in production environments to protect the transmission security of login credentials and sensitive data.
|
||||
:::
|
||||
|
||||
## 面板公网 IP
|
||||
## Panel Public IP
|
||||
|
||||
配置面板的公网 IP 地址,目前主要用于向 Let's Encrypt 申请 IP 证书。
|
||||
Configure the public IP address of the panel, currently mainly used for applying IP certificates from Let's Encrypt.
|
||||
|
||||
支持 IPv4 和 IPv6 地址。
|
||||
Supports both IPv4 and IPv6 addresses.
|
||||
|
||||
@@ -1,74 +1,74 @@
|
||||
# 用户管理
|
||||
# User Management
|
||||
|
||||
用户管理页面用于管理面板的登录用户。
|
||||
The user management page is used to manage panel login users.
|
||||
|
||||

|
||||

|
||||
|
||||
## 用户列表
|
||||
## User List
|
||||
|
||||
列表显示所有面板用户的信息:
|
||||
The list displays information for all panel users:
|
||||
|
||||
| 字段 | 说明 |
|
||||
|------|------|
|
||||
| 用户名 | 登录用户名,可直接在表格中修改 |
|
||||
| 邮箱 | 用户邮箱,用于找回密码等功能 |
|
||||
| 两步验证 | 是否启用 TOTP 两步验证 |
|
||||
| 创建时间 | 用户创建时间 |
|
||||
| Field | Description |
|
||||
|-------|-------------|
|
||||
| Username | Login username, can be modified directly in the table |
|
||||
| Email | User email, used for password recovery and other features |
|
||||
| Two-Factor Auth | Whether TOTP two-factor authentication is enabled |
|
||||
| Created At | User creation time |
|
||||
|
||||
## 创建用户
|
||||
## Create User
|
||||
|
||||
点击 **创建用户** 按钮添加新用户:
|
||||
Click the **Create User** button to add a new user:
|
||||
|
||||

|
||||

|
||||
|
||||
填写以下信息:
|
||||
Fill in the following information:
|
||||
|
||||
- **用户名**:登录用户名
|
||||
- **密码**:登录密码
|
||||
- **邮箱**:用户邮箱地址
|
||||
- **Username**: Login username
|
||||
- **Password**: Login password
|
||||
- **Email**: User email address
|
||||
|
||||
## 用户操作
|
||||
## User Operations
|
||||
|
||||
### 访问令牌
|
||||
### Access Token
|
||||
|
||||
生成 API 访问令牌,用于通过 API 接口访问面板功能。
|
||||
Generate an API access token for accessing panel features through the API interface.
|
||||
|
||||
令牌具有与用户相同的权限,请妥善保管。
|
||||
The token has the same permissions as the user, please keep it safe.
|
||||
|
||||
### 更改密码
|
||||
### Change Password
|
||||
|
||||
修改用户的登录密码。建议定期更换密码。
|
||||
Change the user's login password. It is recommended to change passwords regularly.
|
||||
|
||||
### 删除用户
|
||||
### Delete User
|
||||
|
||||
删除用户账号。删除后该用户将无法登录面板。
|
||||
Delete the user account. After deletion, the user will no longer be able to log in to the panel.
|
||||
|
||||
::: warning 注意
|
||||
至少需要保留一个用户,无法删除最后一个用户。
|
||||
::: warning Note
|
||||
At least one user must be retained, the last user cannot be deleted.
|
||||
:::
|
||||
|
||||
## 两步验证
|
||||
## Two-Factor Authentication
|
||||
|
||||
两步验证(2FA)为账号提供额外的安全保护。启用后登录时除了密码还需要输入动态验证码。
|
||||
Two-factor authentication (2FA) provides additional security protection for accounts. When enabled, a dynamic verification code is required in addition to the password during login.
|
||||
|
||||
### 启用两步验证
|
||||
### Enable Two-Factor Authentication
|
||||
|
||||
1. 点击两步验证开关
|
||||
2. 使用 Google Authenticator、Microsoft Authenticator 等应用扫描二维码
|
||||
3. 输入应用显示的 6 位验证码确认
|
||||
1. Click the two-factor authentication switch
|
||||
2. Use Google Authenticator, Microsoft Authenticator, or other apps to scan the QR code
|
||||
3. Enter the 6-digit verification code displayed in the app to confirm
|
||||
|
||||
### 支持的验证器应用
|
||||
### Supported Authenticator Apps
|
||||
|
||||
- Google Authenticator
|
||||
- Microsoft Authenticator
|
||||
- Authy
|
||||
- 1Password
|
||||
- 其他支持 TOTP 的应用
|
||||
- Other apps supporting TOTP
|
||||
|
||||
## 安全建议
|
||||
## Security Recommendations
|
||||
|
||||
1. 使用强密码,包含大小写字母、数字和特殊字符
|
||||
2. 启用两步验证
|
||||
3. 定期更换密码
|
||||
4. 不要共享账号
|
||||
5. 及时删除不再使用的账号
|
||||
1. Use strong passwords containing uppercase and lowercase letters, numbers, and special characters
|
||||
2. Enable two-factor authentication
|
||||
3. Change passwords regularly
|
||||
4. Do not share accounts
|
||||
5. Promptly delete accounts that are no longer in use
|
||||
|
||||
@@ -1,96 +1,96 @@
|
||||
# 终端
|
||||
# Terminal
|
||||
|
||||
终端模块提供了基于 Web 的 SSH 终端,可以直接在浏览器中连接服务器执行命令。
|
||||
The terminal module provides a Web-based SSH terminal, allowing you to connect to servers and execute commands directly in the browser.
|
||||
|
||||
## 终端页面
|
||||
## Terminal Page
|
||||
|
||||

|
||||

|
||||
|
||||
## 创建主机
|
||||
## Create Host
|
||||
|
||||
点击 **创建主机** 按钮添加 SSH 连接:
|
||||
Click the **Create Host** button to add an SSH connection:
|
||||
|
||||
### 配置项
|
||||
### Configuration Items
|
||||
|
||||
- **名称**:连接名称,用于标识
|
||||
- **主机**:服务器 IP 地址或域名
|
||||
- **端口**:SSH 端口,默认 22
|
||||
- **认证方式**:密码或密钥
|
||||
- **用户名**:SSH 用户名
|
||||
- **密码/密钥**:认证凭证
|
||||
- **备注**:可选备注
|
||||
- **Name**: Connection name for identification
|
||||
- **Host**: Server IP address or domain name
|
||||
- **Port**: SSH port, default 22
|
||||
- **Authentication Method**: Password or key
|
||||
- **Username**: SSH username
|
||||
- **Password/Key**: Authentication credentials
|
||||
- **Remarks**: Optional remarks
|
||||
|
||||
### 认证方式
|
||||
### Authentication Methods
|
||||
|
||||
| 方式 | 说明 |
|
||||
|------|------|
|
||||
| 密码 | 使用用户名和密码认证 |
|
||||
| 密钥 | 使用 SSH 私钥认证 |
|
||||
| Method | Description |
|
||||
|--------|-------------|
|
||||
| Password | Authenticate using username and password |
|
||||
| Key | Authenticate using SSH private key |
|
||||
|
||||
::: tip 推荐
|
||||
生产环境建议使用密钥认证,更加安全。
|
||||
::: tip Recommendation
|
||||
Production environments are recommended to use key authentication for better security.
|
||||
:::
|
||||
|
||||
## 连接服务器
|
||||
## Connect to Server
|
||||
|
||||
1. 在左侧主机列表中选择要连接的主机
|
||||
2. 点击主机名称打开终端
|
||||
3. 开始执行命令
|
||||
1. Select the host to connect to in the left host list
|
||||
2. Click the host name to open the terminal
|
||||
3. Start executing commands
|
||||
|
||||
## 终端功能
|
||||
## Terminal Features
|
||||
|
||||
### 多标签
|
||||
### Multiple Tabs
|
||||
|
||||
支持同时打开多个终端标签,方便在多个会话间切换。
|
||||
Supports opening multiple terminal tabs simultaneously for easy switching between sessions.
|
||||
|
||||
### 复制粘贴
|
||||
### Copy and Paste
|
||||
|
||||
- **复制**:选中文本后自动复制,或使用 `Ctrl+Shift+C`
|
||||
- **粘贴**:右键粘贴,或使用 `Ctrl+Shift+V`
|
||||
- **Copy**: Automatically copies when text is selected, or use `Ctrl+Shift+C`
|
||||
- **Paste**: Right-click to paste, or use `Ctrl+Shift+V`
|
||||
|
||||
### 全屏模式
|
||||
### Fullscreen Mode
|
||||
|
||||
点击全屏按钮可以进入全屏模式,获得更大的终端空间。
|
||||
Click the fullscreen button to enter fullscreen mode for more terminal space.
|
||||
|
||||
### 字体设置
|
||||
### Font Settings
|
||||
|
||||
可以调整终端的字体大小和字体类型。
|
||||
You can adjust the terminal font size and font type.
|
||||
|
||||
## 本地终端
|
||||
## Local Terminal
|
||||
|
||||
默认会显示本地服务器的终端连接,可以直接连接到当前服务器。
|
||||
By default, a local server terminal connection is displayed, allowing direct connection to the current server.
|
||||
|
||||
## 远程主机
|
||||
## Remote Hosts
|
||||
|
||||
可以添加多个远程主机,方便管理多台服务器:
|
||||
You can add multiple remote hosts for convenient management of multiple servers:
|
||||
|
||||
1. 点击 **创建主机**
|
||||
2. 填写远程服务器信息
|
||||
3. 保存后在列表中选择连接
|
||||
1. Click **Create Host**
|
||||
2. Fill in remote server information
|
||||
3. After saving, select to connect from the list
|
||||
|
||||
## 安全建议
|
||||
## Security Recommendations
|
||||
|
||||
1. 使用强密码或密钥认证
|
||||
2. 修改默认 SSH 端口
|
||||
3. 限制 SSH 访问的 IP 地址
|
||||
4. 定期更换密码或密钥
|
||||
5. 使用非 root 用户登录
|
||||
1. Use strong passwords or key authentication
|
||||
2. Change the default SSH port
|
||||
3. Restrict IP addresses that can access SSH
|
||||
4. Regularly change passwords or keys
|
||||
5. Log in with a non-root user
|
||||
|
||||
## 常见问题
|
||||
## FAQ
|
||||
|
||||
### 连接超时
|
||||
### Connection Timeout
|
||||
|
||||
- 检查服务器 IP 和端口是否正确
|
||||
- 检查防火墙是否允许 SSH 连接
|
||||
- 检查 SSH 服务是否正常运行
|
||||
- Check if the server IP and port are correct
|
||||
- Check if the firewall allows SSH connections
|
||||
- Check if the SSH service is running normally
|
||||
|
||||
### 认证失败
|
||||
### Authentication Failed
|
||||
|
||||
- 检查用户名和密码是否正确
|
||||
- 检查密钥格式是否正确
|
||||
- 检查用户是否有 SSH 登录权限
|
||||
- Check if the username and password are correct
|
||||
- Check if the key format is correct
|
||||
- Check if the user has SSH login permissions
|
||||
|
||||
### 中文乱码
|
||||
### Chinese Character Garbled
|
||||
|
||||
- 检查服务器的 locale 设置
|
||||
- 确保服务器编码为 UTF-8
|
||||
- Check the server's locale settings
|
||||
- Ensure the server encoding is UTF-8
|
||||
|
||||
@@ -1,84 +1,84 @@
|
||||
# 面板任务
|
||||
# Panel Tasks
|
||||
|
||||
面板任务显示 AcePanel 执行的后台任务,如应用安装、环境安装等。
|
||||
Panel tasks display background tasks executed by AcePanel, such as application installation, environment installation, etc.
|
||||
|
||||
## 任务列表
|
||||
## Task List
|
||||
|
||||
进入 **任务** > **面板任务** 标签页查看面板任务列表。
|
||||
Go to **Tasks** > **Panel Tasks** tab to view the panel task list.
|
||||
|
||||

|
||||

|
||||
|
||||
列表显示以下信息:
|
||||
The list displays the following information:
|
||||
|
||||
- **任务名称**:任务描述
|
||||
- **状态**:运行中/已完成/失败
|
||||
- **创建时间**:任务开始时间
|
||||
- **完成时间**:任务结束时间
|
||||
- **操作**:查看日志、删除
|
||||
- **Task Name**: Task description
|
||||
- **Status**: Running/Completed/Failed
|
||||
- **Created At**: Task start time
|
||||
- **Completed At**: Task end time
|
||||
- **Actions**: View logs, delete
|
||||
|
||||
## 任务状态
|
||||
## Task Status
|
||||
|
||||
| 状态 | 说明 |
|
||||
|------|------|
|
||||
| 运行中 | 任务正在执行 |
|
||||
| 已完成 | 任务执行成功 |
|
||||
| 失败 | 任务执行失败 |
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| Running | Task is being executed |
|
||||
| Completed | Task executed successfully |
|
||||
| Failed | Task execution failed |
|
||||
|
||||
## 常见任务类型
|
||||
## Common Task Types
|
||||
|
||||
### 应用安装
|
||||
### Application Installation
|
||||
|
||||
安装原生应用时会创建安装任务:
|
||||
- 安装应用 Nginx
|
||||
- 安装应用 MySQL
|
||||
- 安装应用 Docker
|
||||
Installation tasks are created when installing native applications:
|
||||
- Install application Nginx
|
||||
- Install application MySQL
|
||||
- Install application Docker
|
||||
|
||||
### 应用卸载
|
||||
### Application Uninstallation
|
||||
|
||||
卸载应用时会创建卸载任务:
|
||||
- 卸载应用 MariaDB
|
||||
- 卸载应用 Redis
|
||||
Uninstallation tasks are created when uninstalling applications:
|
||||
- Uninstall application MariaDB
|
||||
- Uninstall application Redis
|
||||
|
||||
### 环境安装
|
||||
### Environment Installation
|
||||
|
||||
安装运行环境时会创建安装任务:
|
||||
- 安装环境 PHP 8.4
|
||||
- 安装环境 Node.js 20
|
||||
- 安装环境 Go 1.24
|
||||
Installation tasks are created when installing runtime environments:
|
||||
- Install environment PHP 8.4
|
||||
- Install environment Node.js 20
|
||||
- Install environment Go 1.24
|
||||
|
||||
## 查看日志
|
||||
## View Logs
|
||||
|
||||
点击 **日志** 按钮查看任务的详细执行日志,包括:
|
||||
- 命令输出
|
||||
- 错误信息
|
||||
Click the **Logs** button to view detailed execution logs of the task, including:
|
||||
- Command output
|
||||
- Error messages
|
||||
|
||||
日志对于排查任务失败原因非常有用。
|
||||
Logs are very useful for troubleshooting task failure causes.
|
||||
|
||||
## 删除任务
|
||||
## Delete Task
|
||||
|
||||
已完成或失败的任务可以删除。运行中的任务无法删除。
|
||||
Completed or failed tasks can be deleted. Running tasks cannot be deleted.
|
||||
|
||||
::: tip 提示
|
||||
删除任务只是从列表中移除记录,不会影响已安装的应用或环境。
|
||||
::: tip Tip
|
||||
Deleting a task only removes the record from the list, it does not affect installed applications or environments.
|
||||
:::
|
||||
|
||||
## 任务失败处理
|
||||
## Handling Task Failures
|
||||
|
||||
如果任务失败:
|
||||
If a task fails:
|
||||
|
||||
1. 点击 **日志** 查看错误信息
|
||||
2. 根据错误信息排查问题
|
||||
3. 解决问题后重新执行操作
|
||||
1. Click **Logs** to view error messages
|
||||
2. Troubleshoot the problem based on error messages
|
||||
3. Re-execute the operation after resolving the issue
|
||||
|
||||
常见失败原因:
|
||||
- 网络问题导致下载失败
|
||||
- 磁盘空间不足
|
||||
- 依赖包缺失
|
||||
- 端口被占用
|
||||
Common failure causes:
|
||||
- Network issues causing download failures
|
||||
- Insufficient disk space
|
||||
- Missing dependencies
|
||||
- Port already in use
|
||||
|
||||
## 注意事项
|
||||
## Notes
|
||||
|
||||
1. 安装任务可能需要较长时间,请耐心等待
|
||||
2. 任务执行期间可以关闭浏览器
|
||||
3. 如果任务长时间无响应,可以刷新页面查看状态
|
||||
4. 建议定期清理已完成的任务记录
|
||||
1. Installation tasks may take a long time, please be patient
|
||||
2. You can close the browser while tasks are executing
|
||||
3. If a task is unresponsive for a long time, you can refresh the page to check the status
|
||||
4. It is recommended to regularly clean up completed task records
|
||||
|
||||
@@ -1,118 +1,118 @@
|
||||
# 计划任务
|
||||
# Scheduled Tasks
|
||||
|
||||
计划任务用于设置定时执行的任务,如定时备份、定时执行脚本等。
|
||||
Scheduled tasks are used to set up tasks that execute at specified times, such as scheduled backups, scheduled script execution, etc.
|
||||
|
||||
## 任务列表
|
||||
## Task List
|
||||
|
||||
进入 **任务** 页面,默认显示计划任务列表。
|
||||
Go to the **Tasks** page, which displays the scheduled task list by default.
|
||||
|
||||

|
||||

|
||||
|
||||
列表显示以下信息:
|
||||
The list displays the following information:
|
||||
|
||||
- **任务名称**:任务名称
|
||||
- **任务类型**:Shell/备份等
|
||||
- **已启用**:是否启用
|
||||
- **任务周期**:执行周期
|
||||
- **创建时间**:创建时间
|
||||
- **最后更新时间**:最后执行时间
|
||||
- **操作**:编辑、执行、删除等
|
||||
- **Task Name**: Task name
|
||||
- **Task Type**: Shell/Backup, etc.
|
||||
- **Enabled**: Whether enabled
|
||||
- **Task Schedule**: Execution schedule
|
||||
- **Created At**: Creation time
|
||||
- **Last Updated**: Last execution time
|
||||
- **Actions**: Edit, execute, delete, etc.
|
||||
|
||||
## 创建任务
|
||||
## Create Task
|
||||
|
||||
点击 **创建任务** 按钮创建新的计划任务。
|
||||
Click the **Create Task** button to create a new scheduled task.
|
||||
|
||||
### 任务类型
|
||||
### Task Types
|
||||
|
||||
| 类型 | 说明 |
|
||||
|-------|------|
|
||||
| Shell | 执行 Shell 命令或脚本 |
|
||||
| 备份网站 | 定时备份网站文件 |
|
||||
| 备份数据库 | 定时备份数据库 |
|
||||
| 日志切割 | 定时切割日志文件 |
|
||||
| Type | Description |
|
||||
|------|-------------|
|
||||
| Shell | Execute Shell commands or scripts |
|
||||
| Backup Website | Scheduled backup of website files |
|
||||
| Backup Database | Scheduled backup of database |
|
||||
| Log Rotation | Scheduled rotation of log files |
|
||||
|
||||
### 执行周期
|
||||
### Execution Schedule
|
||||
|
||||
支持多种周期设置:
|
||||
Multiple schedule settings are supported:
|
||||
|
||||
- **每分钟**:每分钟执行一次
|
||||
- **每小时**:每小时执行一次
|
||||
- **每天**:每天指定时间执行
|
||||
- **每周**:每周指定日期和时间执行
|
||||
- **每月**:每月指定日期和时间执行
|
||||
- **自定义**:使用 Cron 表达式
|
||||
- **Every Minute**: Execute once every minute
|
||||
- **Every Hour**: Execute once every hour
|
||||
- **Every Day**: Execute at a specified time each day
|
||||
- **Every Week**: Execute on specified day and time each week
|
||||
- **Every Month**: Execute on specified date and time each month
|
||||
- **Custom**: Use Cron expression
|
||||
|
||||
### Cron 表达式
|
||||
### Cron Expression
|
||||
|
||||
Cron 表达式格式:`分 时 日 月 周`
|
||||
Cron expression format: `minute hour day month weekday`
|
||||
|
||||
```
|
||||
* * * * *
|
||||
│ │ │ │ │
|
||||
│ │ │ │ └── 周几 (0-7, 0和7都是周日)
|
||||
│ │ │ └─────── 月份 (1-12)
|
||||
│ │ └──────────── 日期 (1-31)
|
||||
│ └───────────────── 小时 (0-23)
|
||||
└────────────────────── 分钟 (0-59)
|
||||
│ │ │ │ └── Day of week (0-7, both 0 and 7 are Sunday)
|
||||
│ │ │ └─────── Month (1-12)
|
||||
│ │ └──────────── Day of month (1-31)
|
||||
│ └───────────────── Hour (0-23)
|
||||
└────────────────────── Minute (0-59)
|
||||
```
|
||||
|
||||
常用示例:
|
||||
Common examples:
|
||||
|
||||
| 表达式 | 说明 |
|
||||
|--------|------|
|
||||
| `0 2 * * *` | 每天凌晨 2 点 |
|
||||
| `0 */6 * * *` | 每 6 小时 |
|
||||
| `0 0 * * 0` | 每周日凌晨 |
|
||||
| `0 0 1 * *` | 每月 1 号凌晨 |
|
||||
| `*/5 * * * *` | 每 5 分钟 |
|
||||
| Expression | Description |
|
||||
|------------|-------------|
|
||||
| `0 2 * * *` | Every day at 2 AM |
|
||||
| `0 */6 * * *` | Every 6 hours |
|
||||
| `0 0 * * 0` | Every Sunday at midnight |
|
||||
| `0 0 1 * *` | First day of every month at midnight |
|
||||
| `*/5 * * * *` | Every 5 minutes |
|
||||
|
||||
不会写?直接找个 AI 描述清楚需求让它帮你生成一个。
|
||||
Don't know how to write it? Just describe your requirements clearly to an AI and let it generate one for you.
|
||||
|
||||
## Shell 任务示例
|
||||
## Shell Task Examples
|
||||
|
||||
### 清理临时文件
|
||||
### Clean Temporary Files
|
||||
|
||||
```bash
|
||||
find /tmp -type f -mtime +7 -delete
|
||||
```
|
||||
|
||||
### 重启服务
|
||||
### Restart Service
|
||||
|
||||
```bash
|
||||
systemctl restart nginx
|
||||
```
|
||||
|
||||
### 同步时间
|
||||
### Sync Time
|
||||
|
||||
```bash
|
||||
ntpdate ntp.aliyun.com
|
||||
```
|
||||
|
||||
## 任务操作
|
||||
## Task Operations
|
||||
|
||||
### 启用/禁用
|
||||
### Enable/Disable
|
||||
|
||||
通过开关控制任务是否启用。禁用的任务不会执行。
|
||||
Control whether the task is enabled via the switch. Disabled tasks will not execute.
|
||||
|
||||
### 立即执行
|
||||
### Execute Immediately
|
||||
|
||||
点击 **运行** 按钮可以立即执行任务,不等待计划时间。
|
||||
Click the **Run** button to execute the task immediately without waiting for the scheduled time.
|
||||
|
||||
### 查看日志
|
||||
### View Logs
|
||||
|
||||
点击 **日志** 按钮查看任务的执行日志。
|
||||
Click the **Logs** button to view the task execution logs.
|
||||
|
||||
### 编辑任务
|
||||
### Edit Task
|
||||
|
||||
点击 **编辑** 按钮修改任务配置。
|
||||
Click the **Edit** button to modify the task configuration.
|
||||
|
||||
### 删除任务
|
||||
### Delete Task
|
||||
|
||||
点击 **删除** 按钮删除任务。
|
||||
Click the **Delete** button to delete the task.
|
||||
|
||||
## 注意事项
|
||||
## Notes
|
||||
|
||||
1. 任务执行时间基于服务器时区
|
||||
2. 长时间运行的任务可能影响下次执行
|
||||
3. 建议为重要任务设置通知提醒
|
||||
4. 定期检查任务执行状态
|
||||
1. Task execution time is based on the server timezone
|
||||
2. Long-running tasks may affect the next execution
|
||||
3. It is recommended to set up notification reminders for important tasks
|
||||
4. Regularly check task execution status
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
# 工具箱
|
||||
# Toolbox
|
||||
|
||||
工具箱提供了一系列系统管理工具,包括进程管理、系统信息、SSH 配置、磁盘管理等。
|
||||
The toolbox provides a series of system management tools, including process management, system information, SSH configuration, disk management, etc.
|
||||
|
||||
## 功能列表
|
||||
## Feature List
|
||||
|
||||
| 功能 | 说明 |
|
||||
|------|------|
|
||||
| [进程](./toolbox/process) | 查看和管理系统进程 |
|
||||
| [系统](./toolbox/system) | 查看系统信息和配置 |
|
||||
| [SSH](./toolbox/ssh) | SSH 服务配置 |
|
||||
| [磁盘](./toolbox/disk) | 磁盘使用情况和管理 |
|
||||
| [日志清理](./toolbox/log) | 清理系统日志 |
|
||||
| [Web 钩子](./toolbox/webhook) | 配置 Webhook 通知 |
|
||||
| [跑分](./toolbox/benchmark) | 服务器性能测试 |
|
||||
| Feature | Description |
|
||||
|---------|-------------|
|
||||
| [Process](./toolbox/process) | View and manage system processes |
|
||||
| [System](./toolbox/system) | View system information and configuration |
|
||||
| [SSH](./toolbox/ssh) | SSH service configuration |
|
||||
| [Disk](./toolbox/disk) | Disk usage and management |
|
||||
| [Log Cleanup](./toolbox/log) | Clean up system logs |
|
||||
| [Web Hook](./toolbox/webhook) | Configure Webhook notifications |
|
||||
| [Benchmark](./toolbox/benchmark) | Server performance testing |
|
||||
|
||||

|
||||

|
||||
|
||||
## 下一步
|
||||
## Next Steps
|
||||
|
||||
- [进程管理](./toolbox/process) - 查看和管理系统进程
|
||||
- [系统信息](./toolbox/system) - 查看系统配置
|
||||
- [SSH 配置](./toolbox/ssh) - 配置 SSH 服务
|
||||
- [磁盘管理](./toolbox/disk) - 管理磁盘空间
|
||||
- [日志清理](./toolbox/log) - 清理系统日志
|
||||
- [Web 钩子](./toolbox/webhook) - 配置通知
|
||||
- [跑分测试](./toolbox/benchmark) - 测试服务器性能
|
||||
- [Process Management](./toolbox/process) - View and manage system processes
|
||||
- [System Information](./toolbox/system) - View system configuration
|
||||
- [SSH Configuration](./toolbox/ssh) - Configure SSH service
|
||||
- [Disk Management](./toolbox/disk) - Manage disk space
|
||||
- [Log Cleanup](./toolbox/log) - Clean up system logs
|
||||
- [Web Hook](./toolbox/webhook) - Configure notifications
|
||||
- [Benchmark Test](./toolbox/benchmark) - Test server performance
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
# 跑分测试
|
||||
# Benchmark Test
|
||||
|
||||
跑分功能用于测试服务器的 CPU、内存和磁盘性能,帮助你了解服务器的实际性能表现。
|
||||
The benchmark feature is used to test the CPU, memory, and disk performance of the server, helping you understand the actual performance of your server.
|
||||
|
||||

|
||||

|
||||
|
||||
## 测试项目
|
||||
## Test Items
|
||||
|
||||
### CPU 测试
|
||||
### CPU Test
|
||||
|
||||
测试 CPU 的计算能力,通过执行大量数学运算来评估处理器性能。
|
||||
Tests the computing power of the CPU by executing a large number of mathematical operations to evaluate processor performance.
|
||||
|
||||
### 内存测试
|
||||
### Memory Test
|
||||
|
||||
测试内存的读写速度,评估内存子系统的性能表现。
|
||||
Tests the read and write speed of memory to evaluate the performance of the memory subsystem.
|
||||
|
||||
### 磁盘测试
|
||||
### Disk Test
|
||||
|
||||
测试磁盘的读写速度,评估存储设备的 I/O 性能。
|
||||
Tests the read and write speed of the disk to evaluate the I/O performance of the storage device.
|
||||
|
||||
## 使用方法
|
||||
## Usage
|
||||
|
||||
点击 **开始跑分** 按钮,系统会依次执行 CPU、内存和磁盘测试。测试完成后会显示各项得分。
|
||||
Click the **Start Benchmark** button, and the system will execute CPU, memory, and disk tests in sequence. After the tests are completed, the scores for each item will be displayed.
|
||||
|
||||
## 结果说明
|
||||
## Result Explanation
|
||||
|
||||
跑分结果以数值形式展示,数值越高表示性能越好。
|
||||
Benchmark results are displayed as numerical values, with higher values indicating better performance.
|
||||
|
||||
::: warning 注意
|
||||
跑分结果仅供参考。由于系统资源调度、缓存和其他因素的影响,测试结果可能与实际使用中的性能有所差异。
|
||||
::: warning Note
|
||||
Benchmark results are for reference only. Due to system resource scheduling, caching, and other factors, test results may differ from actual performance in use.
|
||||
:::
|
||||
|
||||
## 测试建议
|
||||
## Testing Recommendations
|
||||
|
||||
1. 测试前关闭不必要的服务和进程
|
||||
2. 避免在业务高峰期进行测试
|
||||
3. 多次测试取平均值更准确
|
||||
4. 不同时间段的测试结果可能有波动
|
||||
1. Close unnecessary services and processes before testing
|
||||
2. Avoid testing during peak business hours
|
||||
3. Multiple tests averaged are more accurate
|
||||
4. Test results may fluctuate at different times
|
||||
|
||||
## 性能优化参考
|
||||
## Performance Optimization Reference
|
||||
|
||||
如果跑分结果不理想,可以考虑:
|
||||
If benchmark results are not ideal, consider:
|
||||
|
||||
- **CPU 性能低**:检查是否有进程占用过高 CPU
|
||||
- **内存性能低**:检查内存使用情况,是否存在内存泄漏
|
||||
- **磁盘性能低**:检查磁盘健康状态,考虑升级到 SSD
|
||||
- **Low CPU performance**: Check if any process is using too much CPU
|
||||
- **Low memory performance**: Check memory usage, whether there are memory leaks
|
||||
- **Low disk performance**: Check disk health status, consider upgrading to SSD
|
||||
|
||||
@@ -1,117 +1,117 @@
|
||||
# 磁盘
|
||||
# Disk
|
||||
|
||||
磁盘页面提供磁盘分区管理和 LVM 逻辑卷管理功能。
|
||||
The disk page provides disk partition management and LVM logical volume management features.
|
||||
|
||||
## 磁盘管理
|
||||
## Disk Management
|
||||
|
||||

|
||||

|
||||
|
||||
### 磁盘信息
|
||||
### Disk Information
|
||||
|
||||
页面顶部显示每个磁盘的基本信息:
|
||||
The top of the page displays basic information for each disk:
|
||||
|
||||
- **磁盘名**:如 vda、sda
|
||||
- **类型**:系统盘或数据盘
|
||||
- **大小**:磁盘总容量
|
||||
- **分区数**:分区数量
|
||||
- **磁盘类型**:HDD、SSD 等
|
||||
- **Disk Name**: Such as vda, sda
|
||||
- **Type**: System disk or data disk
|
||||
- **Size**: Total disk capacity
|
||||
- **Partitions**: Number of partitions
|
||||
- **Disk Type**: HDD, SSD, etc.
|
||||
|
||||
### 分区列表
|
||||
### Partition List
|
||||
|
||||
每个磁盘下显示其分区信息:
|
||||
Each disk shows its partition information:
|
||||
|
||||
| 列 | 说明 |
|
||||
|------|------|
|
||||
| 分区名 | 分区设备名,如 vda1、vda2 |
|
||||
| 大小 | 分区容量 |
|
||||
| 已用 | 已使用空间 |
|
||||
| 可用 | 可用空间 |
|
||||
| 使用率 | 使用百分比 |
|
||||
| 挂载点 | 挂载目录,如 `/`、`/data` |
|
||||
| 文件系统 | 文件系统类型,如 ext4、xfs |
|
||||
| 操作 | 卸载等操作 |
|
||||
| Column | Description |
|
||||
|--------|-------------|
|
||||
| Partition Name | Partition device name, such as vda1, vda2 |
|
||||
| Size | Partition capacity |
|
||||
| Used | Used space |
|
||||
| Available | Available space |
|
||||
| Usage | Usage percentage |
|
||||
| Mount Point | Mount directory, such as `/`, `/data` |
|
||||
| File System | File system type, such as ext4, xfs |
|
||||
| Actions | Unmount and other operations |
|
||||
|
||||
### 挂载分区
|
||||
### Mount Partition
|
||||
|
||||
将未挂载的分区挂载到指定目录:
|
||||
Mount an unmounted partition to a specified directory:
|
||||
|
||||
- **分区**:选择要挂载的分区
|
||||
- **挂载路径**:挂载目录,如 `/mnt/data`
|
||||
- **挂载选项**:挂载参数,如 `defaults,noatime`
|
||||
- **启动时自动挂载**:是否写入 fstab 开机自动挂载
|
||||
- **Partition**: Select the partition to mount
|
||||
- **Mount Path**: Mount directory, such as `/mnt/data`
|
||||
- **Mount Options**: Mount parameters, such as `defaults,noatime`
|
||||
- **Auto Mount on Boot**: Whether to write to fstab for automatic mounting on boot
|
||||
|
||||
### 格式化分区
|
||||
### Format Partition
|
||||
|
||||
::: danger 警告
|
||||
格式化将清除分区上的所有数据!
|
||||
::: danger Warning
|
||||
Formatting will erase all data on the partition!
|
||||
:::
|
||||
|
||||
- **分区**:选择要格式化的分区
|
||||
- **文件系统类型**:ext4、xfs、btrfs 等
|
||||
- **Partition**: Select the partition to format
|
||||
- **File System Type**: ext4, xfs, btrfs, etc.
|
||||
|
||||
### 初始化磁盘
|
||||
### Initialize Disk
|
||||
|
||||
::: danger 警告
|
||||
初始化将删除磁盘上的所有分区和数据!
|
||||
::: danger Warning
|
||||
Initialization will delete all partitions and data on the disk!
|
||||
:::
|
||||
|
||||
将整个磁盘初始化为单个分区:
|
||||
Initialize the entire disk as a single partition:
|
||||
|
||||
- **磁盘**:选择要初始化的磁盘
|
||||
- **文件系统类型**:ext4、xfs、btrfs 等
|
||||
- **Disk**: Select the disk to initialize
|
||||
- **File System Type**: ext4, xfs, btrfs, etc.
|
||||
|
||||
### 自动挂载配置(fstab)
|
||||
### Auto Mount Configuration (fstab)
|
||||
|
||||
显示 `/etc/fstab` 中的挂载配置:
|
||||
Display mount configurations in `/etc/fstab`:
|
||||
|
||||
- **设备**:设备名或 UUID
|
||||
- **挂载点**:挂载目录
|
||||
- **文件系统**:文件系统类型
|
||||
- **选项**:挂载选项
|
||||
- **操作**:移除配置
|
||||
- **Device**: Device name or UUID
|
||||
- **Mount Point**: Mount directory
|
||||
- **File System**: File system type
|
||||
- **Options**: Mount options
|
||||
- **Actions**: Remove configuration
|
||||
|
||||
## LVM 管理
|
||||
## LVM Management
|
||||
|
||||

|
||||

|
||||
|
||||
LVM(Logical Volume Manager)提供灵活的磁盘空间管理,支持动态调整分区大小。
|
||||
LVM (Logical Volume Manager) provides flexible disk space management with support for dynamic partition resizing.
|
||||
|
||||
### 物理卷(PV)
|
||||
### Physical Volume (PV)
|
||||
|
||||
物理卷是 LVM 的基础,通常是一个磁盘分区或整个磁盘。
|
||||
Physical volumes are the foundation of LVM, typically a disk partition or an entire disk.
|
||||
|
||||
**创建物理卷**:
|
||||
1. 选择设备(未使用的分区或磁盘)
|
||||
2. 点击 **创建物理卷**
|
||||
**Create Physical Volume**:
|
||||
1. Select device (unused partition or disk)
|
||||
2. Click **Create Physical Volume**
|
||||
|
||||
### 卷组(VG)
|
||||
### Volume Group (VG)
|
||||
|
||||
卷组由一个或多个物理卷组成,是存储池的概念。
|
||||
A volume group consists of one or more physical volumes, representing a storage pool concept.
|
||||
|
||||
**创建卷组**:
|
||||
1. 输入卷组名
|
||||
2. 选择要加入的物理卷
|
||||
3. 点击 **创建卷组**
|
||||
**Create Volume Group**:
|
||||
1. Enter volume group name
|
||||
2. Select physical volumes to add
|
||||
3. Click **Create Volume Group**
|
||||
|
||||
### 逻辑卷(LV)
|
||||
### Logical Volume (LV)
|
||||
|
||||
逻辑卷从卷组中分配空间,相当于传统的分区。
|
||||
Logical volumes allocate space from volume groups, equivalent to traditional partitions.
|
||||
|
||||
**创建逻辑卷**:
|
||||
1. 输入逻辑卷名
|
||||
2. 选择卷组
|
||||
3. 设置大小(GB)
|
||||
4. 点击 **创建逻辑卷**
|
||||
**Create Logical Volume**:
|
||||
1. Enter logical volume name
|
||||
2. Select volume group
|
||||
3. Set size (GB)
|
||||
4. Click **Create Logical Volume**
|
||||
|
||||
### 扩展逻辑卷
|
||||
### Extend Logical Volume
|
||||
|
||||
动态扩展逻辑卷的大小:
|
||||
Dynamically extend the size of a logical volume:
|
||||
|
||||
1. 选择要扩展的逻辑卷
|
||||
2. 输入扩展大小(GB)
|
||||
3. 勾选 **自动调整文件系统大小**(推荐)
|
||||
4. 点击 **扩展逻辑卷**
|
||||
1. Select the logical volume to extend
|
||||
2. Enter extension size (GB)
|
||||
3. Check **Auto Resize File System** (recommended)
|
||||
4. Click **Extend Logical Volume**
|
||||
|
||||
::: tip 提示
|
||||
LVM 的优势在于可以在线扩展逻辑卷,无需卸载分区或重启系统。
|
||||
::: tip Tip
|
||||
The advantage of LVM is that logical volumes can be extended online without unmounting partitions or restarting the system.
|
||||
:::
|
||||
|
||||
@@ -1,79 +1,79 @@
|
||||
# 日志清理
|
||||
# Log Cleanup
|
||||
|
||||
日志清理功能用于扫描和清理系统及应用产生的日志文件,释放磁盘空间。
|
||||
The log cleanup feature is used to scan and clean up log files generated by the system and applications to free up disk space.
|
||||
|
||||

|
||||

|
||||
|
||||
## 功能概览
|
||||
## Feature Overview
|
||||
|
||||
页面顶部提供批量操作按钮:
|
||||
The top of the page provides batch operation buttons:
|
||||
|
||||
- **扫描所有**:扫描所有类型的日志
|
||||
- **清理所有**:清理所有已扫描的日志
|
||||
- **Scan All**: Scan all types of logs
|
||||
- **Clean All**: Clean all scanned logs
|
||||
|
||||
## 日志类型
|
||||
## Log Types
|
||||
|
||||
### 面板日志
|
||||
### Panel Logs
|
||||
|
||||
面板运行产生的日志文件。
|
||||
Log files generated by panel operation.
|
||||
|
||||
- 点击 **扫描** 检查日志大小
|
||||
- 点击 **清理** 删除日志文件
|
||||
- Click **Scan** to check log size
|
||||
- Click **Clean** to delete log files
|
||||
|
||||
### 网站日志
|
||||
### Website Logs
|
||||
|
||||
网站的访问日志和错误日志,包括:
|
||||
Website access logs and error logs, including:
|
||||
|
||||
- Nginx 访问日志(access.log)
|
||||
- Nginx 错误日志(error.log)
|
||||
- 各网站的独立日志
|
||||
- Nginx access logs (access.log)
|
||||
- Nginx error logs (error.log)
|
||||
- Individual logs for each website
|
||||
|
||||
::: tip 提示
|
||||
网站日志通常是占用空间最大的日志类型,建议定期清理。
|
||||
::: tip Tip
|
||||
Website logs are usually the largest type of logs, it is recommended to clean them regularly.
|
||||
:::
|
||||
|
||||
### MySQL 日志
|
||||
### MySQL Logs
|
||||
|
||||
Percona/MySQL/MariaDB 数据库的日志文件:
|
||||
Log files for Percona/MySQL/MariaDB databases:
|
||||
|
||||
- 慢查询日志(slow query log)
|
||||
- 二进制日志(binlog)
|
||||
- 错误日志
|
||||
- Slow query log
|
||||
- Binary log (binlog)
|
||||
- Error log
|
||||
|
||||
::: warning 注意
|
||||
二进制日志用于数据恢复和主从复制,清理前请确认不再需要。
|
||||
::: warning Note
|
||||
Binary logs are used for data recovery and master-slave replication, please confirm they are no longer needed before cleaning.
|
||||
:::
|
||||
|
||||
### Docker
|
||||
|
||||
Docker 相关的日志和未使用资源:
|
||||
Docker-related logs and unused resources:
|
||||
|
||||
- 容器日志
|
||||
- 未使用的镜像
|
||||
- 构建缓存
|
||||
- Container logs
|
||||
- Unused images
|
||||
- Build cache
|
||||
|
||||
### 系统日志
|
||||
### System Logs
|
||||
|
||||
系统级别的日志文件:
|
||||
System-level log files:
|
||||
|
||||
- systemd journal 日志
|
||||
- `/var/log` 下的系统日志
|
||||
- 内核日志
|
||||
- systemd journal logs
|
||||
- System logs under `/var/log`
|
||||
- Kernel logs
|
||||
|
||||
## 使用方法
|
||||
## Usage
|
||||
|
||||
1. 点击各类型的 **扫描** 按钮,查看日志占用空间
|
||||
2. 确认要清理的日志类型
|
||||
3. 点击 **清理** 按钮删除日志
|
||||
1. Click the **Scan** button for each type to view log space usage
|
||||
2. Confirm the log types to clean
|
||||
3. Click the **Clean** button to delete logs
|
||||
|
||||
或者:
|
||||
Or:
|
||||
|
||||
1. 点击 **扫描所有** 一次性扫描所有日志
|
||||
2. 查看各类型的占用情况
|
||||
3. 点击 **清理所有** 批量清理
|
||||
1. Click **Scan All** to scan all logs at once
|
||||
2. View the usage of each type
|
||||
3. Click **Clean All** to batch clean
|
||||
|
||||
## 注意事项
|
||||
## Notes
|
||||
|
||||
1. 清理操作不可恢复,请确认日志不再需要
|
||||
2. 重要日志建议先备份
|
||||
3. 生产环境建议保留最近的日志用于问题排查
|
||||
1. Cleanup operations are irreversible, please confirm logs are no longer needed
|
||||
2. Important logs should be backed up first
|
||||
3. In production environments, it is recommended to keep recent logs for troubleshooting
|
||||
|
||||
@@ -1,61 +1,61 @@
|
||||
# 进程管理
|
||||
# Process Management
|
||||
|
||||
进程管理页面用于查看和管理系统中运行的进程。
|
||||
The process management page is used to view and manage processes running on the system.
|
||||
|
||||
## 进程列表
|
||||
## Process List
|
||||
|
||||

|
||||

|
||||
|
||||
页面以表格形式展示所有运行中的进程。
|
||||
The page displays all running processes in a table format.
|
||||
|
||||
列表显示以下信息:
|
||||
The list displays the following information:
|
||||
|
||||
- **PID**:进程 ID
|
||||
- **名称**:进程名称
|
||||
- **父进程 PID**:父进程的 PID
|
||||
- **线程**:线程数量
|
||||
- **用户**:运行进程的用户
|
||||
- **状态**:进程状态
|
||||
- **CPU**:CPU 使用率
|
||||
- **内存**:内存使用量
|
||||
- **启动时间**:进程启动时间
|
||||
- **PID**: Process ID
|
||||
- **Name**: Process name
|
||||
- **Parent PID**: PID of the parent process
|
||||
- **Threads**: Number of threads
|
||||
- **User**: User running the process
|
||||
- **Status**: Process status
|
||||
- **CPU**: CPU usage
|
||||
- **Memory**: Memory usage
|
||||
- **Start Time**: Process start time
|
||||
|
||||
## 进程状态
|
||||
## Process Status
|
||||
|
||||
| 状态 | 说明 |
|
||||
|------|------|
|
||||
| 运行中 | 进程正在执行 |
|
||||
| 睡眠 | 进程等待事件 |
|
||||
| 空闲 | 内核线程空闲 |
|
||||
| 停止 | 进程已停止 |
|
||||
| 僵尸 | 进程已结束但未被回收 |
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| Running | Process is executing |
|
||||
| Sleeping | Process is waiting for an event |
|
||||
| Idle | Kernel thread is idle |
|
||||
| Stopped | Process has stopped |
|
||||
| Zombie | Process has ended but not been reaped |
|
||||
|
||||
## 搜索和筛选
|
||||
## Search and Filter
|
||||
|
||||
- **搜索**:按 PID 或进程名称搜索
|
||||
- **状态筛选**:筛选特定状态的进程
|
||||
- **Search**: Search by PID or process name
|
||||
- **Status Filter**: Filter processes by specific status
|
||||
|
||||
## 进程操作
|
||||
## Process Operations
|
||||
|
||||
右键点击进程可以:
|
||||
Right-click on a process to:
|
||||
|
||||
- **结束进程**:发送 SIGTERM 信号
|
||||
- **强制结束**:发送 SIGKILL 信号
|
||||
- **查看详情**:查看进程详细信息
|
||||
- **End Process**: Send SIGTERM signal
|
||||
- **Force End**: Send SIGKILL signal
|
||||
- **View Details**: View detailed process information
|
||||
|
||||
## 常见进程
|
||||
## Common Processes
|
||||
|
||||
| 进程 | 说明 |
|
||||
|----------|------|
|
||||
| nginx | Nginx Web 服务器 |
|
||||
| php-fpm | PHP FastCGI 进程管理器 |
|
||||
| mysqld | MySQL 数据库服务 |
|
||||
| postgres | PostgreSQL 数据库服务 |
|
||||
| dockerd | Docker 守护进程 |
|
||||
| ace | AcePanel 面板进程 |
|
||||
| Process | Description |
|
||||
|---------|-------------|
|
||||
| nginx | Nginx web server |
|
||||
| php-fpm | PHP FastCGI process manager |
|
||||
| mysqld | MySQL database service |
|
||||
| postgres | PostgreSQL database service |
|
||||
| dockerd | Docker daemon |
|
||||
| ace | AcePanel panel process |
|
||||
|
||||
## 注意事项
|
||||
## Notes
|
||||
|
||||
1. 结束系统关键进程可能导致系统不稳定
|
||||
2. 结束面板进程会导致面板无法访问
|
||||
3. 建议只结束确认无用的进程
|
||||
1. Ending critical system processes may cause system instability
|
||||
2. Ending the panel process will make the panel inaccessible
|
||||
3. It is recommended to only end processes that are confirmed to be useless
|
||||
|
||||
@@ -1,80 +1,80 @@
|
||||
# SSH
|
||||
|
||||
SSH 页面用于管理服务器的 SSH 服务配置,包括服务状态、认证方式和 Root 账户设置。
|
||||
The SSH page is used to manage the server's SSH service configuration, including service status, authentication methods, and Root account settings.
|
||||
|
||||

|
||||

|
||||
|
||||
## 运行状态
|
||||
## Running Status
|
||||
|
||||
显示 SSH 服务的当前状态,并提供以下操作:
|
||||
Displays the current status of the SSH service and provides the following operations:
|
||||
|
||||
- **启动**:启动 SSH 服务
|
||||
- **停止**:停止 SSH 服务
|
||||
- **重启**:重启 SSH 服务
|
||||
- **Start**: Start the SSH service
|
||||
- **Stop**: Stop the SSH service
|
||||
- **Restart**: Restart the SSH service
|
||||
|
||||
::: danger 警告
|
||||
停止 SSH 服务后将无法通过 SSH 远程连接服务器,请确保有其他方式访问服务器(如 VNC、带外管理)后再操作。
|
||||
::: danger Warning
|
||||
After stopping the SSH service, you will not be able to remotely connect to the server via SSH. Please ensure you have other ways to access the server (such as VNC, out-of-band management) before proceeding.
|
||||
:::
|
||||
|
||||
## SSH 设置
|
||||
## SSH Settings
|
||||
|
||||
### SSH 密码登录
|
||||
### SSH Password Login
|
||||
|
||||
控制是否允许使用密码进行 SSH 认证。
|
||||
Control whether password authentication is allowed for SSH.
|
||||
|
||||
- **开启**:允许使用密码登录
|
||||
- **关闭**:禁止密码登录,只能使用密钥
|
||||
- **Enabled**: Allow password login
|
||||
- **Disabled**: Prohibit password login, only key authentication allowed
|
||||
|
||||
### SSH 密钥登录
|
||||
### SSH Key Login
|
||||
|
||||
控制是否允许使用 SSH 密钥进行认证。
|
||||
Control whether SSH key authentication is allowed.
|
||||
|
||||
- **开启**:允许使用密钥登录
|
||||
- **关闭**:禁止密钥登录
|
||||
- **Enabled**: Allow key login
|
||||
- **Disabled**: Prohibit key login
|
||||
|
||||
::: tip 安全建议
|
||||
推荐开启密钥登录并关闭密码登录,可以有效防止暴力破解攻击。
|
||||
::: tip Security Recommendation
|
||||
It is recommended to enable key login and disable password login to effectively prevent brute force attacks.
|
||||
:::
|
||||
|
||||
### SSH 端口
|
||||
### SSH Port
|
||||
|
||||
修改 SSH 服务监听的端口,默认为 `22`。
|
||||
Modify the port that the SSH service listens on, default is `22`.
|
||||
|
||||
修改端口后:
|
||||
1. 点击 **保存** 按钮
|
||||
2. 确保防火墙已放行新端口
|
||||
3. 使用新端口连接测试
|
||||
4. 确认可以连接后再关闭旧端口
|
||||
After modifying the port:
|
||||
1. Click the **Save** button
|
||||
2. Ensure the firewall has allowed the new port
|
||||
3. Test connection using the new port
|
||||
4. Close the old port after confirming the connection works
|
||||
|
||||
::: warning 注意
|
||||
修改端口前请确保新端口已在防火墙中放行,否则可能导致无法连接。
|
||||
::: warning Note
|
||||
Before modifying the port, please ensure the new port is allowed in the firewall, otherwise you may be unable to connect.
|
||||
:::
|
||||
|
||||
## Root 设置
|
||||
## Root Settings
|
||||
|
||||
### Root 密码登录设置
|
||||
### Root Password Login Settings
|
||||
|
||||
控制 Root 用户的 SSH 登录权限:
|
||||
Control Root user's SSH login permissions:
|
||||
|
||||
- **允许 SSH 登录**:Root 可以通过 SSH 登录
|
||||
- **禁止 SSH 登录**:Root 无法通过 SSH 登录
|
||||
- **仅允许密钥登录**:Root 只能使用密钥登录
|
||||
- **Allow SSH Login**: Root can log in via SSH
|
||||
- **Prohibit SSH Login**: Root cannot log in via SSH
|
||||
- **Allow Key Login Only**: Root can only log in using keys
|
||||
|
||||
### Root 密码
|
||||
### Root Password
|
||||
|
||||
重置 Root 用户的密码。
|
||||
Reset the Root user's password.
|
||||
|
||||
- 输入新密码后点击 **重置** 按钮
|
||||
- 建议使用包含大小写字母、数字和特殊字符的复杂密码
|
||||
- 刷新页面将清除密码输入框
|
||||
- Enter the new password and click the **Reset** button
|
||||
- It is recommended to use a complex password containing uppercase and lowercase letters, numbers, and special characters
|
||||
- Refreshing the page will clear the password input field
|
||||
|
||||
### Root 密钥
|
||||
### Root Key
|
||||
|
||||
管理 Root 用户的 SSH 密钥:
|
||||
Manage Root user's SSH keys:
|
||||
|
||||
- **查看密钥**:查看当前配置的公钥
|
||||
- **下载**:下载私钥文件
|
||||
- **View Key**: View the currently configured public key
|
||||
- **Download**: Download the private key file
|
||||
|
||||
::: tip 安全建议
|
||||
推荐使用密钥登录并禁用密码,可以显著提高服务器安全性。
|
||||
::: tip Security Recommendation
|
||||
It is recommended to use key login and disable password to significantly improve server security.
|
||||
:::
|
||||
|
||||
@@ -1,98 +1,98 @@
|
||||
# 系统
|
||||
# System
|
||||
|
||||
系统页面提供服务器基础配置的管理功能,包括 DNS、SWAP、主机名和时间设置。
|
||||
The system page provides management features for basic server configuration, including DNS, SWAP, hostname, and time settings.
|
||||
|
||||
## DNS
|
||||
|
||||
配置系统的 DNS 服务器。
|
||||
Configure the system's DNS servers.
|
||||
|
||||

|
||||

|
||||
|
||||
### 配置项
|
||||
### Configuration Items
|
||||
|
||||
- **DNS1**:主 DNS 服务器地址
|
||||
- **DNS2**:辅 DNS 服务器地址
|
||||
- **DNS1**: Primary DNS server address
|
||||
- **DNS2**: Secondary DNS server address
|
||||
|
||||
### 常用 DNS 服务器
|
||||
### Common DNS Servers
|
||||
|
||||
| 服务商 | DNS1 | DNS2 |
|
||||
|--------|------|------|
|
||||
| 阿里云 | 223.5.5.5 | 223.6.6.6 |
|
||||
| 腾讯云 | 119.29.29.29 | 119.28.28.28 |
|
||||
| Provider | DNS1 | DNS2 |
|
||||
|----------|------|------|
|
||||
| Alibaba Cloud | 223.5.5.5 | 223.6.6.6 |
|
||||
| Tencent Cloud | 119.29.29.29 | 119.28.28.28 |
|
||||
| 114 DNS | 114.114.114.114 | 114.114.115.115 |
|
||||
| Google | 8.8.8.8 | 8.8.4.4 |
|
||||
| Cloudflare | 1.1.1.1 | 1.0.0.1 |
|
||||
|
||||
## SWAP
|
||||
|
||||
管理系统的 SWAP 交换空间。
|
||||
Manage the system's SWAP space.
|
||||
|
||||

|
||||

|
||||
|
||||
页面显示当前 SWAP 使用情况:
|
||||
- 系统总计
|
||||
- 已使用
|
||||
- 可用
|
||||
The page displays current SWAP usage:
|
||||
- System total
|
||||
- Used
|
||||
- Available
|
||||
|
||||
### 配置面板 SWAP
|
||||
### Configure Panel SWAP
|
||||
|
||||
设置面板管理的 SWAP 文件大小(单位:MB)。
|
||||
Set the size of the SWAP file managed by the panel (unit: MB).
|
||||
|
||||
- 设置为 `0` 表示禁用面板 SWAP
|
||||
- 建议根据服务器内存大小设置,通常为内存的 1-2 倍
|
||||
- Setting to `0` disables panel SWAP
|
||||
- It is recommended to set based on server memory size, typically 1-2 times the memory
|
||||
|
||||
::: tip 提示
|
||||
SWAP 可以在物理内存不足时提供额外的虚拟内存,但性能低于物理内存。对于内存充足的服务器,可以不启用 SWAP。
|
||||
::: tip Tip
|
||||
SWAP can provide additional virtual memory when physical memory is insufficient, but performance is lower than physical memory. For servers with sufficient memory, SWAP may not need to be enabled.
|
||||
:::
|
||||
|
||||
## 主机
|
||||
## Host
|
||||
|
||||
配置系统主机名和 Hosts 文件。
|
||||
Configure system hostname and Hosts file.
|
||||
|
||||

|
||||

|
||||
|
||||
### 系统主机名
|
||||
### System Hostname
|
||||
|
||||
修改服务器的主机名,例如 `myserver`、`web-01` 等。
|
||||
Modify the server's hostname, such as `myserver`, `web-01`, etc.
|
||||
|
||||
### Hosts
|
||||
|
||||
编辑系统的 `/etc/hosts` 文件,用于配置本地域名解析。
|
||||
Edit the system's `/etc/hosts` file for configuring local domain name resolution.
|
||||
|
||||
常见用途:
|
||||
- 屏蔽特定域名
|
||||
- 配置本地开发域名
|
||||
- 加速特定域名的解析
|
||||
Common uses:
|
||||
- Block specific domains
|
||||
- Configure local development domains
|
||||
- Speed up resolution of specific domains
|
||||
|
||||
## 时间
|
||||
## Time
|
||||
|
||||
配置系统时区和时间同步。
|
||||
Configure system timezone and time synchronization.
|
||||
|
||||

|
||||

|
||||
|
||||
### 选择时区
|
||||
### Select Timezone
|
||||
|
||||
从下拉列表中选择服务器所在的时区,例如 `Asia/Shanghai`。
|
||||
Select the server's timezone from the dropdown list, such as `Asia/Shanghai`.
|
||||
|
||||
### 修改时间
|
||||
### Modify Time
|
||||
|
||||
手动设置系统时间。
|
||||
Manually set the system time.
|
||||
|
||||
::: warning 注意
|
||||
手动更改时间后,系统自动时间同步可能仍会覆盖设置。
|
||||
::: warning Note
|
||||
After manually changing the time, automatic system time synchronization may still override the settings.
|
||||
:::
|
||||
|
||||
### NTP 服务器
|
||||
### NTP Server
|
||||
|
||||
配置 NTP 时间同步服务器。留空则使用系统默认服务器。
|
||||
Configure the NTP time synchronization server. Leave empty to use the system default server.
|
||||
|
||||
常用 NTP 服务器:
|
||||
- `ntp.aliyun.com` - 阿里云
|
||||
- `ntp.tencent.com` - 腾讯云
|
||||
- `cn.pool.ntp.org` - 中国 NTP 池
|
||||
Common NTP servers:
|
||||
- `ntp.aliyun.com` - Alibaba Cloud
|
||||
- `ntp.tencent.com` - Tencent Cloud
|
||||
- `cn.pool.ntp.org` - China NTP Pool
|
||||
|
||||
### 操作按钮
|
||||
### Action Buttons
|
||||
|
||||
- **配置默认服务器**:恢复使用系统默认的 NTP 服务器
|
||||
- **保存**:保存时区和时间设置
|
||||
- **同步时间**:立即与 NTP 服务器同步时间
|
||||
- **Configure Default Server**: Restore to using the system default NTP server
|
||||
- **Save**: Save timezone and time settings
|
||||
- **Sync Time**: Immediately synchronize time with the NTP server
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
# Web 钩子
|
||||
# Webhook
|
||||
|
||||
Web 钩子(Webhook)允许你通过 HTTP 请求触发服务器上的脚本执行,实现自动化部署、CI/CD 集成等功能。
|
||||
Webhooks allow you to trigger script execution on the server through HTTP requests, enabling automated deployment, CI/CD integration, and other features.
|
||||
|
||||

|
||||

|
||||
|
||||
## 创建 Web 钩子
|
||||
## Create Webhook
|
||||
|
||||
点击 **创建 Web 钩子** 按钮,填写以下信息:
|
||||
Click the **Create Webhook** button and fill in the following information:
|
||||
|
||||

|
||||

|
||||
|
||||
- **名称**:Web 钩子的名称,用于标识用途
|
||||
- **用户**:执行脚本的系统用户,默认为 root
|
||||
- **原始输出**:开启后返回脚本的原始输出,关闭则返回 JSON 格式
|
||||
- **脚本**:要执行的 Shell 脚本内容
|
||||
- **Name**: The name of the webhook, used to identify its purpose
|
||||
- **User**: The system user that executes the script, default is root
|
||||
- **Raw Output**: When enabled, returns the raw output of the script; when disabled, returns JSON format
|
||||
- **Script**: The Shell script content to execute
|
||||
|
||||
## 使用方式
|
||||
## Usage
|
||||
|
||||
创建完成后,系统会生成一个唯一的 Key。通过访问以下 URL 即可触发脚本执行:
|
||||
After creation, the system will generate a unique Key. Access the following URL to trigger script execution:
|
||||
|
||||
```
|
||||
https://your-panel-domain/api/webhook/{key}
|
||||
```
|
||||
|
||||
支持 GET 和 POST 请求。
|
||||
Supports both GET and POST requests.
|
||||
|
||||
## 应用场景
|
||||
## Use Cases
|
||||
|
||||
### Git 自动部署
|
||||
### Git Auto Deployment
|
||||
|
||||
配合 GitHub/GitLab 的 Webhook 功能,实现代码推送后自动部署:
|
||||
Combined with GitHub/GitLab Webhook functionality, achieve automatic deployment after code push:
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
@@ -39,42 +39,42 @@ npm install
|
||||
npm run build
|
||||
```
|
||||
|
||||
### 定时任务触发
|
||||
### Scheduled Task Trigger
|
||||
|
||||
通过外部服务(如监控系统)触发特定操作:
|
||||
Trigger specific operations through external services (such as monitoring systems):
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# 清理临时文件
|
||||
# Clean temporary files
|
||||
rm -rf /tmp/cache/*
|
||||
# 重启服务
|
||||
# Restart service
|
||||
systemctl restart myapp
|
||||
```
|
||||
|
||||
### CI/CD 集成
|
||||
### CI/CD Integration
|
||||
|
||||
在 CI/CD 流水线中调用 Webhook 完成部署:
|
||||
Call Webhook in CI/CD pipeline to complete deployment:
|
||||
|
||||
```bash
|
||||
# 在 CI 脚本中
|
||||
# In CI script
|
||||
curl -X POST https://panel.example.com/api/webhook/your-key
|
||||
```
|
||||
|
||||
## 列表说明
|
||||
## List Description
|
||||
|
||||
| 字段 | 说明 |
|
||||
|------|------|
|
||||
| 名称 | Web 钩子名称 |
|
||||
| Key | 唯一标识,用于构建调用 URL |
|
||||
| 运行用户 | 执行脚本的系统用户 |
|
||||
| 原始输出 | 是否返回原始文本输出 |
|
||||
| 已启用 | 是否启用该 Web 钩子 |
|
||||
| 调用次数 | 累计被调用的次数 |
|
||||
| 最后调用 | 最后一次调用时间 |
|
||||
| Field | Description |
|
||||
|-------|-------------|
|
||||
| Name | Webhook name |
|
||||
| Key | Unique identifier, used to build the call URL |
|
||||
| Run User | System user that executes the script |
|
||||
| Raw Output | Whether to return raw text output |
|
||||
| Enabled | Whether the webhook is enabled |
|
||||
| Call Count | Cumulative number of calls |
|
||||
| Last Call | Last call time |
|
||||
|
||||
## 注意事项
|
||||
## Notes
|
||||
|
||||
1. Key 是敏感信息,不要泄露给不信任的人
|
||||
2. 脚本以指定用户身份执行,注意权限控制
|
||||
3. 建议在脚本中添加必要的错误处理
|
||||
4. 可以通过禁用开关临时停用 Web 钩子
|
||||
1. The Key is sensitive information, do not disclose it to untrusted people
|
||||
2. Scripts are executed as the specified user, pay attention to permission control
|
||||
3. It is recommended to add necessary error handling in scripts
|
||||
4. You can temporarily disable a webhook using the disable switch
|
||||
|
||||
@@ -1,66 +1,66 @@
|
||||
# 网站
|
||||
# Website
|
||||
|
||||
网站模块用于管理 Web 服务器上的站点配置。AcePanel 支持三种类型的网站:反向代理、PHP 和纯静态。
|
||||
The website module is used to manage site configurations on the Web server. AcePanel supports three types of websites: reverse proxy, PHP, and static.
|
||||
|
||||
## 前置要求
|
||||
## Prerequisites
|
||||
|
||||
使用网站功能前,需要先安装 Web 服务器:
|
||||
Before using the website feature, you need to install a Web server first:
|
||||
|
||||
1. 进入 **应用** > **原生应用**
|
||||
2. 安装 Nginx、OpenResty 或 Apache
|
||||
1. Go to **Applications** > **Native Applications**
|
||||
2. Install Nginx, OpenResty, or Apache
|
||||
|
||||
## 网站类型
|
||||
## Website Types
|
||||
|
||||
| 类型 | 说明 | 适用场景 |
|
||||
|------|------|----------|
|
||||
| [反向代理](./website/proxy) | 将请求转发到后端服务 | Node.js、Go、Java 等应用 |
|
||||
| [PHP](./website/php) | 运行 PHP 程序 | WordPress、Laravel 等 |
|
||||
| [纯静态](./website/static) | 托管静态文件 | HTML、Vue/React 构建产物 |
|
||||
| Type | Description | Use Cases |
|
||||
|------|-------------|-----------|
|
||||
| [Reverse Proxy](./website/proxy) | Forward requests to backend services | Node.js, Go, Java applications |
|
||||
| [PHP](./website/php) | Run PHP programs | WordPress, Laravel, etc. |
|
||||
| [Static](./website/static) | Host static files | HTML, Vue/React build outputs |
|
||||
|
||||
## 网站列表
|
||||
## Website List
|
||||
|
||||
网站列表显示以下信息:
|
||||
The website list displays the following information:
|
||||
|
||||
- **网站名称**:站点的唯一标识
|
||||
- **运行中**:站点是否启用
|
||||
- **目录**:网站文件所在目录
|
||||
- **HTTPS**:是否启用 HTTPS
|
||||
- **证书有效期**:SSL 证书的到期时间
|
||||
- **备注**:自定义备注信息
|
||||
- **操作**:管理、删除等
|
||||
- **Website Name**: Unique identifier for the site
|
||||
- **Running**: Whether the site is enabled
|
||||
- **Directory**: Directory where website files are located
|
||||
- **HTTPS**: Whether HTTPS is enabled
|
||||
- **Certificate Expiry**: SSL certificate expiration time
|
||||
- **Remarks**: Custom remarks
|
||||
- **Actions**: Manage, delete, etc.
|
||||
|
||||
## 创建网站
|
||||
## Create Website
|
||||
|
||||
1. 进入 **网站** 页面
|
||||
2. 选择网站类型标签(反向代理/PHP/纯静态)
|
||||
3. 点击 **创建网站**
|
||||
4. 填写网站信息
|
||||
5. 点击创建
|
||||
1. Go to the **Website** page
|
||||
2. Select the website type tab (Reverse Proxy/PHP/Static)
|
||||
3. Click **Create Website**
|
||||
4. Fill in the website information
|
||||
5. Click Create
|
||||
|
||||
### 通用配置项
|
||||
### Common Configuration Items
|
||||
|
||||
- **名称**:网站的唯一标识,只能使用英文,创建后不可修改
|
||||
- **域名**:绑定的域名,可添加多个
|
||||
- **端口**:监听的端口,默认 80
|
||||
- **备注**:可选的备注信息
|
||||
- **Name**: Unique identifier for the website, English only, cannot be changed after creation
|
||||
- **Domain**: Bound domain names, multiple can be added
|
||||
- **Port**: Listening port, default 80
|
||||
- **Remarks**: Optional remarks
|
||||
|
||||
## 网站管理
|
||||
## Website Management
|
||||
|
||||
点击网站的 **管理** 按钮进入管理页面,可以进行以下操作:
|
||||
Click the **Manage** button of a website to enter the management page, where you can perform the following operations:
|
||||
|
||||
- 修改域名和端口
|
||||
- 配置 SSL 证书
|
||||
- 设置伪静态规则
|
||||
- 配置防盗链
|
||||
- 查看访问日志
|
||||
- 修改 Nginx 配置
|
||||
- Modify domains and ports
|
||||
- Configure SSL certificates
|
||||
- Set rewrite rules
|
||||
- Configure hotlink protection
|
||||
- View access logs
|
||||
- Modify Nginx configuration
|
||||
|
||||
## 批量创建
|
||||
## Batch Creation
|
||||
|
||||
点击 **批量创建网站** 可以一次创建多个网站,适合需要快速部署多个站点的场景。
|
||||
Click **Batch Create Websites** to create multiple websites at once, suitable for scenarios requiring rapid deployment of multiple sites.
|
||||
|
||||
## 下一步
|
||||
## Next Steps
|
||||
|
||||
- [反向代理](./website/proxy) - 了解如何创建反向代理网站
|
||||
- [PHP 网站](./website/php) - 了解如何创建 PHP 网站
|
||||
- [纯静态网站](./website/static) - 了解如何创建静态网站
|
||||
- [Reverse Proxy](./website/proxy) - Learn how to create reverse proxy websites
|
||||
- [PHP Website](./website/php) - Learn how to create PHP websites
|
||||
- [Static Website](./website/static) - Learn how to create static websites
|
||||
|
||||
@@ -1,123 +1,123 @@
|
||||
# PHP 网站
|
||||
# PHP Website
|
||||
|
||||
PHP 网站用于运行 PHP 程序,如 WordPress、Laravel、ThinkPHP 等。
|
||||
PHP websites are used to run PHP programs, such as WordPress, Laravel, ThinkPHP, etc.
|
||||
|
||||
## 前置要求
|
||||
## Prerequisites
|
||||
|
||||
创建 PHP 网站前,需要先安装:
|
||||
Before creating a PHP website, you need to install:
|
||||
|
||||
1. **Web 服务器**:Nginx、OpenResty 或 Apache
|
||||
2. **PHP 运行环境**:在 **应用** > **运行环境** 中安装所需的 PHP 版本
|
||||
1. **Web Server**: Nginx, OpenResty, or Apache
|
||||
2. **PHP Runtime Environment**: Install the required PHP version in **Applications** > **Runtime Environments**
|
||||
|
||||
## 创建 PHP 网站
|
||||
## Create PHP Website
|
||||
|
||||
1. 进入 **网站** 页面
|
||||
2. 点击 **PHP** 标签
|
||||
3. 点击 **创建网站**
|
||||
1. Go to the **Website** page
|
||||
2. Click the **PHP** tab
|
||||
3. Click **Create Website**
|
||||
|
||||
### 配置项
|
||||
### Configuration Items
|
||||
|
||||
- **名称**:网站标识,如 `wordpress`
|
||||
- **域名**:绑定的域名,如 `blog.example.com`
|
||||
- **端口**:监听端口,默认 80
|
||||
- **PHP 版本**:选择已安装的 PHP 版本
|
||||
- **网站目录**:网站文件存放路径
|
||||
- **备注**:可选备注
|
||||
- **Name**: Website identifier, e.g., `wordpress`
|
||||
- **Domain**: Bound domain, e.g., `blog.example.com`
|
||||
- **Port**: Listening port, default 80
|
||||
- **PHP Version**: Select an installed PHP version
|
||||
- **Website Directory**: Path where website files are stored
|
||||
- **Remarks**: Optional remarks
|
||||
|
||||
## 编辑 PHP 网站
|
||||
## Edit PHP Website
|
||||
|
||||
点击网站列表中的 **编辑** 按钮进入编辑页面。
|
||||
Click the **Edit** button in the website list to enter the edit page.
|
||||
|
||||
### 域名和监听
|
||||
### Domain and Listen
|
||||
|
||||
配置网站的域名和监听端口。
|
||||
Configure the website's domain and listening port.
|
||||
|
||||

|
||||

|
||||
|
||||
### 基本设置
|
||||
### Basic Settings
|
||||
|
||||
配置网站目录、PHP 版本等基本信息。
|
||||
Configure basic information such as website directory and PHP version.
|
||||
|
||||

|
||||

|
||||
|
||||
- **网站目录**:网站文件存放的绝对路径
|
||||
- **运行目录**:Laravel 等框架需要设置运行目录
|
||||
- **默认文档**:默认首页文件,如 `index.php`、`index.html`
|
||||
- **PHP 版本**:选择已安装的 PHP 版本
|
||||
- **防跨站攻击**:启用后限制 PHP 只能访问网站目录内的文件
|
||||
- **Website Directory**: Absolute path where website files are stored
|
||||
- **Run Directory**: Frameworks like Laravel need to set the run directory
|
||||
- **Default Document**: Default homepage file, e.g., `index.php`, `index.html`
|
||||
- **PHP Version**: Select an installed PHP version
|
||||
- **Anti-Cross-Site Attack**: When enabled, restricts PHP to only access files within the website directory
|
||||
|
||||
### 伪静态配置
|
||||
### Rewrite Configuration
|
||||
|
||||
伪静态用于 URL 重写,支持常见 PHP 程序的预设规则。
|
||||
Rewrite is used for URL rewriting, supporting preset rules for common PHP programs.
|
||||
|
||||

|
||||

|
||||
|
||||
点击预设下拉框可以选择常见程序的伪静态规则:
|
||||
Click the preset dropdown to select rewrite rules for common programs:
|
||||
|
||||

|
||||

|
||||
|
||||
支持的预设包括:WordPress、Laravel、ThinkPHP、Discuz、Drupal、ECShop 等常见 PHP 程序。
|
||||
Supported presets include: WordPress, Laravel, ThinkPHP, Discuz, Drupal, ECShop, and other common PHP programs.
|
||||
|
||||
## 网站目录结构
|
||||
## Website Directory Structure
|
||||
|
||||
创建网站后,默认目录结构:
|
||||
After creating a website, the default directory structure:
|
||||
|
||||
```
|
||||
/opt/ace/sites/网站名称/public
|
||||
├── index.php # 入口文件
|
||||
├── .user.ini # PHP 配置
|
||||
/opt/ace/sites/website-name/public
|
||||
├── index.php # Entry file
|
||||
├── .user.ini # PHP configuration
|
||||
└── ...
|
||||
```
|
||||
|
||||
## PHP 版本切换
|
||||
## PHP Version Switching
|
||||
|
||||
在网站编辑页面的 **基本设置** 中可以切换 PHP 版本:
|
||||
You can switch PHP versions in the **Basic Settings** of the website edit page:
|
||||
|
||||
1. 进入网站编辑页面
|
||||
2. 点击 **基本设置** 标签
|
||||
3. 在 **PHP 版本** 下拉框中选择新版本
|
||||
4. 点击 **保存**
|
||||
1. Enter the website edit page
|
||||
2. Click the **Basic Settings** tab
|
||||
3. Select a new version in the **PHP Version** dropdown
|
||||
4. Click **Save**
|
||||
|
||||
::: warning 注意
|
||||
切换 PHP 版本可能导致程序不兼容,请先在测试环境验证。
|
||||
::: warning Note
|
||||
Switching PHP versions may cause program incompatibility. Please verify in a test environment first.
|
||||
:::
|
||||
|
||||
## PHP 配置
|
||||
## PHP Configuration
|
||||
|
||||
### php.ini 配置
|
||||
### php.ini Configuration
|
||||
|
||||
在 **应用** > **原生应用** > **PHP** 管理页面可以修改 php.ini 配置。
|
||||
You can modify php.ini configuration in the **Applications** > **Native Applications** > **PHP** management page.
|
||||
|
||||
常用配置项:
|
||||
Common configuration items:
|
||||
|
||||
```ini
|
||||
upload_max_filesize = 50M # 最大上传文件大小
|
||||
post_max_size = 50M # POST 数据最大大小
|
||||
max_execution_time = 300 # 最大执行时间
|
||||
memory_limit = 256M # 内存限制
|
||||
upload_max_filesize = 50M # Maximum upload file size
|
||||
post_max_size = 50M # Maximum POST data size
|
||||
max_execution_time = 300 # Maximum execution time
|
||||
memory_limit = 256M # Memory limit
|
||||
```
|
||||
|
||||
### 禁用函数
|
||||
### Disabled Functions
|
||||
|
||||
PHP 默认禁用了一些危险函数,如 `exec`、`system`、`passthru` 等。如需启用,请在 php.ini 中修改 `disable_functions` 配置。
|
||||
PHP disables some dangerous functions by default, such as `exec`, `system`, `passthru`, etc. To enable them, modify the `disable_functions` configuration in php.ini.
|
||||
|
||||
::: danger 警告
|
||||
启用危险函数可能带来安全风险,请谨慎操作。
|
||||
::: danger Warning
|
||||
Enabling dangerous functions may pose security risks. Please proceed with caution.
|
||||
:::
|
||||
|
||||
## 常见问题
|
||||
## FAQ
|
||||
|
||||
### 502 Bad Gateway
|
||||
|
||||
- 检查 PHP-FPM 是否正常运行
|
||||
- 检查 PHP 版本是否正确配置
|
||||
- Check if PHP-FPM is running normally
|
||||
- Check if the PHP version is correctly configured
|
||||
|
||||
### 文件上传失败
|
||||
### File Upload Failed
|
||||
|
||||
- 检查 `upload_max_filesize` 和 `post_max_size` 配置
|
||||
- 检查目录权限
|
||||
- Check `upload_max_filesize` and `post_max_size` configuration
|
||||
- Check directory permissions
|
||||
|
||||
### 页面空白
|
||||
### Blank Page
|
||||
|
||||
- 开启 PHP 错误显示
|
||||
- 查看 PHP 错误日志
|
||||
- Enable PHP error display
|
||||
- Check PHP error logs
|
||||
|
||||
@@ -1,124 +1,124 @@
|
||||
# 反向代理
|
||||
# Reverse Proxy
|
||||
|
||||
反向代理网站用于将外部请求转发到后端服务,常用于部署 Node.js、Go、Java、Python 等应用。
|
||||
Reverse proxy websites are used to forward external requests to backend services, commonly used for deploying Node.js, Go, Java, Python, and other applications.
|
||||
|
||||
## 工作原理
|
||||
## How It Works
|
||||
|
||||
```
|
||||
用户请求 -> Nginx (反向代理) -> 后端应用 (如 localhost:3000)
|
||||
User Request -> Nginx (Reverse Proxy) -> Backend Application (e.g., localhost:3000)
|
||||
```
|
||||
|
||||
Nginx 接收用户的 HTTP/HTTPS 请求,然后将请求转发到指定的后端地址。
|
||||
Nginx receives HTTP/HTTPS requests from users and forwards them to the specified backend address.
|
||||
|
||||
## 创建反向代理网站
|
||||
## Create Reverse Proxy Website
|
||||
|
||||
1. 进入 **网站** 页面
|
||||
2. 确保选中 **反向代理** 标签
|
||||
3. 点击 **创建网站**
|
||||
1. Go to the **Website** page
|
||||
2. Make sure the **Reverse Proxy** tab is selected
|
||||
3. Click **Create Website**
|
||||
|
||||
### 配置项
|
||||
### Configuration Items
|
||||
|
||||
- **名称**:网站标识,如 `myapp`
|
||||
- **域名**:绑定的域名,如 `app.example.com`
|
||||
- **端口**:监听端口,默认 80
|
||||
- **代理目标**:后端服务地址,如 `http://127.0.0.1:3000`
|
||||
- **备注**:可选备注
|
||||
- **Name**: Website identifier, e.g., `myapp`
|
||||
- **Domain**: Bound domain, e.g., `app.example.com`
|
||||
- **Port**: Listening port, default 80
|
||||
- **Proxy Target**: Backend service address, e.g., `http://127.0.0.1:3000`
|
||||
- **Remarks**: Optional remarks
|
||||
|
||||
### 代理目标格式
|
||||
### Proxy Target Format
|
||||
|
||||
```
|
||||
http://127.0.0.1:3000 # 本地服务
|
||||
http://localhost:8080 # 本地服务
|
||||
http://172.18.0.2:80 # Docker 容器
|
||||
https://backend.internal # 内部 HTTPS 服务
|
||||
http://127.0.0.1:3000 # Local service
|
||||
http://localhost:8080 # Local service
|
||||
http://172.18.0.2:80 # Docker container
|
||||
https://backend.internal # Internal HTTPS service
|
||||
```
|
||||
|
||||
## 编辑反向代理网站
|
||||
## Edit Reverse Proxy Website
|
||||
|
||||
点击网站列表中的 **编辑** 按钮进入编辑页面。
|
||||
Click the **Edit** button in the website list to enter the edit page.
|
||||
|
||||
### 域名和监听
|
||||
### Domain and Listen
|
||||
|
||||
配置网站的域名和监听端口,支持添加多个域名和端口。
|
||||
Configure the website's domain and listening port, supporting multiple domains and ports.
|
||||
|
||||

|
||||

|
||||
|
||||
- **域名**:可添加多个域名
|
||||
- **监听地址**:可配置多个端口,支持 HTTPS 和 QUIC(HTTP3)
|
||||
- **Domain**: Multiple domains can be added
|
||||
- **Listen Address**: Multiple ports can be configured, supporting HTTPS and QUIC(HTTP3)
|
||||
|
||||
### 上游配置
|
||||
### Upstream Configuration
|
||||
|
||||
上游(Upstream)定义了后端服务器地址,支持配置多个后端实现负载均衡。
|
||||
Upstream defines backend server addresses, supporting multiple backends for load balancing.
|
||||
|
||||

|
||||

|
||||
|
||||
- **上游名称**:上游的标识名称
|
||||
- **负载均衡算法**:支持轮询(默认)、IP Hash 等算法
|
||||
- **保持活动连接**:与后端保持的长连接数量
|
||||
- **DNS 解析器**:自定义 DNS 解析器
|
||||
- **Upstream Name**: Identifier name for the upstream
|
||||
- **Load Balancing Algorithm**: Supports round-robin (default), IP Hash, and other algorithms
|
||||
- **Keep-Alive Connections**: Number of persistent connections to maintain with the backend
|
||||
- **DNS Resolver**: Custom DNS resolver
|
||||
|
||||
点击 **添加服务器** 按钮可以添加后端服务器:
|
||||
Click the **Add Server** button to add backend servers:
|
||||
|
||||

|
||||

|
||||
|
||||
- **服务器地址**:后端服务器地址,如 `127.0.0.1:8080`
|
||||
- **选项**:可选参数,如 `weight=5`(权重)、`backup`(备用服务器)等
|
||||
- **Server Address**: Backend server address, e.g., `127.0.0.1:8080`
|
||||
- **Options**: Optional parameters, e.g., `weight=5` (weight), `backup` (backup server), etc.
|
||||
|
||||
### 代理配置
|
||||
### Proxy Configuration
|
||||
|
||||
配置代理行为和请求头传递。
|
||||
Configure proxy behavior and request header forwarding.
|
||||
|
||||

|
||||

|
||||
|
||||
- **匹配类型**:匹配类型,如前缀匹配、正则匹配等
|
||||
- **匹配表达式**:匹配的 URL 表达式
|
||||
- **代理目标**:填写上游名称或直接填写后端地址
|
||||
- **启用缓存**:是否启用代理缓存
|
||||
- **启用缓冲区**:是否启用缓冲区,AI 应用建议关闭否则可能影响流式输出
|
||||
- **代理 SNI**:是否启用 SNI(仅 HTTPS 代理有效)
|
||||
- **自定义请求头**:添加或修改传递给后端的请求头
|
||||
- **响应内容替换**:可替换响应内容中的字符串
|
||||
- **Match Type**: Match type, such as prefix match, regex match, etc.
|
||||
- **Match Expression**: URL expression to match
|
||||
- **Proxy Target**: Enter upstream name or directly enter backend address
|
||||
- **Enable Cache**: Whether to enable proxy cache
|
||||
- **Enable Buffer**: Whether to enable buffer, AI applications are recommended to disable otherwise it may affect streaming output
|
||||
- **Proxy SNI**: Whether to enable SNI (only valid for HTTPS proxy)
|
||||
- **Custom Request Headers**: Add or modify request headers passed to the backend
|
||||
- **Response Content Replacement**: Can replace strings in response content
|
||||
|
||||
## 使用场景
|
||||
## Use Cases
|
||||
|
||||
### Node.js 应用
|
||||
### Node.js Application
|
||||
|
||||
```bash
|
||||
# 启动 Node.js 应用
|
||||
node app.js # 监听 3000 端口
|
||||
# Start Node.js application
|
||||
node app.js # Listening on port 3000
|
||||
```
|
||||
|
||||
代理目标:`http://127.0.0.1:3000`
|
||||
Proxy Target: `http://127.0.0.1:3000`
|
||||
|
||||
### Docker 容器
|
||||
### Docker Container
|
||||
|
||||
如果后端是 Docker 容器,可以使用容器的 IP 地址或容器名称(同一网络内)。
|
||||
If the backend is a Docker container, you can use the container's IP address or container name (within the same network).
|
||||
|
||||
代理目标:`http://容器名:端口` 或 `http://容器IP:端口`
|
||||
Proxy Target: `http://container-name:port` or `http://container-IP:port`
|
||||
|
||||
### 多个后端(负载均衡)
|
||||
### Multiple Backends (Load Balancing)
|
||||
|
||||
在上游配置中添加多个后端地址,实现负载均衡。
|
||||
Add multiple backend addresses in the upstream configuration to achieve load balancing.
|
||||
|
||||
代理目标:`http://上游名称`
|
||||
Proxy Target: `http://upstream-name`
|
||||
|
||||
## 常见配置
|
||||
## Common Configurations
|
||||
|
||||
### WebSocket 支持
|
||||
### WebSocket Support
|
||||
|
||||
反向代理默认支持 WebSocket,无需额外配置。
|
||||
Reverse proxy supports WebSocket by default, no additional configuration needed.
|
||||
|
||||
### 传递真实 IP
|
||||
### Forwarding Real IP
|
||||
|
||||
AcePanel 会自动配置以下请求头,将用户真实 IP 传递给后端:
|
||||
AcePanel automatically configures the following request headers to pass the user's real IP to the backend:
|
||||
|
||||
- `X-Real-IP`
|
||||
- `X-Forwarded-For`
|
||||
- `X-Forwarded-Proto`
|
||||
|
||||
### 自定义配置
|
||||
### Custom Configuration
|
||||
|
||||
在网站管理页面可以编辑 Nginx 配置,添加自定义配置:
|
||||
You can edit Nginx configuration in the website management page to add custom configurations:
|
||||
|
||||
```nginx
|
||||
proxy_connect_timeout 60s;
|
||||
@@ -128,8 +128,8 @@ proxy_buffer_size 64k;
|
||||
proxy_buffers 4 64k;
|
||||
```
|
||||
|
||||
## 注意事项
|
||||
## Notes
|
||||
|
||||
1. 确保后端服务已启动并监听指定端口
|
||||
2. 如果后端是 Docker 容器,确保端口已正确映射或使用 Docker 网络
|
||||
3. 后端服务崩溃时,Nginx 会返回 502 错误
|
||||
1. Ensure the backend service is started and listening on the specified port
|
||||
2. If the backend is a Docker container, ensure the port is correctly mapped or use Docker network
|
||||
3. When the backend service crashes, Nginx will return a 502 error
|
||||
|
||||
@@ -1,83 +1,83 @@
|
||||
# 纯静态网站
|
||||
# Static Website
|
||||
|
||||
纯静态网站用于托管 HTML、CSS、JavaScript 等静态文件,适合部署前端项目构建产物、文档站点等。
|
||||
Static websites are used to host HTML, CSS, JavaScript, and other static files, suitable for deploying frontend project build outputs, documentation sites, etc.
|
||||
|
||||
## 创建静态网站
|
||||
## Create Static Website
|
||||
|
||||
1. 进入 **网站** 页面
|
||||
2. 点击 **纯静态** 标签
|
||||
3. 点击 **创建网站**
|
||||
1. Go to the **Website** page
|
||||
2. Click the **Static** tab
|
||||
3. Click **Create Website**
|
||||
|
||||
### 配置项
|
||||
### Configuration Items
|
||||
|
||||
- **名称**:网站标识,如 `docs`
|
||||
- **域名**:绑定的域名,如 `docs.example.com`
|
||||
- **端口**:监听端口,默认 80
|
||||
- **网站目录**:静态文件存放路径
|
||||
- **备注**:可选备注
|
||||
- **Name**: Website identifier, e.g., `docs`
|
||||
- **Domain**: Bound domain, e.g., `docs.example.com`
|
||||
- **Port**: Listening port, default 80
|
||||
- **Website Directory**: Path where static files are stored
|
||||
- **Remarks**: Optional remarks
|
||||
|
||||
## 编辑静态网站
|
||||
## Edit Static Website
|
||||
|
||||
点击网站列表中的 **编辑** 按钮进入编辑页面。
|
||||
Click the **Edit** button in the website list to enter the edit page.
|
||||
|
||||
### 域名和监听
|
||||
### Domain and Listen
|
||||
|
||||
配置网站的域名和监听端口。
|
||||
Configure the website's domain and listening port.
|
||||
|
||||

|
||||

|
||||
|
||||
### 高级设置
|
||||
### Advanced Settings
|
||||
|
||||
配置网站日志、默认文档等高级选项。
|
||||
Configure advanced options such as website logs and default documents.
|
||||
|
||||

|
||||

|
||||
|
||||
- **网站目录**:静态文件存放的绝对路径
|
||||
- **默认文档**:默认首页文件,如 `index.html`
|
||||
- **Website Directory**: Absolute path where static files are stored
|
||||
- **Default Document**: Default homepage file, e.g., `index.html`
|
||||
|
||||
### 自定义配置(伪静态)
|
||||
### Custom Configuration (Rewrite)
|
||||
|
||||
在 **自定义配置** 标签中可以添加 Nginx 配置,用于 URL 重写等功能。
|
||||
In the **Custom Configuration** tab, you can add Nginx configuration for URL rewriting and other functions.
|
||||
|
||||

|
||||

|
||||
|
||||
点击 **添加自定义配置** 按钮可以添加配置:
|
||||
Click the **Add Custom Configuration** button to add configuration:
|
||||
|
||||

|
||||

|
||||
|
||||
- **名称**:配置名称,支持字母、数字、下划线、破折号
|
||||
- **范围**:配置生效范围,可选择"此网站"或"全局"
|
||||
- **内容**:Nginx 配置内容,如 `location` 块
|
||||
- **Name**: Configuration name, supports letters, numbers, underscores, and dashes
|
||||
- **Scope**: Configuration scope, can choose "This Website" or "Global"
|
||||
- **Content**: Nginx configuration content, such as `location` blocks
|
||||
|
||||
## 适用场景
|
||||
## Use Cases
|
||||
|
||||
### 前端项目
|
||||
### Frontend Projects
|
||||
|
||||
Vue、React、Angular 等前端框架的构建产物:
|
||||
Build outputs from Vue, React, Angular, and other frontend frameworks:
|
||||
|
||||
```bash
|
||||
# Vue 项目
|
||||
# Vue project
|
||||
npm run build
|
||||
# 将 dist 目录内容上传到网站目录
|
||||
# Upload dist directory contents to website directory
|
||||
|
||||
# React 项目
|
||||
# React project
|
||||
npm run build
|
||||
# 将 build 目录内容上传到网站目录
|
||||
# Upload build directory contents to website directory
|
||||
```
|
||||
|
||||
### 文档站点
|
||||
### Documentation Sites
|
||||
|
||||
VitePress、Docusaurus、Hugo 等静态站点生成器:
|
||||
Static site generators like VitePress, Docusaurus, Hugo:
|
||||
|
||||
```bash
|
||||
# VitePress
|
||||
npm run docs:build
|
||||
# 将 .vitepress/dist 目录内容上传到网站目录
|
||||
# Upload .vitepress/dist directory contents to website directory
|
||||
```
|
||||
|
||||
### 单页应用(SPA)
|
||||
### Single Page Application (SPA)
|
||||
|
||||
单页应用需要配置伪静态规则,将所有路由指向 index.html。在 **自定义配置** 中添加:
|
||||
Single page applications need to configure rewrite rules to point all routes to index.html. Add in **Custom Configuration**:
|
||||
|
||||
```nginx
|
||||
location / {
|
||||
@@ -85,35 +85,35 @@ location / {
|
||||
}
|
||||
```
|
||||
|
||||
## 目录结构
|
||||
## Directory Structure
|
||||
|
||||
典型的静态网站目录结构:
|
||||
Typical static website directory structure:
|
||||
|
||||
```
|
||||
/opt/ace/sites/网站名称/public
|
||||
├── index.html # 首页
|
||||
├── assets/ # 静态资源
|
||||
/opt/ace/sites/website-name/public
|
||||
├── index.html # Homepage
|
||||
├── assets/ # Static resources
|
||||
│ ├── css/
|
||||
│ ├── js/
|
||||
│ └── images/
|
||||
├── favicon.ico # 网站图标
|
||||
├── favicon.ico # Website icon
|
||||
└── ...
|
||||
```
|
||||
|
||||
## 常见问题
|
||||
## FAQ
|
||||
|
||||
### 404 错误
|
||||
### 404 Error
|
||||
|
||||
- 检查文件是否存在于网站目录
|
||||
- 检查文件名大小写(Linux 区分大小写)
|
||||
- 单页应用需要配置伪静态规则
|
||||
- Check if the file exists in the website directory
|
||||
- Check filename case sensitivity (Linux is case-sensitive)
|
||||
- Single page applications need to configure rewrite rules
|
||||
|
||||
### 资源加载失败
|
||||
### Resource Loading Failed
|
||||
|
||||
- 检查资源路径是否正确
|
||||
- 检查是否使用了绝对路径
|
||||
- 检查 CORS 配置
|
||||
- Check if the resource path is correct
|
||||
- Check if absolute paths are used
|
||||
- Check CORS configuration
|
||||
|
||||
### 中文文件名乱码
|
||||
### Chinese Filename Garbled
|
||||
|
||||
- 确保文件使用 UTF-8 编码
|
||||
- Ensure files use UTF-8 encoding
|
||||
|
||||
62
en/cert.md
62
en/cert.md
@@ -57,7 +57,7 @@ next: false
|
||||
}
|
||||
|
||||
.cert-card.featured::before {
|
||||
content: "推荐";
|
||||
content: "Recommended";
|
||||
position: absolute;
|
||||
top: -12px;
|
||||
right: 24px;
|
||||
@@ -272,98 +272,98 @@ next: false
|
||||
</style>
|
||||
|
||||
<div class="cert-hero">
|
||||
<h1>SSL 证书服务</h1>
|
||||
<p>免费证书有效期仅 3 个月且需要频繁续签,付费证书一年有效期,省心省力</p>
|
||||
<h1>SSL Certificate Service</h1>
|
||||
<p>Free certificates are only valid for 3 months and require frequent renewal. Paid certificates are valid for one year, saving you time and effort</p>
|
||||
</div>
|
||||
|
||||
<div class="cert-cards">
|
||||
<div class="cert-card">
|
||||
<div class="cert-card-icon">🔒</div>
|
||||
<h3>DV 单域名证书</h3>
|
||||
<div class="cert-card-desc">适合单个网站使用</div>
|
||||
<h3>DV Single Domain Certificate</h3>
|
||||
<div class="cert-card-desc">Suitable for a single website</div>
|
||||
<div class="cert-price">
|
||||
<span class="cert-price-value">¥1X</span>
|
||||
<span class="cert-price-unit"> / 年</span>
|
||||
<span class="cert-price-unit"> / year</span>
|
||||
</div>
|
||||
<div class="cert-features">
|
||||
<div class="cert-feature">
|
||||
<span class="cert-feature-check">✓</span>
|
||||
<span>域名验证 (DV) 证书</span>
|
||||
<span>Domain Validation (DV) Certificate</span>
|
||||
</div>
|
||||
<div class="cert-feature">
|
||||
<span class="cert-feature-check">✓</span>
|
||||
<span>保护单个域名</span>
|
||||
<span>Protects a single domain</span>
|
||||
</div>
|
||||
<div class="cert-feature">
|
||||
<span class="cert-feature-check">✓</span>
|
||||
<span>一年有效期</span>
|
||||
<span>One year validity</span>
|
||||
</div>
|
||||
<div class="cert-feature">
|
||||
<span class="cert-feature-check">✓</span>
|
||||
<span>国际认可品牌</span>
|
||||
<span>Internationally recognized brand</span>
|
||||
</div>
|
||||
</div>
|
||||
<a href="https://jq.qq.com/?_wv=1027&k=I1oJKSTH" target="_blank" class="cert-btn cert-btn-secondary">联系购买</a>
|
||||
<a href="https://jq.qq.com/?_wv=1027&k=I1oJKSTH" target="_blank" class="cert-btn cert-btn-secondary">Contact to Purchase</a>
|
||||
</div>
|
||||
|
||||
<div class="cert-card featured">
|
||||
<div class="cert-card-icon">🛡️</div>
|
||||
<h3>DV 泛域名证书</h3>
|
||||
<div class="cert-card-desc">一张证书保护所有子域名</div>
|
||||
<h3>DV Wildcard Certificate</h3>
|
||||
<div class="cert-card-desc">One certificate protects all subdomains</div>
|
||||
<div class="cert-price">
|
||||
<span class="cert-price-value">¥1XX</span>
|
||||
<span class="cert-price-unit"> / 年</span>
|
||||
<span class="cert-price-unit"> / year</span>
|
||||
</div>
|
||||
<div class="cert-features">
|
||||
<div class="cert-feature">
|
||||
<span class="cert-feature-check">✓</span>
|
||||
<span>域名验证 (DV) 证书</span>
|
||||
<span>Domain Validation (DV) Certificate</span>
|
||||
</div>
|
||||
<div class="cert-feature">
|
||||
<span class="cert-feature-check">✓</span>
|
||||
<span>保护所有子域名 (*.domain.com)</span>
|
||||
<span>Protects all subdomains (*.domain.com)</span>
|
||||
</div>
|
||||
<div class="cert-feature">
|
||||
<span class="cert-feature-check">✓</span>
|
||||
<span>一年有效期</span>
|
||||
<span>One year validity</span>
|
||||
</div>
|
||||
<div class="cert-feature">
|
||||
<span class="cert-feature-check">✓</span>
|
||||
<span>国际认可品牌</span>
|
||||
<span>Internationally recognized brand</span>
|
||||
</div>
|
||||
</div>
|
||||
<a href="https://jq.qq.com/?_wv=1027&k=I1oJKSTH" target="_blank" class="cert-btn cert-btn-primary">联系购买</a>
|
||||
<a href="https://jq.qq.com/?_wv=1027&k=I1oJKSTH" target="_blank" class="cert-btn cert-btn-primary">Contact to Purchase</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cert-why">
|
||||
<h2>为什么选择付费证书</h2>
|
||||
<h2>Why Choose Paid Certificates</h2>
|
||||
<div class="cert-why-grid">
|
||||
<div class="cert-why-item">
|
||||
<div class="cert-why-icon shield">🔐</div>
|
||||
<h4>更长有效期</h4>
|
||||
<p>一年有效期,无需频繁续签</p>
|
||||
<h4>Longer Validity</h4>
|
||||
<p>One year validity, no frequent renewal needed</p>
|
||||
</div>
|
||||
<div class="cert-why-item">
|
||||
<div class="cert-why-icon bolt">⚡</div>
|
||||
<h4>快速签发</h4>
|
||||
<p>付款后快速完成签发</p>
|
||||
<h4>Fast Issuance</h4>
|
||||
<p>Quick issuance after payment</p>
|
||||
</div>
|
||||
<div class="cert-why-item">
|
||||
<div class="cert-why-icon globe">🌐</div>
|
||||
<h4>国际品牌</h4>
|
||||
<p>全球浏览器信任</p>
|
||||
<h4>International Brand</h4>
|
||||
<p>Trusted by browsers worldwide</p>
|
||||
</div>
|
||||
<div class="cert-why-item">
|
||||
<div class="cert-why-icon support">💬</div>
|
||||
<h4>专业支持</h4>
|
||||
<p>遇到问题随时咨询</p>
|
||||
<h4>Professional Support</h4>
|
||||
<p>Consult anytime when you have questions</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cert-contact">
|
||||
<h3>需要帮助?</h3>
|
||||
<p>如有任何问题,欢迎加入 QQ 群咨询</p>
|
||||
<a href="https://jq.qq.com/?_wv=1027&k=I1oJKSTH" target="_blank" class="cert-contact-btn">加入 QQ 群 12370907</a>
|
||||
<h3>Need Help?</h3>
|
||||
<p>If you have any questions, feel free to join our QQ group for consultation</p>
|
||||
<a href="https://jq.qq.com/?_wv=1027&k=I1oJKSTH" target="_blank" class="cert-contact-btn">Join QQ Group 12370907</a>
|
||||
</div>
|
||||
|
||||
@@ -1,73 +1,73 @@
|
||||
# 应用常见问题
|
||||
# Application FAQ
|
||||
|
||||
## PHP 模块安装
|
||||
## PHP Module Installation
|
||||
|
||||
「应用」->「运行环境」->「PHP」->「管理」->「模块」,安装需要的模块。
|
||||
**Apps** -> **Runtimes** -> **PHP** -> **Manage** -> **Modules**, install the required modules.
|
||||
|
||||
部分模块需要编译安装,耗时较长,可在「任务」页面查看进度。
|
||||
Some modules require compilation and take longer to install. You can check the progress on the **Tasks** page.
|
||||
|
||||
## PHP 函数被禁用
|
||||
## PHP Functions Disabled
|
||||
|
||||
默认禁用了部分高危函数。如需启用:
|
||||
Some high-risk functions are disabled by default. To enable them:
|
||||
|
||||
「应用」->「运行环境」->「PHP」->「管理」->「配置」
|
||||
**Apps** -> **Runtimes** -> **PHP** -> **Manage** -> **Configuration**
|
||||
|
||||
找到 `disable_functions`,删除需要启用的函数名。
|
||||
Find `disable_functions` and remove the function names you want to enable.
|
||||
|
||||
::: warning 安全提示
|
||||
`exec`、`shell_exec`、`system` 等函数有安全风险,启用前需确认必要性。
|
||||
::: warning Security Warning
|
||||
Functions like `exec`, `shell_exec`, `system` have security risks. Please confirm necessity before enabling.
|
||||
:::
|
||||
|
||||
## Nginx 配置错误
|
||||
## Nginx Configuration Error
|
||||
|
||||
修改配置后 Nginx 无法启动,查看错误:
|
||||
If Nginx fails to start after modifying configuration, check the error:
|
||||
|
||||
```shell
|
||||
nginx -t
|
||||
```
|
||||
|
||||
修复配置后重启:
|
||||
After fixing the configuration, restart:
|
||||
|
||||
```shell
|
||||
systemctl restart nginx
|
||||
```
|
||||
|
||||
## Supervisor 启动报错
|
||||
## Supervisor Startup Error
|
||||
|
||||
### EACCES 权限错误
|
||||
### EACCES Permission Error
|
||||
|
||||
项目目录权限问题,确保目录所有者为 www:
|
||||
Project directory permission issue, ensure the directory owner is www:
|
||||
|
||||
```shell
|
||||
chown -R www:www /opt/ace/projects/项目名
|
||||
chown -R www:www /opt/ace/projects/project-name
|
||||
```
|
||||
|
||||
### 找不到 node/npm
|
||||
### Cannot Find node/npm
|
||||
|
||||
通过 nvm 安装的 Node.js 不在默认 PATH 中。
|
||||
Node.js installed via nvm is not in the default PATH.
|
||||
|
||||
「应用」->「Supervisor 管理器」->「管理」->「配置」,添加:
|
||||
**Apps** -> **Supervisor Manager** -> **Manage** -> **Configuration**, add:
|
||||
|
||||
```ini
|
||||
environment=PATH="/root/.nvm/versions/node/v24.0.0/bin:/usr/local/bin:/usr/bin:/bin"
|
||||
```
|
||||
|
||||
版本号替换为实际安装的版本,可通过 `whereis node` 查看路径。
|
||||
Replace the version number with the actual installed version. You can check the path with `whereis node`.
|
||||
|
||||
## 应用安装失败
|
||||
## Application Installation Failed
|
||||
|
||||
1. 检查网络连接
|
||||
2. 查看「任务」页面的错误信息
|
||||
3. 尝试「应用」页面点击「更新缓存」后重试
|
||||
1. Check network connection
|
||||
2. View error messages on the **Tasks** page
|
||||
3. Try clicking **Update Cache** on the **Apps** page and retry
|
||||
|
||||
## 应用无法卸载
|
||||
## Application Cannot Be Uninstalled
|
||||
|
||||
有依赖关系的应用需要先卸载依赖它的应用。
|
||||
Applications with dependencies need to uninstall dependent applications first.
|
||||
|
||||
如 phpMyAdmin 依赖 Nginx,需先卸载 phpMyAdmin。
|
||||
For example, phpMyAdmin depends on Nginx, so phpMyAdmin needs to be uninstalled first.
|
||||
|
||||
## 多版本 PHP 共存
|
||||
## Multiple PHP Versions Coexistence
|
||||
|
||||
可同时安装多个 PHP 版本,在创建网站时选择对应版本。
|
||||
Multiple PHP versions can be installed simultaneously. Select the corresponding version when creating a website.
|
||||
|
||||
已有网站切换版本:「编辑」->「基本设置」->「PHP 版本」。
|
||||
To switch versions for existing websites: **Edit** -> **Basic Settings** -> **PHP Version**.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# 容器常见问题
|
||||
# Container FAQ
|
||||
|
||||
## 镜像拉取失败
|
||||
## Image Pull Failed
|
||||
|
||||
国内服务器无法连接 Docker Hub,需配置镜像加速。
|
||||
Servers in China cannot connect to Docker Hub and need to configure mirror acceleration.
|
||||
|
||||
### Docker
|
||||
|
||||
「应用」->「Docker」->「管理」->「配置」,添加:
|
||||
**Apps** -> **Docker** -> **Manage** -> **Configuration**, add:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
### Podman
|
||||
|
||||
「应用」->「Podman」->「管理」->「Registry 配置」,末尾添加:
|
||||
**Apps** -> **Podman** -> **Manage** -> **Registry Configuration**, add at the end:
|
||||
|
||||
```toml
|
||||
[[registry]]
|
||||
@@ -25,47 +25,47 @@ location = "docker.io"
|
||||
location = "docker.1ms.run"
|
||||
```
|
||||
|
||||
镜像加速地址可使用 [毫秒镜像](https://1ms.run/) 或其他服务。
|
||||
For mirror acceleration addresses, you can use [1ms Mirror](https://1ms.run/) or other services.
|
||||
|
||||
## 编排启动失败
|
||||
## Compose Startup Failed
|
||||
|
||||
1. 点击「日志」查看错误信息
|
||||
2. 常见原因:
|
||||
- 端口被占用:修改映射端口
|
||||
- 镜像拉取失败:配置镜像加速
|
||||
- 配置错误:检查 docker-compose.yml 语法
|
||||
1. Click **Logs** to view error messages
|
||||
2. Common causes:
|
||||
- Port occupied: Modify the mapped port
|
||||
- Image pull failed: Configure mirror acceleration
|
||||
- Configuration error: Check docker-compose.yml syntax
|
||||
|
||||
## 容器无法访问
|
||||
## Container Inaccessible
|
||||
|
||||
1. 检查容器是否运行:「容器」->「容器」列表查看状态
|
||||
2. 检查端口映射是否正确
|
||||
3. 检查防火墙是否放行映射的主机端口
|
||||
1. Check if the container is running: View status in **Containers** -> **Containers** list
|
||||
2. Check if port mapping is correct
|
||||
3. Check if the firewall has allowed the mapped host port
|
||||
|
||||
## 容器内无法访问外网
|
||||
## Container Cannot Access External Network
|
||||
|
||||
检查 Docker 网络配置:
|
||||
Check Docker network configuration:
|
||||
|
||||
```shell
|
||||
docker network ls
|
||||
docker network inspect bridge
|
||||
```
|
||||
|
||||
## 数据持久化
|
||||
## Data Persistence
|
||||
|
||||
容器删除后数据会丢失。使用卷挂载持久化数据:
|
||||
Data will be lost after container deletion. Use volume mounts to persist data:
|
||||
|
||||
在编排配置中添加 volumes:
|
||||
Add volumes in the compose configuration:
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
```
|
||||
|
||||
## 查看容器日志
|
||||
## View Container Logs
|
||||
|
||||
```shell
|
||||
docker logs 容器名或ID
|
||||
docker logs -f 容器名或ID # 实时查看
|
||||
docker logs container-name-or-id
|
||||
docker logs -f container-name-or-id # Real-time view
|
||||
```
|
||||
|
||||
或在面板「容器」->「容器」列表点击「日志」。
|
||||
Or click **Logs** in the panel **Containers** -> **Containers** list.
|
||||
|
||||
@@ -1,72 +1,72 @@
|
||||
# 数据库常见问题
|
||||
# Database FAQ
|
||||
|
||||
## 忘记数据库密码
|
||||
## Forgot Database Password
|
||||
|
||||
### MySQL/MariaDB/Percona
|
||||
|
||||
在面板「数据库」->「用户」中修改用户密码。
|
||||
Modify user password in panel **Databases** -> **Users**.
|
||||
|
||||
如果忘记 root 密码,可前往「应用」->「MySQL/MariaDB/Percona」->「管理」中查看/重置。
|
||||
If you forgot the root password, you can view/reset it in **Apps** -> **MySQL/MariaDB/Percona** -> **Manage**.
|
||||
|
||||
### PostgreSQL
|
||||
|
||||
在面板「数据库」->「用户」中修改用户密码。
|
||||
Modify user password in panel **Databases** -> **Users**.
|
||||
|
||||
如果忘记 postgres 用户密码,可前往「应用」->「PostgreSQL」->「管理」中查看/重置。
|
||||
If you forgot the postgres user password, you can view/reset it in **Apps** -> **PostgreSQL** -> **Manage**.
|
||||
|
||||
## 远程连接数据库
|
||||
## Remote Database Connection
|
||||
|
||||
默认只允许本地连接。如需远程连接:
|
||||
Only local connections are allowed by default. For remote connections:
|
||||
|
||||
MySQL/MariaDB/Percona:
|
||||
MySQL/MariaDB/Percona:
|
||||
|
||||
1. 在「数据库」->「用户」中,新建一个用户主机为 `%`(允许所有 IP)或指定 IP 的用户
|
||||
2. 在防火墙放行数据库端口 3306
|
||||
1. In **Databases** -> **Users**, create a new user with host set to `%` (allow all IPs) or a specific IP
|
||||
2. Allow database port 3306 in the firewall
|
||||
|
||||
PostgreSQL:
|
||||
PostgreSQL:
|
||||
|
||||
1. 前往「应用」->「PostgreSQL」->「管理」中编辑主配置找到`listen_addresses`,取消注释并将其值改为 `'*'`
|
||||
2. 在同一页面编辑用户配置,添加一行:`host all 用户名 (IP地址/掩码/all) scram-sha-256` 并保存
|
||||
3. 重启 PostgreSQL 服务
|
||||
4. 在防火墙放行数据库端口 5432
|
||||
1. Go to **Apps** -> **PostgreSQL** -> **Manage**, edit the main configuration, find `listen_addresses`, uncomment it and change its value to `'*'`
|
||||
2. On the same page, edit the user configuration, add a line: `host all username (IP-address/mask/all) scram-sha-256` and save
|
||||
3. Restart the PostgreSQL service
|
||||
4. Allow database port 5432 in the firewall
|
||||
|
||||
::: warning 安全提示
|
||||
不建议将数据库端口暴露到公网,建议使用 SSH 隧道或 VPN 连接。
|
||||
::: warning Security Warning
|
||||
It is not recommended to expose database ports to the public network. It is recommended to use SSH tunnels or VPN connections.
|
||||
:::
|
||||
|
||||
## 连接被拒绝
|
||||
## Connection Refused
|
||||
|
||||
1. 检查数据库服务是否运行
|
||||
2. 检查用户权限和主机设置
|
||||
3. 检查连接地址:本地连接用 `localhost` 或 `127.0.0.1`
|
||||
1. Check if the database service is running
|
||||
2. Check user permissions and host settings
|
||||
3. Check connection address: Use `localhost` or `127.0.0.1` for local connections
|
||||
|
||||
## 导入大文件失败
|
||||
## Large File Import Failed
|
||||
|
||||
phpMyAdmin 有上传限制。大文件建议用命令行导入:
|
||||
phpMyAdmin has upload limits. For large files, it is recommended to import via command line:
|
||||
|
||||
```shell
|
||||
mysql -u 用户名 -p 数据库名 < 文件.sql
|
||||
mysql -u username -p database_name < file.sql
|
||||
```
|
||||
|
||||
或使用面板的文件管理上传后,在终端执行导入。
|
||||
Or upload using the panel's file manager, then execute the import in the terminal.
|
||||
|
||||
## 数据库备份
|
||||
## Database Backup
|
||||
|
||||
1. 「备份」->「创建备份」选择数据库
|
||||
2. 或使用命令行:
|
||||
1. **Backup** -> **Create Backup**, select database
|
||||
2. Or use command line:
|
||||
|
||||
```shell
|
||||
# MySQL
|
||||
mysqldump -u 用户名 -p 数据库名 > backup.sql
|
||||
mysqldump -u username -p database_name > backup.sql
|
||||
|
||||
# PostgreSQL
|
||||
pg_dump -U 用户名 数据库名 > backup.sql
|
||||
pg_dump -U username database_name > backup.sql
|
||||
```
|
||||
|
||||
## 字符集问题
|
||||
## Character Set Issues
|
||||
|
||||
已有数据库修改字符集:
|
||||
To modify character set for existing databases:
|
||||
|
||||
```sql
|
||||
ALTER DATABASE 数据库名 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
ALTER DATABASE database_name CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
```
|
||||
|
||||
@@ -1,98 +1,98 @@
|
||||
# 面板常见问题
|
||||
# Panel FAQ
|
||||
|
||||
## 面板打不开
|
||||
## Panel Won't Open
|
||||
|
||||
SSH 登录服务器,检查面板状态:
|
||||
SSH into the server and check panel status:
|
||||
|
||||
```shell
|
||||
acepanel status
|
||||
```
|
||||
|
||||
如果服务已停止,启动它:
|
||||
If the service has stopped, start it:
|
||||
|
||||
```shell
|
||||
acepanel start
|
||||
```
|
||||
|
||||
如果无法启动,尝试修复:
|
||||
If it cannot start, try to repair:
|
||||
|
||||
```shell
|
||||
acepanel fix && acepanel update
|
||||
```
|
||||
|
||||
服务正常但仍无法访问,检查防火墙:
|
||||
If the service is running but still inaccessible, check the firewall:
|
||||
|
||||
```shell
|
||||
# 检查端口是否监听
|
||||
curl -I http://127.0.0.1:面板端口/
|
||||
# Check if port is listening
|
||||
curl -I http://127.0.0.1:panel-port/
|
||||
|
||||
# 放行端口(firewalld)
|
||||
firewall-cmd --add-port=面板端口/tcp --permanent
|
||||
# Allow port (firewalld)
|
||||
firewall-cmd --add-port=panel-port/tcp --permanent
|
||||
firewall-cmd --reload
|
||||
```
|
||||
|
||||
云服务器还需检查安全组设置。
|
||||
For cloud servers, also check security group settings.
|
||||
|
||||
查看面板日志排查问题:
|
||||
View panel logs to troubleshoot:
|
||||
|
||||
```shell
|
||||
journalctl -u acepanel -n 100
|
||||
```
|
||||
|
||||
## 忘记密码/用户名/地址
|
||||
## Forgot Password/Username/Address
|
||||
|
||||
```shell
|
||||
acepanel info
|
||||
```
|
||||
|
||||
输出面板地址、用户名,并生成新密码。
|
||||
Outputs panel address, username, and generates a new password.
|
||||
|
||||
## 修改面板端口
|
||||
## Change Panel Port
|
||||
|
||||
```shell
|
||||
acepanel port 12345
|
||||
```
|
||||
|
||||
修改后需在服务器安全组/防火墙放行新端口。
|
||||
After modification, you need to allow the new port in the server security group/firewall.
|
||||
|
||||
## 关闭安全入口
|
||||
## Disable Security Entry
|
||||
|
||||
如果忘记安全入口路径:
|
||||
If you forgot the security entry path:
|
||||
|
||||
```shell
|
||||
acepanel entrance off
|
||||
```
|
||||
|
||||
## 关闭域名/IP 绑定
|
||||
## Disable Domain/IP Binding
|
||||
|
||||
绑定后无法访问面板:
|
||||
If you cannot access the panel after binding:
|
||||
|
||||
```shell
|
||||
acepanel bind-domain off
|
||||
acepanel bind-ip off
|
||||
```
|
||||
|
||||
## 关闭两步验证
|
||||
## Disable Two-Factor Authentication
|
||||
|
||||
```shell
|
||||
acepanel user 2fa admin
|
||||
```
|
||||
|
||||
## 证书错误
|
||||
## Certificate Error
|
||||
|
||||
面板默认使用自签名证书,浏览器会提示不安全,点击「继续访问」即可。
|
||||
The panel uses a self-signed certificate by default, and the browser will show an insecure warning. Click "Continue" to proceed.
|
||||
|
||||
申请正式证书:
|
||||
To apply for a proper certificate:
|
||||
|
||||
```shell
|
||||
acepanel https generate
|
||||
```
|
||||
|
||||
需要确保服务器 IP 80 端口可直接访问。
|
||||
You need to ensure the server IP port 80 is directly accessible.
|
||||
|
||||
## acepanel 命令无权限
|
||||
## acepanel Command Permission Denied
|
||||
|
||||
必须以 root 用户执行,或使用 sudo:
|
||||
Must be executed as root user, or use sudo:
|
||||
|
||||
```shell
|
||||
sudo acepanel status
|
||||
|
||||
@@ -1,66 +1,66 @@
|
||||
# 项目常见问题
|
||||
# Project FAQ
|
||||
|
||||
## 项目启动失败
|
||||
## Project Startup Failed
|
||||
|
||||
点击「日志」查看错误信息。常见原因:
|
||||
Click **Logs** to view error messages. Common causes:
|
||||
|
||||
### 权限问题
|
||||
### Permission Issues
|
||||
|
||||
项目目录应在 `/opt/ace/projects/` 下,所有者为 www:
|
||||
Project directory should be under `/opt/ace/projects/`, owned by www:
|
||||
|
||||
```shell
|
||||
chown -R www:www /opt/ace/projects/项目名
|
||||
chown -R www:www /opt/ace/projects/project-name
|
||||
```
|
||||
|
||||
如果部署在 `/root` 下,需使用 root 用户运行(不推荐)。
|
||||
If deployed under `/root`, you need to run as root user (not recommended).
|
||||
|
||||
### 找不到命令
|
||||
### Command Not Found
|
||||
|
||||
如 `node: No such file or directory`,说明环境变量未配置。
|
||||
Such as `node: No such file or directory`, indicates environment variables are not configured.
|
||||
|
||||
解决方法:
|
||||
1. 在「编辑」->「依赖」中关联运行环境
|
||||
2. 或在「运行设置」->「环境变量」中添加 PATH
|
||||
Solutions:
|
||||
1. Associate runtime environment in **Edit** -> **Dependencies**
|
||||
2. Or add PATH in **Runtime Settings** -> **Environment Variables**
|
||||
|
||||
### 端口被占用
|
||||
### Port Already in Use
|
||||
|
||||
修改应用监听端口,或停止占用端口的进程:
|
||||
Modify the application listening port, or stop the process occupying the port:
|
||||
|
||||
```shell
|
||||
lsof -i:3000 # 查看占用端口的进程
|
||||
lsof -i:3000 # View process occupying the port
|
||||
```
|
||||
|
||||
## 配置环境变量
|
||||
## Configure Environment Variables
|
||||
|
||||
「编辑」->「运行设置」->「环境变量」,点击「添加」。
|
||||
**Edit** -> **Runtime Settings** -> **Environment Variables**, click **Add**.
|
||||
|
||||
常用配置:
|
||||
Common configurations:
|
||||
- `NODE_ENV=production`
|
||||
- `PORT=3000`
|
||||
|
||||
## 预启动命令
|
||||
## Pre-start Command
|
||||
|
||||
在项目启动前执行,如安装依赖:
|
||||
Executed before project startup, such as installing dependencies:
|
||||
|
||||
- Node.js:`npm install` 或 `yarn`
|
||||
- Python:`pip install -r requirements.txt`
|
||||
- Go:`go build`
|
||||
- Node.js: `npm install` or `yarn`
|
||||
- Python: `pip install -r requirements.txt`
|
||||
- Go: `go build`
|
||||
|
||||
## 查看项目日志
|
||||
## View Project Logs
|
||||
|
||||
1. 面板:项目列表点击「日志」
|
||||
2. 命令行:`journalctl -u ace-project-项目名 -f`
|
||||
1. Panel: Click **Logs** in the project list
|
||||
2. Command line: `journalctl -u ace-project-project-name -f`
|
||||
|
||||
## 项目自动重启
|
||||
## Project Auto Restart
|
||||
|
||||
在「运行设置」中配置:
|
||||
Configure in **Runtime Settings**:
|
||||
|
||||
- **重启策略**:失败时重启 / 总是重启 / 不重启
|
||||
- **重启间隔**:两次重启之间的等待时间
|
||||
- **最大重启次数**:防止无限重启
|
||||
- **Restart Policy**: Restart on failure / Always restart / Never restart
|
||||
- **Restart Interval**: Wait time between restarts
|
||||
- **Max Restart Count**: Prevent infinite restarts
|
||||
|
||||
## 反向代理配置
|
||||
## Reverse Proxy Configuration
|
||||
|
||||
创建项目时开启「反向代理」,会自动创建一个反向代理网站。
|
||||
Enable **Reverse Proxy** when creating a project, and a reverse proxy website will be automatically created.
|
||||
|
||||
手动配置:创建反向代理网站,上游地址填 `http://127.0.0.1:项目端口`。
|
||||
Manual configuration: Create a reverse proxy website with upstream address `http://127.0.0.1:project-port`.
|
||||
|
||||
@@ -1,80 +1,80 @@
|
||||
# 网站常见问题
|
||||
# Website FAQ
|
||||
|
||||
## 网站无法访问
|
||||
## Website Inaccessible
|
||||
|
||||
1. 检查域名是否解析到服务器 IP
|
||||
2. 检查防火墙是否放行 80/443 端口
|
||||
3. 检查 Nginx 是否运行:「应用」->「Nginx」->「管理」
|
||||
4. 查看 Nginx 错误日志
|
||||
1. Check if the domain is resolved to the server IP
|
||||
2. Check if the firewall has allowed ports 80/443
|
||||
3. Check if Nginx is running: **Apps** -> **Nginx** -> **Manage**
|
||||
4. View Nginx error logs
|
||||
|
||||
## 403 Forbidden
|
||||
|
||||
通常是权限问题:
|
||||
Usually a permission issue:
|
||||
|
||||
```shell
|
||||
# 修复网站目录权限
|
||||
chown -R www:www /opt/ace/sites/网站名/public
|
||||
chmod -R 755 /opt/ace/sites/网站名/public
|
||||
# Fix website directory permissions
|
||||
chown -R www:www /opt/ace/sites/website-name/public
|
||||
chmod -R 755 /opt/ace/sites/website-name/public
|
||||
```
|
||||
|
||||
## 502 Bad Gateway
|
||||
|
||||
PHP 网站出现 502,检查 PHP 是否运行:
|
||||
For PHP websites with 502, check if PHP is running:
|
||||
|
||||
1. 「应用」->「运行环境」->「PHP」->「管理」
|
||||
2. 确认 PHP 版本与网站配置一致
|
||||
3. 查看 PHP 错误日志
|
||||
1. **Apps** -> **Runtimes** -> **PHP** -> **Manage**
|
||||
2. Confirm PHP version matches website configuration
|
||||
3. View PHP error logs
|
||||
|
||||
反向代理网站出现 502,检查后端服务是否运行。
|
||||
For reverse proxy websites with 502, check if the backend service is running.
|
||||
|
||||
## 伪静态不生效
|
||||
## Rewrite Rules Not Working
|
||||
|
||||
1. 确认在「伪静态」标签页选择了正确的预设或填写了规则
|
||||
2. 点击「保存」后 Nginx 会自动重载
|
||||
3. 清除浏览器缓存后测试
|
||||
1. Confirm the correct preset is selected or rules are filled in the **Rewrite** tab
|
||||
2. Nginx will automatically reload after clicking **Save**
|
||||
3. Clear browser cache and test
|
||||
|
||||
## 配置 QUIC (HTTP/3)
|
||||
## Configure QUIC (HTTP/3)
|
||||
|
||||
面板支持 QUIC,但默认不添加 `Alt-Svc` 头。在自定义配置中添加:
|
||||
The panel supports QUIC, but does not add the `Alt-Svc` header by default. Add in custom configuration:
|
||||
|
||||
```nginx
|
||||
add_header Alt-Svc 'h3=":$server_port"; ma=2592000';
|
||||
```
|
||||
|
||||
确保服务器安全组/防火墙放行 UDP 443 端口。
|
||||
Ensure the server security group/firewall allows UDP port 443.
|
||||
|
||||
## 启用 TLSv1/TLSv1.1
|
||||
## Enable TLSv1/TLSv1.1
|
||||
|
||||
OpenSSL 3.x 默认禁用旧协议。如必须使用,在「HTTPS」设置中修改密码套件:
|
||||
OpenSSL 3.x disables old protocols by default. If you must use them, modify the cipher suite in **HTTPS** settings:
|
||||
|
||||
```nginx
|
||||
ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:AES128-SHA:AES256-SHA:DES-CBC3-SHA:@SECLEVEL=0;
|
||||
```
|
||||
|
||||
## 启用 IPv6
|
||||
## Enable IPv6
|
||||
|
||||
在「域名和监听」添加监听地址:`[::]:80` 和 `[::]:443`。
|
||||
Add listening addresses in **Domains and Listening**: `[::]:80` and `[::]:443`.
|
||||
|
||||
## CDN 回源与 HTTPS
|
||||
## CDN Origin and HTTPS
|
||||
|
||||
| CDN 回源协议 | 网站 HTTPS 配置 |
|
||||
|----------|---------------------|
|
||||
| HTTP | 无需开启 |
|
||||
| HTTPS | 必须开启 |
|
||||
| 协议跟随 | 必须开启,且不能开启 HTTP 重定向 |
|
||||
| CDN Origin Protocol | Website HTTPS Configuration |
|
||||
|---------------------|----------------------------|
|
||||
| HTTP | Not required |
|
||||
| HTTPS | Must be enabled |
|
||||
| Follow Protocol | Must be enabled, and HTTP redirect must not be enabled |
|
||||
|
||||
## 上传文件大小限制
|
||||
## Upload File Size Limit
|
||||
|
||||
默认限制 100MB。修改 PHP 配置:
|
||||
Default limit is 100MB. Modify PHP configuration:
|
||||
|
||||
1. 「应用」->「运行环境」->「PHP」->「管理」->「主配置」
|
||||
2. 修改 `upload_max_filesize` 和 `post_max_size`
|
||||
3. 保存后重启 PHP
|
||||
1. **Apps** -> **Runtimes** -> **PHP** -> **Manage** -> **Main Configuration**
|
||||
2. Modify `upload_max_filesize` and `post_max_size`
|
||||
3. Restart PHP after saving
|
||||
|
||||
## SSL 证书申请失败
|
||||
## SSL Certificate Application Failed
|
||||
|
||||
1. 确认域名已解析到服务器
|
||||
2. 确认 80 端口可访问(Let's Encrypt 验证需要)
|
||||
3. 检查是否超过 Let's Encrypt 速率限制
|
||||
4. 尝试使用 DNS 验证方式
|
||||
5. 更换其他证书提供商
|
||||
1. Confirm the domain is resolved to the server
|
||||
2. Confirm port 80 is accessible (required for Let's Encrypt verification)
|
||||
3. Check if Let's Encrypt rate limit is exceeded
|
||||
4. Try using DNS verification method
|
||||
5. Switch to another certificate provider
|
||||
|
||||
@@ -1,56 +1,56 @@
|
||||
# 命令行工具
|
||||
# Command Line Tool
|
||||
|
||||
AcePanel 提供命令行工具 `acepanel`,用于在无法访问 Web 界面时进行面板管理。
|
||||
AcePanel provides the command line tool `acepanel` for panel management when the Web interface is inaccessible.
|
||||
|
||||
## 服务管理
|
||||
## Service Management
|
||||
|
||||
::: warning 注意
|
||||
后台任务运行时请勿停止或重启面板,可能导致任务中断或数据丢失。
|
||||
::: warning Note
|
||||
Do not stop or restart the panel while background tasks are running, as this may cause task interruption or data loss.
|
||||
:::
|
||||
|
||||
```shell
|
||||
acepanel start # 启动
|
||||
acepanel stop # 停止
|
||||
acepanel restart # 重启
|
||||
acepanel status # 查看状态
|
||||
acepanel start # Start
|
||||
acepanel stop # Stop
|
||||
acepanel restart # Restart
|
||||
acepanel status # View status
|
||||
```
|
||||
|
||||
## 用户管理
|
||||
## User Management
|
||||
|
||||
```shell
|
||||
acepanel user list # 列出所有用户
|
||||
acepanel user username <旧用户名> <新用户名> # 修改用户名
|
||||
acepanel user password <用户名> <新密码> # 修改密码
|
||||
acepanel user 2fa <用户名> # 开关两步验证
|
||||
acepanel user list # List all users
|
||||
acepanel user username <old_username> <new_username> # Change username
|
||||
acepanel user password <username> <new_password> # Change password
|
||||
acepanel user 2fa <username> # Toggle two-factor authentication
|
||||
```
|
||||
|
||||
## 安全设置
|
||||
## Security Settings
|
||||
|
||||
```shell
|
||||
acepanel https on|off # 开关 HTTPS
|
||||
acepanel https generate # 生成证书(自签名或 Let's Encrypt)
|
||||
acepanel entrance on|off # 开关安全入口
|
||||
acepanel port <端口号> # 修改监听端口
|
||||
acepanel bind-domain off # 解除域名绑定
|
||||
acepanel bind-ip off # 解除 IP 绑定
|
||||
acepanel bind-ua off # 解除 UA 绑定
|
||||
acepanel https on|off # Toggle HTTPS
|
||||
acepanel https generate # Generate certificate (self-signed or Let's Encrypt)
|
||||
acepanel entrance on|off # Toggle security entrance
|
||||
acepanel port <port_number> # Change listening port
|
||||
acepanel bind-domain off # Unbind domain
|
||||
acepanel bind-ip off # Unbind IP
|
||||
acepanel bind-ua off # Unbind UA
|
||||
```
|
||||
|
||||
## 维护命令
|
||||
## Maintenance Commands
|
||||
|
||||
```shell
|
||||
acepanel update # 更新面板
|
||||
acepanel fix # 修复更新问题
|
||||
acepanel sync # 同步缓存数据
|
||||
acepanel sync-time # 同步服务器时间
|
||||
acepanel clear-task # 清空任务队列
|
||||
acepanel info # 查看面板信息并重置密码
|
||||
acepanel help # 帮助
|
||||
acepanel update # Update panel
|
||||
acepanel fix # Fix update issues
|
||||
acepanel sync # Sync cache data
|
||||
acepanel sync-time # Sync server time
|
||||
acepanel clear-task # Clear task queue
|
||||
acepanel info # View panel info and reset password
|
||||
acepanel help # Help
|
||||
```
|
||||
|
||||
## 示例
|
||||
## Example
|
||||
|
||||
修改用户 `admin` 的密码为 `newpassword`:
|
||||
Change the password of user `admin` to `newpassword`:
|
||||
|
||||
```shell
|
||||
acepanel user password admin newpassword
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
# 第一个容器:部署 pgAdmin 4
|
||||
# First Container: Deploy pgAdmin 4
|
||||
|
||||
本文以 pgAdmin 4 为例,演示如何通过 AcePanel 快速部署 Docker 容器。
|
||||
This article uses pgAdmin 4 as an example to demonstrate how to quickly deploy Docker containers through AcePanel.
|
||||
|
||||
## 安装 Docker
|
||||
## Install Docker
|
||||
|
||||
进入「应用」页面,在「原生应用」中找到 Docker 并安装。安装进度可在「任务」页面查看。
|
||||
Go to the "Applications" page, find Docker in "Native Applications" and install it. Installation progress can be viewed on the "Tasks" page.
|
||||
|
||||
::: tip 国内服务器
|
||||
国内服务器拉取镜像较慢,建议配置 [毫秒镜像](https://1ms.run/) 提供的付费加速源。
|
||||
::: tip Servers in China
|
||||
Pulling images is slow on servers in China. It is recommended to configure the paid acceleration source provided by [Millisecond Mirror](https://1ms.run/).
|
||||
:::
|
||||
|
||||
## 部署容器
|
||||
## Deploy Container
|
||||
|
||||
进入「应用」->「容器模板」,找到 pgAdmin 4,点击「部署」。
|
||||
Go to "Applications" -> "Container Templates", find pgAdmin 4, and click "Deploy".
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
选择「创建新编排」后填写配置:
|
||||
Select "Create New Compose" and fill in the configuration:
|
||||
|
||||

|
||||

|
||||
|
||||
- **编排名称**:给编排起个名字,如 `pg4admin`
|
||||
- **自动启动**:勾选后创建完成自动拉取镜像并启动
|
||||
- **自动防火墙**:勾选后自动放行端口
|
||||
- **访问端口**:容器 80 端口映射到主机端口,如 `999`
|
||||
- **管理员邮箱/密码**:pgAdmin 4 的登录凭据
|
||||
- **Compose Name**: Give the compose a name, e.g., `pg4admin`
|
||||
- **Auto Start**: When checked, automatically pull images and start after creation
|
||||
- **Auto Firewall**: When checked, automatically allow ports
|
||||
- **Access Port**: Map container port 80 to host port, e.g., `999`
|
||||
- **Admin Email/Password**: Login credentials for pgAdmin 4
|
||||
|
||||
点击「下一步」预览编排配置,确认后点击「创建」。
|
||||
Click "Next" to preview the compose configuration, then click "Create" to confirm.
|
||||
|
||||
## 等待启动
|
||||
## Wait for Startup
|
||||
|
||||
如果勾选了「自动启动」,创建后会弹窗显示拉取和启动进度:
|
||||
If "Auto Start" is checked, a popup will show the pull and startup progress after creation:
|
||||
|
||||

|
||||

|
||||
|
||||
也可以在「容器」->「编排」页面手动管理:
|
||||
You can also manually manage in "Containers" -> "Compose" page:
|
||||
|
||||

|
||||

|
||||
|
||||
## 访问服务
|
||||
## Access Service
|
||||
|
||||
启动完成后,浏览器访问 `http://服务器IP:端口`(如 `http://x.x.x.x:999`),用之前设置的邮箱和密码登录即可。
|
||||
After startup is complete, access `http://ServerIP:Port` (e.g., `http://x.x.x.x:999`) in your browser, and log in with the email and password you set earlier.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# 第一个项目:部署 Node.js 应用
|
||||
# First Project: Deploy Node.js Application
|
||||
|
||||
本文以一个简单的 Node.js HTTP 服务为例,演示如何通过 AcePanel 部署和管理项目。
|
||||
This article uses a simple Node.js HTTP service as an example to demonstrate how to deploy and manage projects through AcePanel.
|
||||
|
||||
## 准备代码
|
||||
## Prepare Code
|
||||
|
||||
先准备一个简单的 Node.js 应用。在项目目录创建 `app.js`:
|
||||
First, prepare a simple Node.js application. Create `app.js` in the project directory:
|
||||
|
||||
```javascript
|
||||
const http = require('http');
|
||||
@@ -19,56 +19,56 @@ server.listen(3000, () => {
|
||||
});
|
||||
```
|
||||
|
||||
## 创建项目
|
||||
## Create Project
|
||||
|
||||
进入「项目」页面,点击「创建项目」。
|
||||
Go to the "Projects" page, click "Create Project".
|
||||
|
||||

|
||||

|
||||
|
||||
填写配置:
|
||||
Fill in the configuration:
|
||||
|
||||
- **项目名**:项目标识,如 `hello-node`
|
||||
- **项目目录**:留空使用默认路径
|
||||
- **运行用户**:一般选 `www`
|
||||
- **启动命令**:`node app.js`
|
||||
- **反向代理**:如需通过域名访问,可开启自动创建反向代理
|
||||
- **Project Name**: Project identifier, e.g., `hello-node`
|
||||
- **Project Directory**: Leave empty to use default path
|
||||
- **Run User**: Usually select `www`
|
||||
- **Start Command**: `node app.js`
|
||||
- **Reverse Proxy**: Enable auto-create reverse proxy if you need to access via domain
|
||||
|
||||
## 上传代码
|
||||
## Upload Code
|
||||
|
||||
项目创建后,进入「文件」页面,导航到项目目录(如 `/opt/ace/projects/hello-node`),上传 `app.js` 文件。
|
||||
After the project is created, go to the "Files" page, navigate to the project directory (e.g., `/opt/ace/projects/hello-node`), and upload the `app.js` file.
|
||||
|
||||
也可以通过终端用 git clone 拉取代码。
|
||||
You can also use git clone in the terminal to pull the code.
|
||||
|
||||
## 配置项目
|
||||
## Configure Project
|
||||
|
||||
在项目列表点击「编辑」,可以调整更多设置:
|
||||
Click "Edit" in the project list to adjust more settings:
|
||||
|
||||

|
||||

|
||||
|
||||
**运行设置**:
|
||||
- **预启动命令**:启动前执行,如 `npm install`
|
||||
- **重启策略**:进程异常退出时的处理方式
|
||||
- **环境变量**:设置 `NODE_ENV=production` 等
|
||||
**Run Settings**:
|
||||
- **Pre-start Command**: Execute before starting, e.g., `npm install`
|
||||
- **Restart Policy**: How to handle abnormal process exits
|
||||
- **Environment Variables**: Set `NODE_ENV=production`, etc.
|
||||
|
||||
**依赖**:可以关联 Node.js 运行环境版本。
|
||||
**Dependencies**: You can associate Node.js runtime environment version.
|
||||
|
||||
## 启动项目
|
||||
## Start Project
|
||||
|
||||
回到项目列表,点击「启动」按钮。
|
||||
Return to the project list, click the "Start" button.
|
||||
|
||||

|
||||

|
||||
|
||||
启动后可点击「日志」查看输出,确认服务正常运行。
|
||||
After starting, you can click "Logs" to view output and confirm the service is running normally.
|
||||
|
||||
## 访问服务
|
||||
## Access Service
|
||||
|
||||
如果开启了反向代理,通过配置的域名访问即可。
|
||||
If reverse proxy is enabled, access via the configured domain.
|
||||
|
||||
如果没有,可以通过 `http://服务器IP:3000` 直接访问(需在防火墙放行 3000 端口)。
|
||||
If not, you can access directly via `http://ServerIP:3000` (need to allow port 3000 in the firewall).
|
||||
|
||||
::: tip 生产环境
|
||||
生产环境建议:
|
||||
- 开启「自启动」,服务器重启后自动恢复
|
||||
- 配置反向代理,通过 Nginx 转发请求
|
||||
- 在「资源限制」中设置内存上限,防止内存泄漏
|
||||
::: tip Production Environment
|
||||
Production environment recommendations:
|
||||
- Enable "Auto Start" to automatically recover after server restart
|
||||
- Configure reverse proxy to forward requests through Nginx
|
||||
- Set memory limits in "Resource Limits" to prevent memory leaks
|
||||
:::
|
||||
|
||||
@@ -1,52 +1,52 @@
|
||||
# 第一个网站:部署 WordPress
|
||||
# First Website: Deploy WordPress
|
||||
|
||||
本文以 WordPress 为例,演示如何通过 AcePanel 快速搭建 PHP 网站。
|
||||
This article uses WordPress as an example to demonstrate how to quickly set up a PHP website through AcePanel.
|
||||
|
||||
## 安装环境
|
||||
## Install Environment
|
||||
|
||||
进入「应用」页面:
|
||||
Go to the "Applications" page:
|
||||
|
||||
1. 在「原生应用」中安装 Nginx 和 MySQL(或 Percona/MariaDB)
|
||||
2. 在「运行环境」中安装 PHP(建议 8.0+)
|
||||
1. Install Nginx and Percona (or MySQL/MariaDB) in "Native Applications"
|
||||
2. Install PHP (8.3+ recommended) in "Runtime Environment"
|
||||
|
||||
安装进度可在「任务」页面查看。
|
||||
Installation progress can be viewed on the "Tasks" page.
|
||||
|
||||
## 创建网站
|
||||
## Create Website
|
||||
|
||||
进入「网站」->「PHP」,点击「创建网站」。
|
||||
Go to "Website" -> "PHP", click "Create Website".
|
||||
|
||||

|
||||

|
||||
|
||||
填写配置:
|
||||
Fill in the configuration:
|
||||
|
||||
- **名称**:网站标识,如 `wordpress`,创建后不可改
|
||||
- **域名**:你的域名,没有域名可填服务器 IP
|
||||
- **根目录**:留空使用默认路径
|
||||
- **PHP 版本**:选择刚安装的版本
|
||||
- **数据库**:选择 MySQL,记下生成的数据库名、用户名、密码
|
||||
- **Name**: Website identifier, e.g., `wordpress`, cannot be changed after creation
|
||||
- **Domain**: Your domain name, use server IP if you don't have a domain
|
||||
- **Root Directory**: Leave empty to use default path
|
||||
- **PHP Version**: Select the version you just installed
|
||||
- **Database**: Select MySQL, note down the generated database name, username, and password
|
||||
|
||||
## 上传 WordPress
|
||||
## Upload WordPress
|
||||
|
||||
从 [WordPress 官网](https://wordpress.org/download/) 下载安装包。
|
||||
Download the installation package from the [WordPress official website](https://wordpress.org/download/).
|
||||
|
||||
在网站列表点击「目录」进入文件管理,上传压缩包并解压。进入 `wordpress` 目录,`Ctrl+A` 全选,`Ctrl+X` 剪切,返回上级目录 `Ctrl+V` 粘贴,把文件移到网站根目录。
|
||||
Click "Directory" in the website list to enter file management, upload the compressed package and extract it. Enter the `wordpress` directory, `Ctrl+A` to select all, `Ctrl+X` to cut, return to the parent directory and `Ctrl+V` to paste, moving the files to the website root directory.
|
||||
|
||||
## 配置伪静态
|
||||
## Configure Rewrite Rules
|
||||
|
||||
回到网站列表,点击「编辑」,切换到「伪静态」标签页,选择预设的 `wordpress` 规则并保存。
|
||||
Return to the website list, click "Edit", switch to the "Rewrite" tab, select the preset `wordpress` rule and save.
|
||||
|
||||

|
||||

|
||||
|
||||
::: tip HTTPS
|
||||
可在「HTTPS」标签页一键签发免费的 Let's Encrypt 证书。
|
||||
You can issue a free Let's Encrypt certificate with one click in the "HTTPS" tab.
|
||||
:::
|
||||
|
||||
## 安装 WordPress
|
||||
## Install WordPress
|
||||
|
||||
浏览器访问你的域名,按提示完成安装:
|
||||
Access your domain in the browser and follow the prompts to complete the installation:
|
||||
|
||||
1. 选择语言
|
||||
2. 填写站点信息(标题、管理员账号等)
|
||||
3. 数据库配置:填入之前记下的数据库信息,主机填 `localhost`
|
||||
1. Select language
|
||||
2. Fill in site information (title, admin account, etc.)
|
||||
3. Database configuration: Enter the database information noted earlier, host is `localhost`
|
||||
|
||||
安装完成后即可登录 WordPress 后台。
|
||||
After installation, you can log in to the WordPress admin panel.
|
||||
|
||||
@@ -1,75 +1,75 @@
|
||||
# 安装
|
||||
# Installation
|
||||
|
||||
## 系统要求
|
||||
## System Requirements
|
||||
|
||||
- 架构:`amd64` / `arm64`
|
||||
- 内存:≥ 512MB(建议 1GB 以上)
|
||||
- 磁盘:≥ 10GB 可用空间
|
||||
- Architecture: `amd64` / `arm64`
|
||||
- Memory: ≥ 512MB (1GB or more recommended)
|
||||
- Disk: ≥ 10GB available space
|
||||
|
||||
## 支持的操作系统
|
||||
## Supported Operating Systems
|
||||
|
||||
| 系统 | 版本 | 状态 |
|
||||
|------------------|----|-----|
|
||||
| AlmaLinux | 10 | 推荐 |
|
||||
| AlmaLinux | 9 | 支持 |
|
||||
| RockyLinux | 10 | 推荐 |
|
||||
| RockyLinux | 9 | 支持 |
|
||||
| Debian | 13 | 推荐 |
|
||||
| Debian | 12 | 支持 |
|
||||
| Ubuntu | 24 | 推荐 |
|
||||
| Ubuntu | 22 | 支持 |
|
||||
| OpenCloudOS | 9 | 支持 |
|
||||
| TencentOS Server | 4 | 支持 |
|
||||
| CentOS Stream | 10 | 不推荐 |
|
||||
| CentOS Stream | 9 | 不推荐 |
|
||||
| System | Version | Status |
|
||||
|--------------------|---------|-----------------|
|
||||
| AlmaLinux | 10 | Recommended |
|
||||
| AlmaLinux | 9 | Supported |
|
||||
| RockyLinux | 10 | Recommended |
|
||||
| RockyLinux | 9 | Supported |
|
||||
| Debian | 13 | Recommended |
|
||||
| Debian | 12 | Supported |
|
||||
| Ubuntu | 24 | Recommended |
|
||||
| Ubuntu | 22 | Supported |
|
||||
| OpenCloudOS | 9 | Supported |
|
||||
| TencentOS Server | 4 | Supported |
|
||||
| CentOS Stream | 10 | Not Recommended |
|
||||
| CentOS Stream | 9 | Not Recommended |
|
||||
|
||||
未列出的系统可自行尝试安装,但不提供技术支持。
|
||||
Systems not listed can be tried at your own risk, but technical support is not provided.
|
||||
|
||||
## 安装前准备
|
||||
## Pre-installation Preparation
|
||||
|
||||
- 使用纯净系统安装,避免与已有环境冲突
|
||||
- 如需挂载数据盘,请在安装前完成,安装后不支持目录迁移
|
||||
- 确保服务器能正常访问外网
|
||||
- Use a clean system for installation to avoid conflicts with existing environments
|
||||
- If you need to mount a data disk, complete it before installation; directory migration is not supported after installation
|
||||
- Ensure the server can access the internet normally
|
||||
|
||||
## 开始安装
|
||||
## Start Installation
|
||||
|
||||
::: tip AcePanel 推荐使用
|
||||
[林枫云高性能 AMD EYPC 服务器](https://www.dkdun.cn/aff/MQZZNVHQ) 服务器安装
|
||||
::: tip AcePanel Recommends
|
||||
[LF Cloud High-Performance AMD EPYC Servers](https://www.dkdun.cn/aff/MQZZNVHQ) for installation
|
||||
:::
|
||||
|
||||
以 `root` 用户登录服务器,执行:
|
||||
Log in to the server as `root` user and execute:
|
||||
|
||||
```shell
|
||||
bash <(curl -sSLm 10 https://dl.acepanel.net/helper.sh)
|
||||
```
|
||||
|
||||
安装过程中请勿关闭终端。
|
||||
Do not close the terminal during installation.
|
||||
|
||||
## 安装完成
|
||||
## Installation Complete
|
||||
|
||||
安装完成后,终端会输出面板访问地址和初始账号密码:
|
||||
After installation, the terminal will display the panel access address and initial account credentials:
|
||||
|
||||
```
|
||||
========================================
|
||||
AcePanel 安装完成
|
||||
用户名:xxxxxxxx
|
||||
密码:xxxxxxxxxxxxxxxx
|
||||
端口:xxxxx
|
||||
入口:/xxxxxx
|
||||
AcePanel Installation Complete
|
||||
Username: xxxxxxxx
|
||||
Password: xxxxxxxxxxxxxxxx
|
||||
Port: xxxxx
|
||||
Entry: /xxxxxx
|
||||
========================================
|
||||
```
|
||||
|
||||
首次访问可能需在浏览器信任自签名证书。
|
||||
First-time access may require trusting the self-signed certificate in your browser.
|
||||
|
||||
## 常见问题
|
||||
## FAQ
|
||||
|
||||
**无法访问面板**
|
||||
**Cannot access the panel**
|
||||
|
||||
检查云服务器安全组和防火墙设置,确保放行面板端口。
|
||||
Check the cloud server security group and firewall settings to ensure the panel port is allowed.
|
||||
|
||||
**忘记用户/密码/地址**
|
||||
**Forgot username/password/address**
|
||||
|
||||
使用命令行工具一键重置:
|
||||
Use the command line tool to reset:
|
||||
|
||||
```shell
|
||||
acepanel info
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
# 产品介绍
|
||||
# Product Introduction
|
||||
|
||||
AcePanel 是一款开源的服务器运维管理面板。
|
||||
AcePanel is an open-source server operation and maintenance management panel.
|
||||
|
||||
## 特性
|
||||
## Features
|
||||
|
||||
- **极低占用**:Go 语言开发,单文件运行,资源占用极低
|
||||
- **低破坏性**:尽可能减少对系统的修改,同类产品中最少
|
||||
- **追随时代**:对新系统兼容性好,技术栈保持更新
|
||||
- **高效运维**:功能完善,自定义能力强,适用于简单到复杂的部署场景
|
||||
- **离线运行**:支持离线模式,停止面板不影响已部署的服务
|
||||
- **安全稳定**:多重安全机制,生产环境长期稳定运行
|
||||
- **完整开源**:全部代码开源,可自由修改和二次开发
|
||||
- **永久免费**:面板本体不会引入任何收费功能
|
||||
- **Extremely Low Footprint**: Developed in Go language, single file operation, extremely low resource usage
|
||||
- **Low Destructiveness**: Minimizes modifications to the system, the least among similar products
|
||||
- **Following the Times**: Good compatibility with new systems, technology stack stays updated
|
||||
- **Efficient Operation**: Complete features, strong customization capabilities, suitable for simple to complex deployment scenarios
|
||||
- **Offline Operation**: Supports offline mode, stopping the panel does not affect deployed services
|
||||
- **Safe and Stable**: Multiple security mechanisms, long-term stable operation in production environments
|
||||
- **Fully Open Source**: All code is open source, free to modify and develop
|
||||
- **Permanently Free**: The panel itself will not introduce any paid features
|
||||
|
||||
## 功能
|
||||
## Functions
|
||||
|
||||
**快速建站**
|
||||
**Quick Website Setup**
|
||||
|
||||
深度集成 Nginx、MySQL、PHP 等主流服务,一键部署 LNMP 环境,支持多版本共存。
|
||||
Deeply integrated with mainstream services like Nginx, MySQL, PHP, one-click LNMP environment deployment, supports multiple version coexistence.
|
||||
|
||||
**文件管理**
|
||||
**File Management**
|
||||
|
||||
类似 Windows 资源管理器的操作体验,支持快捷键、批量操作、在线编辑。
|
||||
Windows Explorer-like operation experience, supports shortcuts, batch operations, and online editing.
|
||||
|
||||
**备份恢复**
|
||||
**Backup and Recovery**
|
||||
|
||||
网站、数据库一键备份与恢复,支持定时备份和远程存储。
|
||||
One-click backup and recovery for websites and databases, supports scheduled backups and remote storage.
|
||||
|
||||
## 对比
|
||||
## Comparison
|
||||
|
||||
| 特性 | AcePanel | 同类产品 1 | 同类产品 B |
|
||||
|------|-----------------|------------------|-----------------------------|
|
||||
| 用户界面 | 清爽现代 | 现代化设计 | 功能繁杂,广告较多 |
|
||||
| 开源情况 | 完整开源 | 仅开源非专业版 | 部分开源,提交记录不完整 |
|
||||
| 资源占用 | 极低,单文件运行 | core + agent 双进程 | 较高 |
|
||||
| 应用中心 | 原生应用 + 容器编排 | 仅容器编排 | 应用陈旧,更新缓慢 |
|
||||
| 技术栈 | Go 1.25 + Vue 3 | Go 1.24 + Vue 3 | Python 3.7 + Vue 3 + jQuery |
|
||||
| Feature | AcePanel | Similar Product 1 | Similar Product B |
|
||||
|----------------|-----------------|--------------------------|---------------------------------------|
|
||||
| User Interface | Clean and modern | Modern design | Complex features, more advertisements |
|
||||
| Open Source | Fully open source | Only non-pro version | Partially open source, incomplete commit history |
|
||||
| Resource Usage | Extremely low, single file | core + agent dual process | Higher |
|
||||
| App Center | Native apps + container orchestration | Container orchestration only | Outdated apps, slow updates |
|
||||
| Tech Stack | Go 1.25 + Vue 3 | Go 1.24 + Vue 3 | Python 3.7 + Vue 3 + jQuery |
|
||||
|
||||
@@ -1,167 +1,167 @@
|
||||
# AcePanel 3.0 正式发布
|
||||
# AcePanel 3.0 Official Release
|
||||
|
||||
好久不见,经过几次跳票延期,AcePanel 3.0 终于在 2026 年初完成开发,经过了约 3 个星期的内测,现在是时候发布了。
|
||||
Long time no see. After several delays, AcePanel 3.0 was finally completed in early 2026. After about 3 weeks of internal testing, it's time to release.
|
||||
|
||||
## 升级全新品牌名称 AcePanel
|
||||
## Upgraded to New Brand Name AcePanel
|
||||
|
||||
AcePanel 原名耗子面板,是本人 2022 年底开发的服务器运维管理面板。
|
||||
AcePanel was originally named Haozi Panel, a server operation and maintenance management panel I developed at the end of 2022.
|
||||
|
||||
之前收到最多的一个反馈就是耗子面板这个名字不好听,于是我们现在换了更高端大气上档次的名字 - AcePanel,你也可以叫它王牌面板/艾斯面板。
|
||||
The most common feedback I received was that the name Haozi Panel didn't sound good, so we've now changed to a more sophisticated name - AcePanel.
|
||||
|
||||

|
||||
|
||||
本文以下 AcePanel 均表示 AcePanel 3.0 版本
|
||||
In this article, AcePanel refers to AcePanel 3.0 version.
|
||||
|
||||
## 支持运行环境与项目管理
|
||||
## Support for Runtime Environments and Project Management
|
||||
|
||||
AcePanel 这次最大的更新就是新增了运行环境功能,支持一键安装与管理 Go、Java、Node.js、PHP、Python 等运行环境,支持多版本同时共存。
|
||||
The biggest update in AcePanel is the new runtime environment feature, supporting one-click installation and management of Go, Java, Node.js, PHP, Python and other runtime environments, with support for multiple versions coexisting.
|
||||
|
||||

|
||||

|
||||
|
||||
同时 AcePanel 基于 Linux systemd 的强大能力全新开发了项目管理功能,支持通过安装的运行环境一键创建与管理各类 Web 项目和常驻程序,可平替 PM2、Supervisor 等工具。
|
||||
At the same time, AcePanel has developed a brand new project management feature based on the powerful capabilities of Linux systemd, supporting one-click creation and management of various Web projects and daemon programs through installed runtime environments, which can replace tools like PM2 and Supervisor.
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
## 网站管理重构
|
||||
## Website Management Refactored
|
||||
|
||||
AcePanel 还对网站管理功能进行了重构,重新组织了网站目录结构,支持反向代理、纯静态、PHP 3 种网站类型,并新增了多项常用配置以及自定义功能。
|
||||
AcePanel has also refactored the website management feature, reorganized the website directory structure, supports 3 website types: reverse proxy, static, and PHP, and added multiple common configurations and customization features.
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
新的网站目录结构允许灵活添加各种自定义配置,且不易冲突。
|
||||
The new website directory structure allows flexible addition of various custom configurations without conflicts.
|
||||
|
||||
## 应用中心优化
|
||||
## App Center Optimization
|
||||
|
||||
AcePanel 正式上线期待已久的容器编排模版功能,支持一键部署 WordPress、Nextcloud、GitLab 等常用程序。
|
||||
AcePanel officially launches the long-awaited container compose template feature, supporting one-click deployment of common programs like WordPress, Nextcloud, GitLab, etc.
|
||||
|
||||

|
||||

|
||||
|
||||
(缺少你想要的程序?欢迎向 AcePanel 模版库提交 PR,方式可见文末)
|
||||
(Missing the program you want? Feel free to submit a PR to the AcePanel template library, see the end of this article for details)
|
||||
|
||||
AcePanel 在原有 OpenResty 与 Percona 的基础上新增 Nginx 与 MySQL、MariaDB,同时还优化了许多应用的安装流程以提高安装速度,特别对 Percona/MySQL/MariaDB 为常用系统使用预制安装包以极大提高安装速度和成功率。
|
||||
AcePanel has added Nginx, MySQL, and MariaDB on top of the original OpenResty and Percona, and optimized the installation process of many applications to improve installation speed. Especially for Percona/MySQL/MariaDB, pre-built installation packages are used for common systems to greatly improve installation speed and success rate.
|
||||
|
||||
(实测 MySQL 通常可以在 2 分钟内完成安装)
|
||||
(In testing, MySQL can usually be installed within 2 minutes)
|
||||
|
||||
## 备份优化
|
||||
## Backup Optimization
|
||||
|
||||
AcePanel 优化了备份功能,新增备份存储设置,支持添加 S3、SFTP 等常用远程存储。
|
||||
AcePanel has optimized the backup feature, added backup storage settings, supporting common remote storage like S3, SFTP, etc.
|
||||
|
||||
(你可能会问为什么没有 OSS、COS?这是因为 OSS、COS 等均提供 S3 兼容接口,可直接使用 S3 配置,因此没必要单独为它们引入依赖以及额外开发。)
|
||||
(You might ask why there's no OSS, COS? This is because OSS, COS, etc. all provide S3-compatible interfaces and can be configured directly using S3, so there's no need to introduce dependencies and additional development for them separately.)
|
||||
|
||||

|
||||

|
||||
|
||||
## 全新的面板助手
|
||||
## Brand New Panel Helper
|
||||
|
||||
AcePanel 使用 Go 语言重写了原来基于 shell 脚本的安装器,新的面板助手全面支持交互式安装及多语言,提供更好、更现代的用户体验。
|
||||
AcePanel has rewritten the original shell script-based installer using Go language. The new panel helper fully supports interactive installation and multiple languages, providing a better and more modern user experience.
|
||||
|
||||

|
||||

|
||||
|
||||
## 使用优化
|
||||
## Usage Optimization
|
||||
|
||||
AcePanel 全面优化了文件管理,还原类似 Windows 资源管理器的操作体验(支持快捷键操作)。
|
||||
AcePanel has comprehensively optimized file management, restoring an operation experience similar to Windows Explorer (supports keyboard shortcuts).
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
基于 Monaco 开发全新的文件编辑器,即是编辑器,亦可作为在线 IDE 使用(同样支持快捷键操作)。
|
||||
A brand new file editor developed based on Monaco, which is both an editor and can be used as an online IDE (also supports keyboard shortcuts).
|
||||
|
||||

|
||||

|
||||
|
||||
工具箱能力全面提升,进程管理支持右键操作,同时新增 SSH 服务管理,磁盘管理,日志清理以及 Web 钩子等功能。
|
||||
Toolbox capabilities have been comprehensively enhanced. Process management supports right-click operations, and new features include SSH service management, disk management, log cleanup, and Web hooks.
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
计划任务周期选择器重写,提供更友好的交互体验。
|
||||
The scheduled task period selector has been rewritten, providing a more friendly interaction experience.
|
||||
|
||||

|
||||

|
||||
|
||||
## 其他优化
|
||||
## Other Optimizations
|
||||
|
||||
- 支持使用 ACME 申请 Let's Encrypt IP 证书
|
||||
- 入口错误页支持自定义
|
||||
- 登录支持自动开启验证码
|
||||
- 自定义 Logo 与隐藏菜单支持长期保存
|
||||
- 新增操作日志记录与查看功能
|
||||
- 证书管理新增 ACME ARI 支持
|
||||
- 图标全面本地化,不再需要依赖外部 CDN
|
||||
- Nginx/OpenResty 新增 Stream 支持(四层代理)
|
||||
- 新增 PHP 8.5 支持
|
||||
- 新增 Apache Web 服务器基础支持
|
||||
- 新增 LiteSSL 证书支持
|
||||
- 容器与编排创建/启动支持实时显示进度
|
||||
- 容器支持一键进入终端
|
||||
- 资源监控支持自定义时间范围与网卡/磁盘选择
|
||||
- 首页应用支持拖拽排序
|
||||
- 文件管理支持大文件分片上传
|
||||
- 文件管理支持压缩包双击解压
|
||||
- 应用与运行环境、容器模版支持分类筛选
|
||||
- SSH 终端支持私钥登录
|
||||
- 系统工具箱 - DNS 适配现代网络管理方式
|
||||
- 支持可视化修改 Docker 基本设置
|
||||
- 数据库服务器列表支持一键进入终端
|
||||
- 部分删除操作新增 5s 倒计时确认
|
||||
- Support using ACME to apply for Let's Encrypt IP certificates
|
||||
- Entrance error page supports customization
|
||||
- Login supports automatic captcha activation
|
||||
- Custom Logo and hidden menu support long-term saving
|
||||
- Added operation log recording and viewing feature
|
||||
- Certificate management adds ACME ARI support
|
||||
- Icons are fully localized, no longer dependent on external CDN
|
||||
- Nginx/OpenResty adds Stream support (Layer 4 proxy)
|
||||
- Added PHP 8.5 support
|
||||
- Added Apache Web server basic support
|
||||
- Added LiteSSL certificate support
|
||||
- Container and compose creation/startup supports real-time progress display
|
||||
- Container supports one-click terminal access
|
||||
- Resource monitoring supports custom time range and network card/disk selection
|
||||
- Homepage apps support drag-and-drop sorting
|
||||
- File management supports large file chunked upload
|
||||
- File management supports double-click to extract compressed files
|
||||
- Apps, runtime environments, and container templates support category filtering
|
||||
- SSH terminal supports private key login
|
||||
- System toolbox - DNS adapts to modern network management methods
|
||||
- Support visual modification of Docker basic settings
|
||||
- Database server list supports one-click terminal access
|
||||
- Some delete operations add 5-second countdown confirmation
|
||||
|
||||
## 问题修复
|
||||
## Bug Fixes
|
||||
|
||||
- 修复登录超过 120 分钟后面板自动登出的问题
|
||||
- 修复 Docker 29+ 版本无法使用面板容器功能的问题
|
||||
- 修复面板偶现 ERR_CONNECTION_REFUSED 错误的问题
|
||||
- 修复面板 Websocket 会话存在资源泄露的问题
|
||||
- 修复部分情况下防火墙端口放行不生效的问题
|
||||
- 修复 PHP 设置默认 cli 版本不生效的问题
|
||||
- 修复 rsync secrets 换行符写入不正确的问题
|
||||
- 修复 fail2ban IPv6 地址显示和解封问题
|
||||
- 其他已知问题修复
|
||||
- Fixed the issue where the panel automatically logs out after logging in for more than 120 minutes
|
||||
- Fixed the issue where Docker 29+ versions cannot use panel container features
|
||||
- Fixed the occasional ERR_CONNECTION_REFUSED error in the panel
|
||||
- Fixed the resource leak issue in panel Websocket sessions
|
||||
- Fixed the issue where firewall port allowance doesn't take effect in some cases
|
||||
- Fixed the issue where PHP setting default cli version doesn't take effect
|
||||
- Fixed the issue where rsync secrets newline characters are written incorrectly
|
||||
- Fixed fail2ban IPv6 address display and unban issues
|
||||
- Other known bug fixes
|
||||
|
||||
## 兼容性变化
|
||||
## Compatibility Changes
|
||||
|
||||
鉴于 openEuler 及 Alibaba Cloud Linux 4 和 Anolis 23 等新版信创系统把软件源改的面目全非,适配极其困难,因此 AcePanel 3.0 决定放弃对这三个发行版的支持。建议切换到 AlmaLinux / Rocky Linux 使用,如必须使用信创系统可考虑 OpenCloudOS 9 或 TencentOS Server 4。
|
||||
Given that openEuler, Alibaba Cloud Linux 4, and Anolis 23 and other new domestic systems have changed their software sources beyond recognition, making adaptation extremely difficult, AcePanel 3.0 has decided to drop support for these three distributions. It is recommended to switch to AlmaLinux / Rocky Linux. If you must use domestic systems, consider OpenCloudOS 9 or TencentOS Server 4.
|
||||
|
||||
同时 AcePanel 3.0 版本起,不再支持基于 4.x 内核的 RHEL 8-based 系统(AlmaLinux 8/Rocky Linux 8),请升级至 9.x/10.x 使用。
|
||||
Also starting from AcePanel 3.0, RHEL 8-based systems (AlmaLinux 8/Rocky Linux 8) based on 4.x kernel are no longer supported. Please upgrade to 9.x/10.x.
|
||||
|
||||
其次为支持预制安装包以解决饱受诟病的 MySQL 编译慢问题,AcePanel 修改了默认安装目录为 `/opt/ace` 且不再允许自定义(预计影响不大,仍可在安装前挂载数据盘)。
|
||||
Additionally, to support pre-built installation packages to solve the much-criticized slow MySQL compilation issue, AcePanel has changed the default installation directory to `/opt/ace` and no longer allows customization (expected to have minimal impact, you can still mount data disks before installation).
|
||||
|
||||
|
||||
## 关于旧版本升级及维护
|
||||
## About Old Version Upgrade and Maintenance
|
||||
|
||||
计划在 AcePanel 3.0 稳定一段时间之后推出旧版耗子面板 2.x 升级至 AcePanel 3.0 的脚本,鉴于改动较大,预计无法实现完美升级,请留意。
|
||||
We plan to release a script to upgrade from the old Haozi Panel 2.x to AcePanel 3.0 after AcePanel 3.0 has been stable for a while. Given the significant changes, a perfect upgrade is not expected to be achievable, please be aware.
|
||||
|
||||
旧版耗子面板 2.x 仍将继续维护一段时间的安全更新(预计到 2026 年底),您可在此期间自行安排时间点进行升级。
|
||||
The old Haozi Panel 2.x will continue to receive security updates for a period of time (expected until the end of 2026). You can arrange your upgrade during this period.
|
||||
|
||||
## 开源协议变化
|
||||
## Open Source License Change
|
||||
|
||||
新版本 AcePanel 决定使用更宽松的开源协议 BSD-3,希望未来能有更多的开发者参与进来,一起打造更好用的服务器面板。
|
||||
The new version of AcePanel has decided to use the more permissive BSD-3 open source license, hoping that more developers will participate in the future to build a better server panel together.
|
||||
|
||||
当前可参与贡献的项目如下:
|
||||
Current projects available for contribution:
|
||||
|
||||
- [AcePanel 主程序(求star)](https://github.com/acepanel/panel)
|
||||
- [AcePanel 安装器](https://github.com/acepanel/helper)
|
||||
- [AcePanel 容器模版库](https://github.com/acepanel/templates)
|
||||
- [AcePanel 文档](https://github.com/acepanel/acepanel.github.io)
|
||||
- [AcePanel 翻译](https://zh.crowdin.com/project/acepanel)
|
||||
- [AcePanel Main Program (please star)](https://github.com/acepanel/panel)
|
||||
- [AcePanel Installer](https://github.com/acepanel/helper)
|
||||
- [AcePanel Container Template Library](https://github.com/acepanel/templates)
|
||||
- [AcePanel Documentation](https://github.com/acepanel/acepanel.github.io)
|
||||
- [AcePanel Translation](https://zh.crowdin.com/project/acepanel)
|
||||
|
||||
不会代码?没关系,欢迎发表使用 AcePanel 搭建各种服务、发掘不同玩法的文章,帮助推广 AcePanel。
|
||||
Don't know how to code? No problem, feel free to publish articles about using AcePanel to build various services and discover different ways to play, helping to promote AcePanel.
|
||||
|
||||
## 结束语
|
||||
## Closing Remarks
|
||||
|
||||
写这篇文章的时候是夜里 4 点多,转眼这个项目已经在上个月度过其 3 岁生日,当年写下第一行代码时我还对 Go 一窍不通,如今已经成长为有些人口中的大佬。
|
||||
When writing this article, it was past 4 AM. In the blink of an eye, this project celebrated its 3rd birthday last month. When I wrote the first line of code, I knew nothing about Go, and now I've grown into what some people call an expert.
|
||||
|
||||
AcePanel 是我的青春,我希望将其写到极致而不留遗憾,因此来回重构了数次,如果因此影响了您的使用,我在此说声道歉。现在自己年纪也慢慢大了,加上工作与生活的琐事繁多,未来再想重构也不一定折腾得动了。
|
||||
AcePanel is my youth. I hope to write it to perfection without regrets, so I've refactored it several times. If this has affected your usage, I apologize here. Now I'm getting older, and with the many trivial matters of work and life, I may not be able to refactor it again in the future.
|
||||
|
||||
2026 年的 AI 已经非常强大,AcePanel 新版本中有大量复杂的交互逻辑均使用 Claude Opus 4.5 辅助开发,我承认以我的水平难以写出这样完善的交互。也许继续发展下去未来或将不再需要面板,而是直接对 AI 说:帮我安装 Nginx;帮我创建 xxx 项目。谁知道呢?
|
||||
AI in 2026 is already very powerful. A lot of complex interaction logic in the new version of AcePanel was developed with the assistance of Claude Opus 4.5. I admit that with my level, it would be difficult to write such complete interactions. Perhaps with continued development, panels may no longer be needed in the future, and instead, you can just say to AI: Help me install Nginx; Help me create xxx project. Who knows?
|
||||
|
||||
最后,感谢赞助商微晓朵和林枫云以及参与 AcePanel 内测的所有用户,没有你们的帮助 AcePanel 将难以如期发布。
|
||||
Finally, thanks to sponsors WeiXiaoDuo and LF Cloud, and all users who participated in the AcePanel internal testing. Without your help, AcePanel would have been difficult to release on schedule.
|
||||
|
||||
附上 AcePanel 新版本的安装命令,欢迎测试体验:
|
||||
Here is the installation command for the new version of AcePanel, welcome to test and experience:
|
||||
|
||||
```bash
|
||||
bash <(curl -sSLm 10 https://dl.acepanel.net/helper.sh)
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
# 卸载
|
||||
# Uninstall
|
||||
|
||||
::: danger 警告
|
||||
卸载前请备份所有数据,卸载后数据不可恢复。
|
||||
::: danger Warning
|
||||
Please backup all data before uninstalling. Data cannot be recovered after uninstallation.
|
||||
:::
|
||||
|
||||
## 卸载步骤
|
||||
## Uninstall Steps
|
||||
|
||||
1. 备份网站、数据库等重要数据
|
||||
2. 在面板中卸载所有已安装的应用
|
||||
3. 执行卸载命令:
|
||||
1. Backup important data such as websites and databases
|
||||
2. Uninstall all installed applications in the panel
|
||||
3. Execute the uninstall command:
|
||||
|
||||
```shell
|
||||
bash <(curl -sSLm 10 https://dl.acepanel.net/helper.sh)
|
||||
```
|
||||
|
||||
选择「卸载面板」选项完成卸载。
|
||||
Select the "Uninstall Panel" option to complete the uninstallation.
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
# 更新
|
||||
# Update
|
||||
|
||||
## 自动更新
|
||||
## Automatic Update
|
||||
|
||||
面板默认开启自动更新,每天凌晨 2 点左右会自动检测并更新。更新期间面板短暂不可用(通常不超过 1 分钟)。
|
||||
The panel has automatic updates enabled by default, checking and updating around 2 AM daily. The panel will be briefly unavailable during updates (usually less than 1 minute).
|
||||
|
||||
关闭自动更新:「设置」->「安全」->「自动更新」。
|
||||
To disable automatic updates: "Settings" -> "Security" -> "Automatic Update".
|
||||
|
||||
## 手动更新
|
||||
## Manual Update
|
||||
|
||||
### Web 界面
|
||||
### Web Interface
|
||||
|
||||
点击首页右上角「更新」按钮,有新版本时会弹出更新页面。
|
||||
Click the "Update" button in the top right corner of the homepage. When a new version is available, an update page will pop up.
|
||||
|
||||
更新过程中请勿刷新浏览器或操作面板,完成后页面自动刷新。
|
||||
Do not refresh the browser or operate the panel during the update process. The page will automatically refresh after completion.
|
||||
|
||||
### 命令行
|
||||
### Command Line
|
||||
|
||||
```shell
|
||||
acepanel update
|
||||
```
|
||||
|
||||
适用于面板无法访问的情况。更新过程中请勿关闭终端。
|
||||
Suitable for situations where the panel is inaccessible. Do not close the terminal during the update process.
|
||||
|
||||
## 更新失败
|
||||
## Update Failed
|
||||
|
||||
如果更新后出现问题,尝试修复:
|
||||
If problems occur after updating, try to repair:
|
||||
|
||||
```shell
|
||||
acepanel fix
|
||||
```
|
||||
|
||||
仍有问题可到 [社区](https://tom.moe) 反馈。
|
||||
If problems persist, provide feedback at the [Community](https://tom.moe).
|
||||
|
||||
Reference in New Issue
Block a user