Files
dbx/docs/content/docs/getting-started.cn.mdx
T
t8y2 89fa8c02be docs: add landing page and upgrade all documentation with advanced components
- Add product landing page with hero section, stats, feature cards, database badges, comparison table, and screenshots
- Register Fumadocs MDX components (Tabs, Steps, Callout, Cards, Accordions) globally
- Rewrite all 17 doc pages (CN + EN) with richer content, use cases, and advanced components
- Add competitive comparison table (vs DBeaver/Navicat/TablePlus)
- Add ~300 lines of responsive landing page CSS
2026-05-07 14:53:35 +08:00

137 lines
3.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: 快速开始
description: 安装 DBX 并创建你的第一个数据库连接。
---
## 安装
<Tabs groupId="platform" items={['macOS', 'Windows', 'Linux', 'Docker']}>
<Tab value="macOS">
**Homebrew(推荐):**
```bash
brew install --cask t8y2/tap/dbx
```
更新:
```bash
brew upgrade --cask t8y2/tap/dbx
```
也可以从 [Releases](https://github.com/t8y2/dbx/releases) 页面下载 `.dmg` 安装包。
</Tab>
<Tab value="Windows">
**Scoop(推荐):**
```bash
scoop bucket add dbx https://github.com/t8y2/scoop-bucket
scoop install dbx
```
更新:
```bash
scoop update dbx
```
也可以从 [Releases](https://github.com/t8y2/dbx/releases) 页面下载 `.msi` 安装包。
</Tab>
<Tab value="Linux">
从 [Releases](https://github.com/t8y2/dbx/releases) 页面下载对应的安装包(`.deb` / `.AppImage`)。
</Tab>
<Tab value="Docker">
通过 Docker 部署 DBX,适合团队共享和服务器环境:
```bash
docker run -d --name dbx -p 4224:4224 -v dbx-data:/app/data t8y2/dbx
```
部署后通过浏览器访问 `http://localhost:4224` 即可使用。
**Docker Compose:**
```yaml
services:
dbx:
image: t8y2/dbx
ports:
- "4224:4224"
volumes:
- dbx-data:/app/data
restart: unless-stopped
volumes:
dbx-data:
```
</Tab>
</Tabs>
## 创建第一个连接
<Steps>
<Step>
### 新建连接
点击工具栏的 **新建连接** 按钮。
</Step>
<Step>
### 选择数据库类型
选择你要连接的数据库类型(MySQL、PostgreSQL、SQLite 等)。
</Step>
<Step>
### 填写连接信息
填写主机、端口、用户名、密码。如需通过跳板机连接,可启用 [SSH 隧道](/cn/docs/ssh-tunnel)。
</Step>
<Step>
### 测试并保存
点击 **测试** 验证连接是否正常,然后点击 **保存并连接**。
</Step>
</Steps>
<Callout type="info">
连接密码存储在系统钥匙串中(macOS Keychain / Windows 凭据管理器 / Linux Secret Service),不会明文保存在配置文件中。
</Callout>
## 开发环境搭建
如果你想从源码运行 DBX,请参考以下步骤。
### 环境要求
- [Node.js](https://nodejs.org/) >= 18
- [pnpm](https://pnpm.io/)
- [Rust](https://www.rust-lang.org/tools/install) >= 1.77
### 系统依赖
<Tabs groupId="dev-platform" items={['macOS', 'Linux', 'Windows']}>
<Tab value="macOS">
```bash
brew install unixodbc
```
</Tab>
<Tab value="Linux">
```bash
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libappindicator3-dev librsvg2-dev patchelf libssl-dev unixodbc-dev
```
</Tab>
<Tab value="Windows">
无需额外安装(ODBC 已内置于 Windows)。
</Tab>
</Tabs>
### 运行
```bash
git clone https://github.com/t8y2/dbx.git
cd dbx
pnpm install
pnpm dev:tauri
```
### 构建
```bash
pnpm tauri build
```
安装包输出在 `src-tauri/target/release/bundle/` 目录。