infra-clickhouse
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseClickHouse with clickhousectl
使用clickhousectl管理ClickHouse
clickhousectl- Local — ClickHouse installed and running on the user's machine, for development.
- Cloud — managed ClickHouse Cloud services, for production: fully managed, automatic scaling, backups, and upgrades.
This file routes to the right reference. The step-by-step workflows live in and — read the one that matches the user's situation before running commands.
ref/local.mdref/cloud.mdclickhousectl- 本地环境——在用户机器上安装并运行ClickHouse,用于开发。
- 云端环境——托管式ClickHouse Cloud服务,用于生产:全托管、自动扩容、备份和升级。
本文档会引导你找到对应的参考文档。分步工作流位于和中——在运行命令前,请阅读与用户场景匹配的文档。
ref/local.mdref/cloud.mdWhich reference to use
选择合适的参考文档
| The user wants to... | Read |
|---|---|
| Build an app with ClickHouse, develop or prototype locally, no cloud account needed | ref/local.md |
| Go to production, host a managed ClickHouse, or use ClickHouse Cloud explicitly | ref/cloud.md |
| Operate an existing cloud service (schemas, users, queries against it) | ref/cloud.md |
| Develop locally now, ship to production later | Start with ref/local.md; it points to ref/cloud.md when it's time to go to prod |
If it's genuinely ambiguous (e.g. "set up ClickHouse for my app"), default to local for development tasks and ask before creating anything in the cloud — cloud services cost money.
| 用户需求... | 阅读文档 |
|---|---|
| 使用ClickHouse构建应用、本地开发或原型开发,无需云端账户 | ref/local.md |
| 部署到生产环境、托管ClickHouse,或明确使用ClickHouse Cloud | ref/cloud.md |
| 操作现有云端服务(schema、用户、针对它的查询) | ref/cloud.md |
| 先本地开发,之后部署到生产环境 | 从ref/local.md开始;当准备部署到生产环境时,文档会指向ref/cloud.md |
如果需求确实不明确(例如“为我的应用设置ClickHouse”),开发任务默认选择本地环境,在创建任何云端资源前请先询问用户——云端服务会产生费用。
Prerequisites (both workflows)
前置条件(两种工作流通用)
Check that is installed:
clickhousectlbash
which clickhousectlIf not found, install it:
bash
curl -fsSL https://clickhouse.com/cli | shThis installs to (with a alias). If the command is still not found, suggest or a new terminal.
~/.local/bin/clickhousectlchctlexport PATH="$HOME/.local/bin:$PATH"All commands accept for machine-readable output. Exit codes follow conventions: 0 success, 1 error, 2 cancelled, 4 auth required.
--jsongh检查是否已安装:
clickhousectlbash
which clickhousectl如果未找到,请安装:
bash
curl -fsSL https://clickhouse.com/cli | sh此命令会将其安装到(并创建别名)。如果命令仍未找到,建议执行或重启终端。
~/.local/bin/clickhousectlchctlexport PATH="$HOME/.local/bin:$PATH"所有命令都支持参数以输出机器可读格式。退出码遵循约定:0表示成功,1表示错误,2表示取消,4表示需要身份验证。
--jsonghRelated
相关内容
- When designing schemas, consult the skill for ORDER BY selection, data types, and partitioning.
clickhouse-best-practices - For Postgres (local development or managed ClickHouse Cloud Postgres), use the skill.
infra-postgres
- 设计schema时,请参考技能,了解ORDER BY选择、数据类型和分区策略。
clickhouse-best-practices - 对于Postgres(本地开发或托管式ClickHouse Cloud Postgres),请使用技能。
infra-postgres