{"id":"925d1b08-ab9a-4f97-b37e-1b52ae21633b","entityType":"agent","slug":"clawhub-kwdb-kwdb-install-deploy","name":"KWDB Install Deploy","canonicalUrl":"https://www.xpersona.co/agent/clawhub-kwdb-kwdb-install-deploy","canonicalPath":"/agent/clawhub-kwdb-kwdb-install-deploy","generatedAt":"2026-10-11T05:29:29.555Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T03:12:51.905Z","emptyReason":null},"description":"Triggered when the user wants to install or deploy KaiwuDB (kwdb, kaiwudb). Helps users complete script-based deployment of KaiwuDB clusters, including configuration file modification, installation command execution, cluster initialization, and status checks.","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.2K downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s17e2f9k2hwm2p7q50y9wz03fs8445dh:kwdb-install-deploy","sourceUrl":"https://clawhub.ai/kwdb/kwdb-install-deploy","homepage":"https://clawhub.ai/kwdb/skills/kwdb-install-deploy","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/kwdb/kwdb-install-deploy","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/kwdb/skills/kwdb-install-deploy","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":61,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"KWDB Install Deploy technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T03:12:51.905Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T03:12:51.905Z","emptyReason":null},"stars":null,"forks":null,"downloads":1176,"packageName":null,"latestVersion":"1.2.1","tractionLabel":"1.2K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T03:12:51.670Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T03:12:51.905Z","lastCrawledAt":"2026-10-11T03:12:51.670Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T03:12:51.670Z","lastVerifiedAt":null,"highlights":[{"version":"1.2.1","createdAt":"2026-08-28T00:47:14.321Z","changelog":"## kwdb-install-deploy 1.2.1 - Documentation file `skill-card.md` has been removed from the project. - No changes to functionality or installation workflow.","fileCount":6,"zipByteSize":9164},{"version":"1.2.0","createdAt":"2026-07-23T05:51:55.245Z","changelog":"- Removed the skill-card.md file. - No user-facing behavior or functional changes in this release.","fileCount":6,"zipByteSize":9367},{"version":"1.1.0","createdAt":"2026-06-22T09:00:36.346Z","changelog":"kwdb-install-deploy v1.1.0 - Added comprehensive step-by-step deployment guidance for KaiwuDB, including single-node and cluster modes. - Enforced strict confirmation of all installation parameters; defaults must be explicitly shown and confirmed. - Added mandatory log file inspection and clear reporting for installation failures, with no automated retries allowed. - Outlined full configuration (deploy.cfg) process, including all required questions and user confirmations. - Detailed prerequisites, user permissions, and hardware/OS requirements for installation. - Clarified deployment and configuration workflows for both bare-metal and container environments.","fileCount":6,"zipByteSize":9166},{"version":"1.0.0","createdAt":"2026-05-13T04:00:34.367Z","changelog":"kwdb-install-deploy 1.0.0 - Initial release of KWDB Install skill for guided script-based KaiwuDB deployment. - Step-by-step workflow ensures all installation/configuration parameters are explicitly confirmed with the user. - Strict handling rules: prohibits parameter guessing, reads and reports errors from logs on failure, and never retries without user request. - Supports both single-node and cluster (single/multi-replica) deployments in Linux environments. - Verifies prerequisites and installation package before proceeding. - Automates generation and confirmation of configuration, followed by safe command execution and status check.","fileCount":5,"zipByteSize":7949}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17e2f9k2hwm2p7q50y9wz03fs8445dh:kwdb-install-deploy","setupComplexity":"medium","setupSteps":["Install using `clawhub skill install s17e2f9k2hwm2p7q50y9wz03fs8445dh:kwdb-install-deploy` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/kwdb/kwdb-install-deploy before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-kwdb-kwdb-install-deploy/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-kwdb-kwdb-install-deploy/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-kwdb-kwdb-install-deploy/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-kwdb-kwdb-install-deploy/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-kwdb-kwdb-install-deploy/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-kwdb-kwdb-install-deploy/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-11T05:29:29.553Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-kwdb-kwdb-install-deploy/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-kwdb-kwdb-install-deploy/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-kwdb-kwdb-install-deploy/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-kwdb-kwdb-install-deploy/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T03:12:51.905Z","emptyReason":null},"readme":"Skill: KWDB Install Deploy\n\nOwner: kwdb\n\nSummary: Triggered when the user wants to install or deploy KaiwuDB (kwdb, kaiwudb). Helps users complete script-based deployment of KaiwuDB clusters, including configuration file modification, installation command execution, cluster initialization, and status checks.\n\nTags: kwdb:1.2.1, latest:1.2.1, ready:1.2.1\n\nVersion history:\n\nv1.2.1 | 2026-08-28T00:47:14.321Z | auto\n\n## kwdb-install-deploy 1.2.1\n\n- Documentation file `skill-card.md` has been removed from the project.\n- No changes to functionality or installation workflow.\n\nv1.2.0 | 2026-07-23T05:51:55.245Z | auto\n\n- Removed the skill-card.md file.\n- No user-facing behavior or functional changes in this release.\n\nv1.1.0 | 2026-06-22T09:00:36.346Z | auto\n\nkwdb-install-deploy v1.1.0\n\n- Added comprehensive step-by-step deployment guidance for KaiwuDB, including single-node and cluster modes.\n- Enforced strict confirmation of all installation parameters; defaults must be explicitly shown and confirmed.\n- Added mandatory log file inspection and clear reporting for installation failures, with no automated retries allowed.\n- Outlined full configuration (deploy.cfg) process, including all required questions and user confirmations.\n- Detailed prerequisites, user permissions, and hardware/OS requirements for installation.\n- Clarified deployment and configuration workflows for both bare-metal and container environments.\n\nv1.0.0 | 2026-05-13T04:00:34.367Z | auto\n\nkwdb-install-deploy 1.0.0\n\n- Initial release of KWDB Install skill for guided script-based KaiwuDB deployment.\n- Step-by-step workflow ensures all installation/configuration parameters are explicitly confirmed with the user.\n- Strict handling rules: prohibits parameter guessing, reads and reports errors from logs on failure, and never retries without user request.\n- Supports both single-node and cluster (single/multi-replica) deployments in Linux environments.\n- Verifies prerequisites and installation package before proceeding.\n- Automates generation and confirmation of configuration, followed by safe command execution and status check.\n\nArchive index:\n\nArchive v1.2.1: 6 files, 9164 bytes\n\nFiles: assets/deploy.cfg (369b), references/installation_guide.md (5909b), references/troubleshooting.md (2639b), skill-card.md (2254b), SKILL.md (9705b), _meta.json (138b)\n\nFile v1.2.1:SKILL.md\n\n---\nname: kwdb-install-deploy\ndescription: Triggered when the user wants to install or deploy KaiwuDB (kwdb, kaiwudb). Helps users complete script-based deployment of KaiwuDB clusters, including configuration file modification, installation command execution, cluster initialization, and status checks.\n---\n\n# KWDB Install\n\n## Overview\n\nThis skill provides script-based deployment for KaiwuDB, suitable for bare-metal or container deployment in Linux environments. Supports single-replica and multi-replica cluster deployments with complete deployment workflow guidance.\n\n## Mandatory Rules\n\n**The following three rules must be strictly followed:**\n\n### 1. Prohibit Guessing Installation Parameters\n\n**Do not guess or assume any installation parameters and proceed with installation unless explicitly specified by the user.**\n\n- All configuration parameters (ports, IPs, data directories, security modes, etc.) must be confirmed with the user one by one\n- Even if the user says \"use defaults\", the default values must be explicitly listed and confirmed with the user\n- The installation package path must be explicitly provided by the user and must not be guessed\n\n### 2. Must Read Logs on Installation Failure\n\n**When the installation command fails, you must read the log files in the `log/` directory under the same path as the installation script to obtain detailed failure information.**\n\nLog file path: `/opt/kaiwudb/<package-name>/log/` or `kaiwudb_install/log/`\n\n```bash\n# After installation failure, first read the logs\nls -la log/\ncat log/install.log  # or the latest generated log file\n```\n\n### 3. Exit After Reporting Failure, Prohibit Arbitrary Retries\n\n**After installation failure, you must:**\n1. Clearly display the error information obtained from the logs to the user\n2. Explain possible causes\n3. Exit the installation process, **do not retry on your own**\n4. Wait for user instructions before deciding on the next step\n\n**Exception**: Only when the user explicitly requests \"retry\", you may execute the installation command again.\n\n## Prerequisites\n\n### System Requirements\n\n- **Hardware**:\n  - Memory: At least 8 GB RAM (16 GB recommended)\n  - CPU: At least 2 cores (4 cores recommended)\n  - Disk: At least 50 GB available space (SSD recommended)\n- **Operating System**:\n  - CentOS 7/8\n  - Ubuntu 18.04/20.04/22.04\n- **Network**: All nodes must have network connectivity\n\n### User Permissions\n\n- SSH passwordless login configured between nodes\n- User must be `root` or have `sudo` privileges\n- For container deployment, non-root users must be in the `docker` group\n\n## Deployment Steps\n\n### Step 1: Confirm Deployment Mode\n\nFirst, I need to confirm the deployment mode you need:\n\n**Ask**:\n\"Please select the deployment mode: single-node deployment (single) or cluster deployment (cluster)?\"\n\n### Step 1.1: Confirm Cluster Replica Count - Cluster Mode Only\n\nIf cluster deployment is selected, I need to further confirm the number of replicas:\n\n**Ask**:\n\"Please select the cluster deployment type: single-replica cluster (single-replica) or multi-replica cluster (multi-replica)?\"\n\n### Step 2: Confirm Installation Package Location\n\nNext, I need to confirm the location of the KaiwuDB installation package with you. The installation package should be a `.tar.gz` file with `KaiwuDB` as the prefix, for example: `KaiwuDB-1.0.0.tar.gz`.\n\n**Ask**:\n\"Please provide the full path (including filename) of the KaiwuDB installation package. The installation package should be a tar.gz file with KaiwuDB as the prefix, for example /path/to/KaiwuDB-1.0.0.tar.gz.\"\n\n**Note**: You must wait for the user to provide the exact path and must not guess on your own.\n\n### Step 3: Verify Installation Package\n\nAfter confirming the installation package location, verify that the file exists and has the correct format:\n\n```bash\n# Check if the installation package exists\nif [ ! -f \"$INSTALL_PACKAGE_PATH\" ]; then\n    echo \"Error: Installation package does not exist, please check if the path is correct\"\n    exit 1\nfi\n\n# Check filename format\nif [[ \"$(basename $INSTALL_PACKAGE_PATH)\" != KaiwuDB*.tar.gz ]]; then\n    echo \"Error: Installation package filename is incorrect. It should be a tar.gz file with KaiwuDB as the prefix\"\n    exit 1\nfi\n```\n\n### Step 4: Extract Installation Package and Configure\n\n```bash\n# Create installation directory\nsudo mkdir -p /opt/kaiwudb\n\n# Extract installation package\ntar -xzf \"$INSTALL_PACKAGE_PATH\" -C /opt/kaiwudb\n\n# Enter installation directory\ncd /opt/kaiwudb/kaiwudb_install\n```\n\n### Step 5: Configure deploy.cfg File\n\nI will ask you about each configuration item step by step according to the deployment mode you selected, and then modify the `deploy.cfg` configuration file based on your answers.\n\n**Mandatory**: Unless the user voluntarily says \"all defaults\" or explicitly specifies parameter values, each item must be confirmed one by one. Even if the user selects default values, the defaults must be displayed and confirmed.\n\n#### Global Configuration (global) - Common to All Modes\n\n1. **Security Mode (secure_mode)**:\n   - Ask: \"Please select the security mode: insecure (non-secure mode), tls (TLS secure mode, default), tlcp (TLCP secure mode)\"\n\n2. **Management User (management_user)**:\n   - Ask: \"Please enter the KaiwuDB management username (default: kaiwudb)\"\n\n3. **RESTful Port (rest_port)**:\n   - Ask: \"Please enter the KaiwuDB Web service port (default: 8080)\"\n\n4. **KaiwuDB Service Port (kaiwudb_port)**:\n   - Ask: \"Please enter the KaiwuDB service port (default: 26257)\"\n\n5. **BRPC Port (brpc_port)**:\n   - Ask: \"Please enter the KaiwuDB time-series engine communication port (default: 27257)\"\n\n6. **Data Directory (data_root)**:\n   - Ask: \"Please enter the KaiwuDB data storage directory (default: /var/lib/kaiwudb)\"\n\n7. **CPU Resource Usage (cpu)**:\n   - Ask: \"Please enter the proportion of CPU resources occupied by KaiwuDB service (0-1, default: unlimited)\"\n\n#### Local Node Configuration (local) - Common to All Modes\n\n8. **Local Node IP Address (local_node_ip)**:\n   - Ask: \"Please enter the IP address of the local node (used for external services)\"\n   - **Note**: This parameter has no default value and must be provided by the user\n\n#### Cluster Configuration (cluster) - Cluster Mode Only\n\n9. **Other Cluster Node IP Addresses (cluster_node_ips)**:\n   - Ask: \"Please enter the IP addresses of other cluster nodes (multiple addresses separated by commas)\"\n\n10. **SSH Port (ssh_port)**:\n    - Ask: \"Please enter the SSH service port of the remote node (default: 22)\"\n\n11. **SSH Username (ssh_user)**:\n    - Ask: \"Please enter the SSH login username for the remote node\"\n\nBased on your answers, I will automatically generate the corresponding `deploy.cfg` configuration file. The cluster configuration section will be automatically omitted for single-node deployment.\n\n### Step 6: Execute Installation Command\n\nExecute the corresponding installation command based on your selection:\n\n**Single-node deployment**:\n```bash\n./deploy.sh install --single\n```\n\n**Single-replica cluster deployment**:\n```bash\n./deploy.sh install --single-replica\n```\n\n**Multi-replica cluster deployment**:\n```bash\n./deploy.sh install --multi-replica\n```\n\n**Important**: Before execution, all configuration parameters must be displayed to the user and confirmed before proceeding.\n\n### Step 7: Confirm Installation Information\n\nAfter checking that the configuration is correct, enter `Y` or `y`. If you need to return to modify the configuration file, enter `N` or `n`.\n\n```shell\n================= KaiwuDB Basic Info =================\nDeploy Mode: bare-metal\nManagement User: kaiwudb\nStart Mode: single\nRESTful Port: 8080\nKaiwuDB Port: 26257\nBRPC Port: 27257\nData Root: /var/lib/kaiwudb\nSecure Mode: tls\nCPU Usage Limit: 1\nLocal Node Address: 192.168.122.221\n=========================================================\nPlease confirm the installation information above(Y/n):\n```\n\n### Step 8: Handle Installation Failure\n\n**If the installation command execution fails (returns a non-zero exit code), the following operations must be performed:**\n\n```bash\n# 1. Enter the log directory\ncd log/\n\n# 2. List log files\nls -la\n\n# 3. Read the latest log file (usually install.log or a file with a timestamp)\ncat install.log\n# or\ntail -100 <latest log file>\n```\n\n**Report failure information to the user:**\n\n1. Clearly display the error information extracted from the logs\n2. Explain possible causes (refer to references/troubleshooting.md)\n3. **Exit the installation process, do not retry on your own**\n4. Wait for further user instructions\n\nExample report format:\n```\nInstallation failed!\n\nError information (from logs):\n[Specific error content extracted from log/install.log]\n\nPossible causes:\n- [Possible causes analyzed based on the error information]\n\nPlease check the above issues and let me know if you need to retry or have other instructions.\n```\n\n### Step 9: Initialize and Start Cluster - Cluster Mode Only\n\nAfter successful installation, execute:\n\n```bash\n./deploy.sh cluster -i\n# or\n./deploy.sh cluster --init\n```\n\n### Step 10: Check Status\n\n**Check service status**:\n```bash\nsystemctl status kaiwudb\n```\n\n**Check cluster status (cluster mode only)**:\n```bash\n./deploy.sh cluster -s\n# or\n./deploy.sh cluster --status\n# or use the convenience script\nkw-status\n```\n\n### Step 11: Configure Auto-start on Boot (Optional)\n\n```bash\nsystemctl enable kaiwudb\n```\n\n## Resources\n\n### references/\nContains KaiwuDB related documents:\n\n- `installation_guide.md` - Detailed installation guide\n- `troubleshooting.md` - Common issues and solutions\n\n### assets/\nContains KaiwuDB configuration file templates and resources:\n\n- `deploy.cfg` - Deployment configuration file template\n\nFile v1.2.1:_meta.json\n\n{\n  \"ownerId\": \"kn7fr8q8f22jd6gzb6f7prf9g183z64v\",\n  \"slug\": \"kwdb-install-deploy\",\n  \"version\": \"1.2.1\",\n  \"publishedAt\": 1787878034321\n}\n\nFile v1.2.1:references/installation_guide.md\n\n# KaiwuDB Script Deployment Guide\n\n## Prerequisites\n\n### System Requirements\n\n- Hardware, operating system, and software dependencies of all nodes to be deployed must meet the installation and deployment requirements.\n- **Network Settings**:\n  - Network connectivity between all nodes.\n  - Nodes are located within the same data center.\n  - Network latency between physical machines is no higher than 50 ms.\n  - Clock difference between nodes is no greater than 500 ms.\n  - Required ports for KaiwuDB service have been reserved on each node.\n- KaiwuDB bare-metal or container installation package for the corresponding system version has been obtained.\n\n### User Permissions\n\n- SSH passwordless login is configured between the current node and other nodes in the cluster.\n- The installation user is the `root` user or a regular user with `sudo` privileges.\n- When deploying with the container installation package, if the installation user is a non-`root` user, add the user to the `docker` group by running `sudo usermod -aG docker $USER`.\n\n## Deployment Steps\n\n### Step 1: Confirm Deployment Mode\n\nFirst, confirm the deployment mode:\n\n**Ask**:\n\"Please select the deployment mode: single-node deployment (single) or cluster deployment (cluster)?\"\n\n### Step 1.1: Confirm Cluster Replica Count - Cluster Mode Only\n\nIf cluster deployment is selected, further confirm the number of replicas:\n\n**Ask**:\n\"Please select the cluster deployment type: single-replica cluster (single-replica) or multi-replica cluster (multi-replica)?\"\n\n### Step 2: Confirm Installation Package Location\n\nProvide the full path of the installation package, including the filename, for example:\n```\n/path/to/KaiwuDB-1.0.0.tar.gz\n```\n\n### Step 3: Extract Installation Package\n\n```bash\n# Create installation directory\nsudo mkdir -p /opt/kaiwudb\n\n# Extract installation package\ntar -xzf \"$INSTALL_PACKAGE_PATH\" -C /opt/kaiwudb\n\n# Enter installation directory\ncd /opt/kaiwudb/$(basename \"$INSTALL_PACKAGE_PATH\" .tar.gz)\n```\n\n### Step 4: Configure deploy.cfg File\n\nI will ask you about each configuration item step by step according to the deployment mode you selected, and then modify the `deploy.cfg` configuration file based on your answers.\n\n#### Global Configuration (global) - Common to All Modes\n\n1. **Security Mode (secure_mode)**:\n   - Select the security mode: insecure (non-secure mode), tls (TLS secure mode, default), tlcp (TLCP secure mode)\n\n2. **Management User (management_user)**:\n   - Enter the KaiwuDB management username (default: kaiwudb)\n\n3. **RESTful Port (rest_port)**:\n   - Enter the KaiwuDB Web service port (default: 8080)\n\n4. **KaiwuDB Service Port (kaiwudb_port)**:\n   - Enter the KaiwuDB service port (default: 26257)\n\n5. **BRPC Port (brpc_port)**:\n   - Enter the KaiwuDB time-series engine communication port (default: 27257)\n\n6. **Data Directory (data_root)**:\n   - Enter the KaiwuDB data storage directory (default: /var/lib/kaiwudb)\n\n7. **CPU Resource Usage (cpu)**:\n   - Enter the proportion of CPU resources occupied by KaiwuDB service (0-1, default: unlimited)\n\n#### Local Node Configuration (local) - Common to All Modes\n\n8. **Local Node IP Address (local_node_ip)**:\n   - Enter the IP address of the local node (used for external services)\n\n#### Cluster Configuration (cluster) - Cluster Mode Only\n\n9. **Other Cluster Node IP Addresses (cluster_node_ips)**:\n   - Enter the IP addresses of other cluster nodes (multiple addresses separated by commas)\n\n10. **SSH Port (ssh_port)**:\n    - Enter the SSH service port of the remote node (default: 22)\n\n11. **SSH Username (ssh_user)**:\n    - Enter the SSH login username for the remote node\n\nBased on your answers, I will automatically generate the corresponding `deploy.cfg` configuration file. The cluster configuration section will be automatically omitted for single-node deployment.\n\n### Step 5: Execute Installation Command\n\nExecute the corresponding installation command based on your selection:\n\n**Single-node deployment**:\n```bash\n./deploy.sh install --single\n```\n\n**Single-replica cluster deployment**:\n```bash\n./deploy.sh install --single-replica\n```\n\n**Multi-replica cluster deployment**:\n```bash\n./deploy.sh install --multi-replica\n```\n\n### Step 6: Confirm Installation Information\n\nAfter checking that the configuration is correct, enter `Y` or `y`. If you need to return to modify the configuration file, enter `N` or `n`.\n\n```shell\n================= KaiwuDB Basic Info =================\nDeploy Mode: bare-metal\nManagement User: kaiwudb\nStart Mode: single\nRESTful Port: 8080\nKaiwuDB Port: 26257\nBRPC Port: 27257\nData Root: /var/lib/kaiwudb\nSecure Mode: tls\nCPU Usage Limit: 1\nLocal Node Address: 192.168.122.221\n=========================================================\nPlease confirm the installation information above(Y/n):\n```\n\n### Step 7: Initialize and Start Cluster - Cluster Mode Only\n\n```bash\n./deploy.sh cluster -i\n# or\n./deploy.sh cluster --init\n```\n\n### Step 8: Check Status\n\n**Check service status**:\n```bash\nsystemctl status kaiwudb\n```\n\n**Check cluster status (cluster mode only)**:\n```bash\n./deploy.sh cluster -s\n# or\n./deploy.sh cluster --status\n# or use the convenience script\nkw-status\n```\n\n### Step 9: Configure Auto-start on Boot (Optional)\n\n```bash\nsystemctl enable kaiwudb\n```\n\n## Status Check Description\n\nField descriptions returned by the `kw-status` command:\n\n| Field | Description |\n|-------|-------------|\n| `id` | Node ID |\n| `address` | Node address |\n| `sql_address` | SQL address |\n| `build` | KaiwuDB version |\n| `started_at` | Start time |\n| `updated_at` | Update time |\n| `is_available`/`is_live` | Node status, both `true` indicates normal |\n\n## Deployment Modes\n\n### Bare-metal Deployment\n\nUse the `KaiwuDB-baremetal-*.tar.gz` installation package for deployment.\n\n### Container Deployment\n\nUse the `KaiwuDB-container-*.tar.gz` installation package for deployment. Ensure Docker is installed and configured.\n\nFile v1.2.1:references/troubleshooting.md\n\n# KaiwuDB Common Issues and Solutions\n\n## Installation Issues\n\n### 1. Environment Check Failure\n\n**Problem**: Script prompts environment check failure\n\n**Solution**:\n- Check if system requirements are met (memory, disk space)\n- Ensure the user running the script has sufficient permissions\n- Check if network connection is normal\n\n### 2. Dependency Installation Failure\n\n**Problem**: Error occurs during dependency installation\n\n**Solution**:\n- Check if system package manager is working normally (yum/apt)\n- Try manually updating package manager:\n  - CentOS: `sudo yum update -y`\n  - Ubuntu: `sudo apt-get update -y`\n- If network is slow, consider using domestic mirror sources\n\n### 3. Installation Package Download Failure\n\n**Problem**: Unable to download KaiwuDB installation package\n\n**Solution**:\n- Check network connection\n- Try manually downloading the installation package and placing it in the scripts/ directory\n- Contact technical support to obtain download link\n\n## Runtime Issues\n\n### 1. Database Cannot Start\n\n**Problem**: No response after executing start command\n\n**Solution**:\n- Check data directory permissions: `ls -ld /var/lib/kwdb`\n- Check log files: `cat /var/log/kwdb/kwdb.log`\n- Check if configuration file is correct\n\n### 2. Unable to Connect to Database\n\n**Problem**: Cannot connect to database using psql command\n\n**Solution**:\n- Check if kwdb process is running: `ps aux | grep kwdb`\n- Check if firewall allows port 5432 access\n- Check if listen_addresses configuration is set to '*'\n- Check if pg_hba.conf file allows connections\n\n### 3. Database Running Slowly\n\n**Problem**: Long query response time\n\n**Solution**:\n- Check system resource usage: `top`\n- Check slow query log: `/var/log/kwdb/slow_query.log`\n- Optimize query statements\n- Adjust configuration file parameters\n\n## Performance Issues\n\n### 1. High Memory Usage\n\n**Problem**: Database process occupies too much memory\n\n**Solution**:\n- Adjust shared_buffers parameter\n- Check for memory leaks\n- Increase system memory\n\n### 2. High Disk I/O\n\n**Problem**: Slow disk write speed\n\n**Solution**:\n- Check if disk space is sufficient\n- Consider using SSD disk\n- Adjust checkpoint-related parameters\n- Optimize queries to reduce disk I/O\n\n## Backup and Recovery\n\n### 1. Backup Database\n\n```bash\n/opt/kwdb/current/bin/pg_dump -h localhost -p 5432 -U $USER -d kwdb_db > backup.sql\n```\n\n### 2. Restore Database\n\n```bash\n/opt/kwdb/current/bin/psql -h localhost -p 5432 -U $USER -d kwdb_db < backup.sql\n```\n\n## Contact Support\n\nIf you encounter issues that cannot be resolved, please contact technical support:\n- Email: support@kaiwudb.com\n- Phone: 400-xxx-xxxx\n\nFile v1.2.1:skill-card.md\n\n## Description:\n\nTriggered when the user wants to install or deploy KaiwuDB (kwdb, kaiwudb). Helps users complete script-based deployment of KaiwuDB clusters, including configuration file modification, installation command execution, cluster initialization, and status checks.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[kwdb](https://clawhub.ai/user/kwdb)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and database operators use this skill to prepare, configure, install, initialize, and check KaiwuDB deployments on Linux hosts or clusters.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: A user-supplied KaiwuDB archive may execute installer code with administrative access.\n\nMitigation: Verify the archive with an official signature or checksum and inspect or stage extracted files before allowing the agent to run installation commands.\n\nRisk: The deployment workflow can use sudo, docker group access, passwordless SSH, and service auto-start across cluster nodes.\n\nMitigation: Use a dedicated least-privilege deployment account where possible, confirm each node and setting with the operator, and require approval before install, cluster initialization, or auto-start commands.\n\n## Reference(s):\n\n- [KaiwuDB Script Deployment Guide](references/installation_guide.md)\n- [KaiwuDB Common Issues and Solutions](references/troubleshooting.md)\n- [KWDB Install Deploy on ClawHub](https://clawhub.ai/kwdb/skills/kwdb-install-deploy)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown with inline shell commands and configuration guidance]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Requires user confirmation of installation package path, deployment mode, node addresses, ports, security mode, and other deployment settings before execution.]\n\n## Skill Version(s):\n\n1.2.1 (source: server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.2.1:assets/deploy.cfg\n\n[global]\n# Whether to turn on secure mode\nsecure_mode=tls\n# Management KaiwuDB user\nmanagement_user=kaiwudb\n# KaiwuDB cluster http port\nrest_port=8080\n# KaiwuDB service port\nkaiwudb_port=26257\n# KaiwuDB brpc port\nbrpc_port=27257\n# KaiwuDB data directory\ndata_root=/var/lib/kaiwudb\n# CPU usage[0-1]\ncpu=1\n\n[local]\n# local node configuration\nlocal_node_ip=192.168.122.221\n\nArchive v1.2.0: 6 files, 9367 bytes\n\nFiles: assets/deploy.cfg (369b), references/installation_guide.md (5909b), references/troubleshooting.md (2639b), skill-card.md (2866b), SKILL.md (9705b), _meta.json (138b)\n\nFile v1.2.0:SKILL.md\n\n---\nname: kwdb-install-deploy\ndescription: Triggered when the user wants to install or deploy KaiwuDB (kwdb, kaiwudb). Helps users complete script-based deployment of KaiwuDB clusters, including configuration file modification, installation command execution, cluster initialization, and status checks.\n---\n\n# KWDB Install\n\n## Overview\n\nThis skill provides script-based deployment for KaiwuDB, suitable for bare-metal or container deployment in Linux environments. Supports single-replica and multi-replica cluster deployments with complete deployment workflow guidance.\n\n## Mandatory Rules\n\n**The following three rules must be strictly followed:**\n\n### 1. Prohibit Guessing Installation Parameters\n\n**Do not guess or assume any installation parameters and proceed with installation unless explicitly specified by the user.**\n\n- All configuration parameters (ports, IPs, data directories, security modes, etc.) must be confirmed with the user one by one\n- Even if the user says \"use defaults\", the default values must be explicitly listed and confirmed with the user\n- The installation package path must be explicitly provided by the user and must not be guessed\n\n### 2. Must Read Logs on Installation Failure\n\n**When the installation command fails, you must read the log files in the `log/` directory under the same path as the installation script to obtain detailed failure information.**\n\nLog file path: `/opt/kaiwudb/<package-name>/log/` or `kaiwudb_install/log/`\n\n```bash\n# After installation failure, first read the logs\nls -la log/\ncat log/install.log  # or the latest generated log file\n```\n\n### 3. Exit After Reporting Failure, Prohibit Arbitrary Retries\n\n**After installation failure, you must:**\n1. Clearly display the error information obtained from the logs to the user\n2. Explain possible causes\n3. Exit the installation process, **do not retry on your own**\n4. Wait for user instructions before deciding on the next step\n\n**Exception**: Only when the user explicitly requests \"retry\", you may execute the installation command again.\n\n## Prerequisites\n\n### System Requirements\n\n- **Hardware**:\n  - Memory: At least 8 GB RAM (16 GB recommended)\n  - CPU: At least 2 cores (4 cores recommended)\n  - Disk: At least 50 GB available space (SSD recommended)\n- **Operating System**:\n  - CentOS 7/8\n  - Ubuntu 18.04/20.04/22.04\n- **Network**: All nodes must have network connectivity\n\n### User Permissions\n\n- SSH passwordless login configured between nodes\n- User must be `root` or have `sudo` privileges\n- For container deployment, non-root users must be in the `docker` group\n\n## Deployment Steps\n\n### Step 1: Confirm Deployment Mode\n\nFirst, I need to confirm the deployment mode you need:\n\n**Ask**:\n\"Please select the deployment mode: single-node deployment (single) or cluster deployment (cluster)?\"\n\n### Step 1.1: Confirm Cluster Replica Count - Cluster Mode Only\n\nIf cluster deployment is selected, I need to further confirm the number of replicas:\n\n**Ask**:\n\"Please select the cluster deployment type: single-replica cluster (single-replica) or multi-replica cluster (multi-replica)?\"\n\n### Step 2: Confirm Installation Package Location\n\nNext, I need to confirm the location of the KaiwuDB installation package with you. The installation package should be a `.tar.gz` file with `KaiwuDB` as the prefix, for example: `KaiwuDB-1.0.0.tar.gz`.\n\n**Ask**:\n\"Please provide the full path (including filename) of the KaiwuDB installation package. The installation package should be a tar.gz file with KaiwuDB as the prefix, for example /path/to/KaiwuDB-1.0.0.tar.gz.\"\n\n**Note**: You must wait for the user to provide the exact path and must not guess on your own.\n\n### Step 3: Verify Installation Package\n\nAfter confirming the installation package location, verify that the file exists and has the correct format:\n\n```bash\n# Check if the installation package exists\nif [ ! -f \"$INSTALL_PACKAGE_PATH\" ]; then\n    echo \"Error: Installation package does not exist, please check if the path is correct\"\n    exit 1\nfi\n\n# Check filename format\nif [[ \"$(basename $INSTALL_PACKAGE_PATH)\" != KaiwuDB*.tar.gz ]]; then\n    echo \"Error: Installation package filename is incorrect. It should be a tar.gz file with KaiwuDB as the prefix\"\n    exit 1\nfi\n```\n\n### Step 4: Extract Installation Package and Configure\n\n```bash\n# Create installation directory\nsudo mkdir -p /opt/kaiwudb\n\n# Extract installation package\ntar -xzf \"$INSTALL_PACKAGE_PATH\" -C /opt/kaiwudb\n\n# Enter installation directory\ncd /opt/kaiwudb/kaiwudb_install\n```\n\n### Step 5: Configure deploy.cfg File\n\nI will ask you about each configuration item step by step according to the deployment mode you selected, and then modify the `deploy.cfg` configuration file based on your answers.\n\n**Mandatory**: Unless the user voluntarily says \"all defaults\" or explicitly specifies parameter values, each item must be confirmed one by one. Even if the user selects default values, the defaults must be displayed and confirmed.\n\n#### Global Configuration (global) - Common to All Modes\n\n1. **Security Mode (secure_mode)**:\n   - Ask: \"Please select the security mode: insecure (non-secure mode), tls (TLS secure mode, default), tlcp (TLCP secure mode)\"\n\n2. **Management User (management_user)**:\n   - Ask: \"Please enter the KaiwuDB management username (default: kaiwudb)\"\n\n3. **RESTful Port (rest_port)**:\n   - Ask: \"Please enter the KaiwuDB Web service port (default: 8080)\"\n\n4. **KaiwuDB Service Port (kaiwudb_port)**:\n   - Ask: \"Please enter the KaiwuDB service port (default: 26257)\"\n\n5. **BRPC Port (brpc_port)**:\n   - Ask: \"Please enter the KaiwuDB time-series engine communication port (default: 27257)\"\n\n6. **Data Directory (data_root)**:\n   - Ask: \"Please enter the KaiwuDB data storage directory (default: /var/lib/kaiwudb)\"\n\n7. **CPU Resource Usage (cpu)**:\n   - Ask: \"Please enter the proportion of CPU resources occupied by KaiwuDB service (0-1, default: unlimited)\"\n\n#### Local Node Configuration (local) - Common to All Modes\n\n8. **Local Node IP Address (local_node_ip)**:\n   - Ask: \"Please enter the IP address of the local node (used for external services)\"\n   - **Note**: This parameter has no default value and must be provided by the user\n\n#### Cluster Configuration (cluster) - Cluster Mode Only\n\n9. **Other Cluster Node IP Addresses (cluster_node_ips)**:\n   - Ask: \"Please enter the IP addresses of other cluster nodes (multiple addresses separated by commas)\"\n\n10. **SSH Port (ssh_port)**:\n    - Ask: \"Please enter the SSH service port of the remote node (default: 22)\"\n\n11. **SSH Username (ssh_user)**:\n    - Ask: \"Please enter the SSH login username for the remote node\"\n\nBased on your answers, I will automatically generate the corresponding `deploy.cfg` configuration file. The cluster configuration section will be automatically omitted for single-node deployment.\n\n### Step 6: Execute Installation Command\n\nExecute the corresponding installation command based on your selection:\n\n**Single-node deployment**:\n```bash\n./deploy.sh install --single\n```\n\n**Single-replica cluster deployment**:\n```bash\n./deploy.sh install --single-replica\n```\n\n**Multi-replica cluster deployment**:\n```bash\n./deploy.sh install --multi-replica\n```\n\n**Important**: Before execution, all configuration parameters must be displayed to the user and confirmed before proceeding.\n\n### Step 7: Confirm Installation Information\n\nAfter checking that the configuration is correct, enter `Y` or `y`. If you need to return to modify the configuration file, enter `N` or `n`.\n\n```shell\n================= KaiwuDB Basic Info =================\nDeploy Mode: bare-metal\nManagement User: kaiwudb\nStart Mode: single\nRESTful Port: 8080\nKaiwuDB Port: 26257\nBRPC Port: 27257\nData Root: /var/lib/kaiwudb\nSecure Mode: tls\nCPU Usage Limit: 1\nLocal Node Address: 192.168.122.221\n=========================================================\nPlease confirm the installation information above(Y/n):\n```\n\n### Step 8: Handle Installation Failure\n\n**If the installation command execution fails (returns a non-zero exit code), the following operations must be performed:**\n\n```bash\n# 1. Enter the log directory\ncd log/\n\n# 2. List log files\nls -la\n\n# 3. Read the latest log file (usually install.log or a file with a timestamp)\ncat install.log\n# or\ntail -100 <latest log file>\n```\n\n**Report failure information to the user:**\n\n1. Clearly display the error information extracted from the logs\n2. Explain possible causes (refer to references/troubleshooting.md)\n3. **Exit the installation process, do not retry on your own**\n4. Wait for further user instructions\n\nExample report format:\n```\nInstallation failed!\n\nError information (from logs):\n[Specific error content extracted from log/install.log]\n\nPossible causes:\n- [Possible causes analyzed based on the error information]\n\nPlease check the above issues and let me know if you need to retry or have other instructions.\n```\n\n### Step 9: Initialize and Start Cluster - Cluster Mode Only\n\nAfter successful installation, execute:\n\n```bash\n./deploy.sh cluster -i\n# or\n./deploy.sh cluster --init\n```\n\n### Step 10: Check Status\n\n**Check service status**:\n```bash\nsystemctl status kaiwudb\n```\n\n**Check cluster status (cluster mode only)**:\n```bash\n./deploy.sh cluster -s\n# or\n./deploy.sh cluster --status\n# or use the convenience script\nkw-status\n```\n\n### Step 11: Configure Auto-start on Boot (Optional)\n\n```bash\nsystemctl enable kaiwudb\n```\n\n## Resources\n\n### references/\nContains KaiwuDB related documents:\n\n- `installation_guide.md` - Detailed installation guide\n- `troubleshooting.md` - Common issues and solutions\n\n### assets/\nContains KaiwuDB configuration file templates and resources:\n\n- `deploy.cfg` - Deployment configuration file template\n\nFile v1.2.0:_meta.json\n\n{\n  \"ownerId\": \"kn7fr8q8f22jd6gzb6f7prf9g183z64v\",\n  \"slug\": \"kwdb-install-deploy\",\n  \"version\": \"1.2.0\",\n  \"publishedAt\": 1784785915245\n}\n\nFile v1.2.0:references/installation_guide.md\n\n# KaiwuDB Script Deployment Guide\n\n## Prerequisites\n\n### System Requirements\n\n- Hardware, operating system, and software dependencies of all nodes to be deployed must meet the installation and deployment requirements.\n- **Network Settings**:\n  - Network connectivity between all nodes.\n  - Nodes are located within the same data center.\n  - Network latency between physical machines is no higher than 50 ms.\n  - Clock difference between nodes is no greater than 500 ms.\n  - Required ports for KaiwuDB service have been reserved on each node.\n- KaiwuDB bare-metal or container installation package for the corresponding system version has been obtained.\n\n### User Permissions\n\n- SSH passwordless login is configured between the current node and other nodes in the cluster.\n- The installation user is the `root` user or a regular user with `sudo` privileges.\n- When deploying with the container installation package, if the installation user is a non-`root` user, add the user to the `docker` group by running `sudo usermod -aG docker $USER`.\n\n## Deployment Steps\n\n### Step 1: Confirm Deployment Mode\n\nFirst, confirm the deployment mode:\n\n**Ask**:\n\"Please select the deployment mode: single-node deployment (single) or cluster deployment (cluster)?\"\n\n### Step 1.1: Confirm Cluster Replica Count - Cluster Mode Only\n\nIf cluster deployment is selected, further confirm the number of replicas:\n\n**Ask**:\n\"Please select the cluster deployment type: single-replica cluster (single-replica) or multi-replica cluster (multi-replica)?\"\n\n### Step 2: Confirm Installation Package Location\n\nProvide the full path of the installation package, including the filename, for example:\n```\n/path/to/KaiwuDB-1.0.0.tar.gz\n```\n\n### Step 3: Extract Installation Package\n\n```bash\n# Create installation directory\nsudo mkdir -p /opt/kaiwudb\n\n# Extract installation package\ntar -xzf \"$INSTALL_PACKAGE_PATH\" -C /opt/kaiwudb\n\n# Enter installation directory\ncd /opt/kaiwudb/$(basename \"$INSTALL_PACKAGE_PATH\" .tar.gz)\n```\n\n### Step 4: Configure deploy.cfg File\n\nI will ask you about each configuration item step by step according to the deployment mode you selected, and then modify the `deploy.cfg` configuration file based on your answers.\n\n#### Global Configuration (global) - Common to All Modes\n\n1. **Security Mode (secure_mode)**:\n   - Select the security mode: insecure (non-secure mode), tls (TLS secure mode, default), tlcp (TLCP secure mode)\n\n2. **Management User (management_user)**:\n   - Enter the KaiwuDB management username (default: kaiwudb)\n\n3. **RESTful Port (rest_port)**:\n   - Enter the KaiwuDB Web service port (default: 8080)\n\n4. **KaiwuDB Service Port (kaiwudb_port)**:\n   - Enter the KaiwuDB service port (default: 26257)\n\n5. **BRPC Port (brpc_port)**:\n   - Enter the KaiwuDB time-series engine communication port (default: 27257)\n\n6. **Data Directory (data_root)**:\n   - Enter the KaiwuDB data storage directory (default: /var/lib/kaiwudb)\n\n7. **CPU Resource Usage (cpu)**:\n   - Enter the proportion of CPU resources occupied by KaiwuDB service (0-1, default: unlimited)\n\n#### Local Node Configuration (local) - Common to All Modes\n\n8. **Local Node IP Address (local_node_ip)**:\n   - Enter the IP address of the local node (used for external services)\n\n#### Cluster Configuration (cluster) - Cluster Mode Only\n\n9. **Other Cluster Node IP Addresses (cluster_node_ips)**:\n   - Enter the IP addresses of other cluster nodes (multiple addresses separated by commas)\n\n10. **SSH Port (ssh_port)**:\n    - Enter the SSH service port of the remote node (default: 22)\n\n11. **SSH Username (ssh_user)**:\n    - Enter the SSH login username for the remote node\n\nBased on your answers, I will automatically generate the corresponding `deploy.cfg` configuration file. The cluster configuration section will be automatically omitted for single-node deployment.\n\n### Step 5: Execute Installation Command\n\nExecute the corresponding installation command based on your selection:\n\n**Single-node deployment**:\n```bash\n./deploy.sh install --single\n```\n\n**Single-replica cluster deployment**:\n```bash\n./deploy.sh install --single-replica\n```\n\n**Multi-replica cluster deployment**:\n```bash\n./deploy.sh install --multi-replica\n```\n\n### Step 6: Confirm Installation Information\n\nAfter checking that the configuration is correct, enter `Y` or `y`. If you need to return to modify the configuration file, enter `N` or `n`.\n\n```shell\n================= KaiwuDB Basic Info =================\nDeploy Mode: bare-metal\nManagement User: kaiwudb\nStart Mode: single\nRESTful Port: 8080\nKaiwuDB Port: 26257\nBRPC Port: 27257\nData Root: /var/lib/kaiwudb\nSecure Mode: tls\nCPU Usage Limit: 1\nLocal Node Address: 192.168.122.221\n=========================================================\nPlease confirm the installation information above(Y/n):\n```\n\n### Step 7: Initialize and Start Cluster - Cluster Mode Only\n\n```bash\n./deploy.sh cluster -i\n# or\n./deploy.sh cluster --init\n```\n\n### Step 8: Check Status\n\n**Check service status**:\n```bash\nsystemctl status kaiwudb\n```\n\n**Check cluster status (cluster mode only)**:\n```bash\n./deploy.sh cluster -s\n# or\n./deploy.sh cluster --status\n# or use the convenience script\nkw-status\n```\n\n### Step 9: Configure Auto-start on Boot (Optional)\n\n```bash\nsystemctl enable kaiwudb\n```\n\n## Status Check Description\n\nField descriptions returned by the `kw-status` command:\n\n| Field | Description |\n|-------|-------------|\n| `id` | Node ID |\n| `address` | Node address |\n| `sql_address` | SQL address |\n| `build` | KaiwuDB version |\n| `started_at` | Start time |\n| `updated_at` | Update time |\n| `is_available`/`is_live` | Node status, both `true` indicates normal |\n\n## Deployment Modes\n\n### Bare-metal Deployment\n\nUse the `KaiwuDB-baremetal-*.tar.gz` installation package for deployment.\n\n### Container Deployment\n\nUse the `KaiwuDB-container-*.tar.gz` installation package for deployment. Ensure Docker is installed and configured.\n\nFile v1.2.0:references/troubleshooting.md\n\n# KaiwuDB Common Issues and Solutions\n\n## Installation Issues\n\n### 1. Environment Check Failure\n\n**Problem**: Script prompts environment check failure\n\n**Solution**:\n- Check if system requirements are met (memory, disk space)\n- Ensure the user running the script has sufficient permissions\n- Check if network connection is normal\n\n### 2. Dependency Installation Failure\n\n**Problem**: Error occurs during dependency installation\n\n**Solution**:\n- Check if system package manager is working normally (yum/apt)\n- Try manually updating package manager:\n  - CentOS: `sudo yum update -y`\n  - Ubuntu: `sudo apt-get update -y`\n- If network is slow, consider using domestic mirror sources\n\n### 3. Installation Package Download Failure\n\n**Problem**: Unable to download KaiwuDB installation package\n\n**Solution**:\n- Check network connection\n- Try manually downloading the installation package and placing it in the scripts/ directory\n- Contact technical support to obtain download link\n\n## Runtime Issues\n\n### 1. Database Cannot Start\n\n**Problem**: No response after executing start command\n\n**Solution**:\n- Check data directory permissions: `ls -ld /var/lib/kwdb`\n- Check log files: `cat /var/log/kwdb/kwdb.log`\n- Check if configuration file is correct\n\n### 2. Unable to Connect to Database\n\n**Problem**: Cannot connect to database using psql command\n\n**Solution**:\n- Check if kwdb process is running: `ps aux | grep kwdb`\n- Check if firewall allows port 5432 access\n- Check if listen_addresses configuration is set to '*'\n- Check if pg_hba.conf file allows connections\n\n### 3. Database Running Slowly\n\n**Problem**: Long query response time\n\n**Solution**:\n- Check system resource usage: `top`\n- Check slow query log: `/var/log/kwdb/slow_query.log`\n- Optimize query statements\n- Adjust configuration file parameters\n\n## Performance Issues\n\n### 1. High Memory Usage\n\n**Problem**: Database process occupies too much memory\n\n**Solution**:\n- Adjust shared_buffers parameter\n- Check for memory leaks\n- Increase system memory\n\n### 2. High Disk I/O\n\n**Problem**: Slow disk write speed\n\n**Solution**:\n- Check if disk space is sufficient\n- Consider using SSD disk\n- Adjust checkpoint-related parameters\n- Optimize queries to reduce disk I/O\n\n## Backup and Recovery\n\n### 1. Backup Database\n\n```bash\n/opt/kwdb/current/bin/pg_dump -h localhost -p 5432 -U $USER -d kwdb_db > backup.sql\n```\n\n### 2. Restore Database\n\n```bash\n/opt/kwdb/current/bin/psql -h localhost -p 5432 -U $USER -d kwdb_db < backup.sql\n```\n\n## Contact Support\n\nIf you encounter issues that cannot be resolved, please contact technical support:\n- Email: support@kaiwudb.com\n- Phone: 400-xxx-xxxx\n\nFile v1.2.0:skill-card.md\n\n## Description: <br>\nTriggered when the user wants to install or deploy KaiwuDB (kwdb, kaiwudb). Helps users complete script-based deployment of KaiwuDB clusters, including configuration file modification, installation command execution, cluster initialization, and status checks. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[kwdb](https://clawhub.ai/user/kwdb) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and operations engineers use this skill to install or deploy KaiwuDB on Linux systems, including single-node and cluster deployments. It guides configuration confirmation, installation command execution, initialization, status checks, and failure handling. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: KaiwuDB deployment may require privileged access such as root, sudo, docker-group membership, or passwordless SSH. <br>\nMitigation: Install only on intended deployment systems and use a controlled deployment account with the narrowest practical privileges. <br>\nRisk: A user-provided KaiwuDB installation package could be untrusted or malformed. <br>\nMitigation: Use a trusted KaiwuDB package and verify its checksum or source when available before running deployment commands. <br>\nRisk: Incorrect ports, IP addresses, data directories, or security-mode settings can break deployment or expose services unexpectedly. <br>\nMitigation: Confirm every deployment parameter with the user before execution, including displayed defaults. <br>\nRisk: Repeated automatic retries after a failed installation can compound configuration or environment problems. <br>\nMitigation: Read the installation logs, report the error and likely causes, exit the installation flow, and wait for explicit user instructions before retrying. <br>\n\n\n## Reference(s): <br>\n- [KaiwuDB Script Deployment Guide](references/installation_guide.md) <br>\n- [KaiwuDB Common Issues and Solutions](references/troubleshooting.md) <br>\n- [KWDB Install Deploy on ClawHub](https://clawhub.ai/kwdb/skills/kwdb-install-deploy) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Guidance, Markdown, Shell commands, Configuration] <br>\n**Output Format:** [Markdown guidance with inline shell commands and configuration values] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Prompts the user to confirm deployment parameters before execution and reports installation failures from logs.] <br>\n\n## Skill Version(s): <br>\n1.2.0 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.2.0:assets/deploy.cfg\n\n[global]\n# Whether to turn on secure mode\nsecure_mode=tls\n# Management KaiwuDB user\nmanagement_user=kaiwudb\n# KaiwuDB cluster http port\nrest_port=8080\n# KaiwuDB service port\nkaiwudb_port=26257\n# KaiwuDB brpc port\nbrpc_port=27257\n# KaiwuDB data directory\ndata_root=/var/lib/kaiwudb\n# CPU usage[0-1]\ncpu=1\n\n[local]\n# local node configuration\nlocal_node_ip=192.168.122.221\n\nArchive v1.1.0: 6 files, 9166 bytes\n\nFiles: assets/deploy.cfg (369b), references/installation_guide.md (5909b), references/troubleshooting.md (2639b), skill-card.md (2408b), SKILL.md (9705b), _meta.json (138b)\n\nFile v1.1.0:SKILL.md\n\n---\nname: kwdb-install-deploy\ndescription: Triggered when the user wants to install or deploy KaiwuDB (kwdb, kaiwudb). Helps users complete script-based deployment of KaiwuDB clusters, including configuration file modification, installation command execution, cluster initialization, and status checks.\n---\n\n# KWDB Install\n\n## Overview\n\nThis skill provides script-based deployment for KaiwuDB, suitable for bare-metal or container deployment in Linux environments. Supports single-replica and multi-replica cluster deployments with complete deployment workflow guidance.\n\n## Mandatory Rules\n\n**The following three rules must be strictly followed:**\n\n### 1. Prohibit Guessing Installation Parameters\n\n**Do not guess or assume any installation parameters and proceed with installation unless explicitly specified by the user.**\n\n- All configuration parameters (ports, IPs, data directories, security modes, etc.) must be confirmed with the user one by one\n- Even if the user says \"use defaults\", the default values must be explicitly listed and confirmed with the user\n- The installation package path must be explicitly provided by the user and must not be guessed\n\n### 2. Must Read Logs on Installation Failure\n\n**When the installation command fails, you must read the log files in the `log/` directory under the same path as the installation script to obtain detailed failure information.**\n\nLog file path: `/opt/kaiwudb/<package-name>/log/` or `kaiwudb_install/log/`\n\n```bash\n# After installation failure, first read the logs\nls -la log/\ncat log/install.log  # or the latest generated log file\n```\n\n### 3. Exit After Reporting Failure, Prohibit Arbitrary Retries\n\n**After installation failure, you must:**\n1. Clearly display the error information obtained from the logs to the user\n2. Explain possible causes\n3. Exit the installation process, **do not retry on your own**\n4. Wait for user instructions before deciding on the next step\n\n**Exception**: Only when the user explicitly requests \"retry\", you may execute the installation command again.\n\n## Prerequisites\n\n### System Requirements\n\n- **Hardware**:\n  - Memory: At least 8 GB RAM (16 GB recommended)\n  - CPU: At least 2 cores (4 cores recommended)\n  - Disk: At least 50 GB available space (SSD recommended)\n- **Operating System**:\n  - CentOS 7/8\n  - Ubuntu 18.04/20.04/22.04\n- **Network**: All nodes must have network connectivity\n\n### User Permissions\n\n- SSH passwordless login configured between nodes\n- User must be `root` or have `sudo` privileges\n- For container deployment, non-root users must be in the `docker` group\n\n## Deployment Steps\n\n### Step 1: Confirm Deployment Mode\n\nFirst, I need to confirm the deployment mode you need:\n\n**Ask**:\n\"Please select the deployment mode: single-node deployment (single) or cluster deployment (cluster)?\"\n\n### Step 1.1: Confirm Cluster Replica Count - Cluster Mode Only\n\nIf cluster deployment is selected, I need to further confirm the number of replicas:\n\n**Ask**:\n\"Please select the cluster deployment type: single-replica cluster (single-replica) or multi-replica cluster (multi-replica)?\"\n\n### Step 2: Confirm Installation Package Location\n\nNext, I need to confirm the location of the KaiwuDB installation package with you. The installation package should be a `.tar.gz` file with `KaiwuDB` as the prefix, for example: `KaiwuDB-1.0.0.tar.gz`.\n\n**Ask**:\n\"Please provide the full path (including filename) of the KaiwuDB installation package. The installation package should be a tar.gz file with KaiwuDB as the prefix, for example /path/to/KaiwuDB-1.0.0.tar.gz.\"\n\n**Note**: You must wait for the user to provide the exact path and must not guess on your own.\n\n### Step 3: Verify Installation Package\n\nAfter confirming the installation package location, verify that the file exists and has the correct format:\n\n```bash\n# Check if the installation package exists\nif [ ! -f \"$INSTALL_PACKAGE_PATH\" ]; then\n    echo \"Error: Installation package does not exist, please check if the path is correct\"\n    exit 1\nfi\n\n# Check filename format\nif [[ \"$(basename $INSTALL_PACKAGE_PATH)\" != KaiwuDB*.tar.gz ]]; then\n    echo \"Error: Installation package filename is incorrect. It should be a tar.gz file with KaiwuDB as the prefix\"\n    exit 1\nfi\n```\n\n### Step 4: Extract Installation Package and Configure\n\n```bash\n# Create installation directory\nsudo mkdir -p /opt/kaiwudb\n\n# Extract installation package\ntar -xzf \"$INSTALL_PACKAGE_PATH\" -C /opt/kaiwudb\n\n# Enter installation directory\ncd /opt/kaiwudb/kaiwudb_install\n```\n\n### Step 5: Configure deploy.cfg File\n\nI will ask you about each configuration item step by step according to the deployment mode you selected, and then modify the `deploy.cfg` configuration file based on your answers.\n\n**Mandatory**: Unless the user voluntarily says \"all defaults\" or explicitly specifies parameter values, each item must be confirmed one by one. Even if the user selects default values, the defaults must be displayed and confirmed.\n\n#### Global Configuration (global) - Common to All Modes\n\n1. **Security Mode (secure_mode)**:\n   - Ask: \"Please select the security mode: insecure (non-secure mode), tls (TLS secure mode, default), tlcp (TLCP secure mode)\"\n\n2. **Management User (management_user)**:\n   - Ask: \"Please enter the KaiwuDB management username (default: kaiwudb)\"\n\n3. **RESTful Port (rest_port)**:\n   - Ask: \"Please enter the KaiwuDB Web service port (default: 8080)\"\n\n4. **KaiwuDB Service Port (kaiwudb_port)**:\n   - Ask: \"Please enter the KaiwuDB service port (default: 26257)\"\n\n5. **BRPC Port (brpc_port)**:\n   - Ask: \"Please enter the KaiwuDB time-series engine communication port (default: 27257)\"\n\n6. **Data Directory (data_root)**:\n   - Ask: \"Please enter the KaiwuDB data storage directory (default: /var/lib/kaiwudb)\"\n\n7. **CPU Resource Usage (cpu)**:\n   - Ask: \"Please enter the proportion of CPU resources occupied by KaiwuDB service (0-1, default: unlimited)\"\n\n#### Local Node Configuration (local) - Common to All Modes\n\n8. **Local Node IP Address (local_node_ip)**:\n   - Ask: \"Please enter the IP address of the local node (used for external services)\"\n   - **Note**: This parameter has no default value and must be provided by the user\n\n#### Cluster Configuration (cluster) - Cluster Mode Only\n\n9. **Other Cluster Node IP Addresses (cluster_node_ips)**:\n   - Ask: \"Please enter the IP addresses of other cluster nodes (multiple addresses separated by commas)\"\n\n10. **SSH Port (ssh_port)**:\n    - Ask: \"Please enter the SSH service port of the remote node (default: 22)\"\n\n11. **SSH Username (ssh_user)**:\n    - Ask: \"Please enter the SSH login username for the remote node\"\n\nBased on your answers, I will automatically generate the corresponding `deploy.cfg` configuration file. The cluster configuration section will be automatically omitted for single-node deployment.\n\n### Step 6: Execute Installation Command\n\nExecute the corresponding installation command based on your selection:\n\n**Single-node deployment**:\n```bash\n./deploy.sh install --single\n```\n\n**Single-replica cluster deployment**:\n```bash\n./deploy.sh install --single-replica\n```\n\n**Multi-replica cluster deployment**:\n```bash\n./deploy.sh install --multi-replica\n```\n\n**Important**: Before execution, all configuration parameters must be displayed to the user and confirmed before proceeding.\n\n### Step 7: Confirm Installation Information\n\nAfter checking that the configuration is correct, enter `Y` or `y`. If you need to return to modify the configuration file, enter `N` or `n`.\n\n```shell\n================= KaiwuDB Basic Info =================\nDeploy Mode: bare-metal\nManagement User: kaiwudb\nStart Mode: single\nRESTful Port: 8080\nKaiwuDB Port: 26257\nBRPC Port: 27257\nData Root: /var/lib/kaiwudb\nSecure Mode: tls\nCPU Usage Limit: 1\nLocal Node Address: 192.168.122.221\n=========================================================\nPlease confirm the installation information above(Y/n):\n```\n\n### Step 8: Handle Installation Failure\n\n**If the installation command execution fails (returns a non-zero exit code), the following operations must be performed:**\n\n```bash\n# 1. Enter the log directory\ncd log/\n\n# 2. List log files\nls -la\n\n# 3. Read the latest log file (usually install.log or a file with a timestamp)\ncat install.log\n# or\ntail -100 <latest log file>\n```\n\n**Report failure information to the user:**\n\n1. Clearly display the error information extracted from the logs\n2. Explain possible causes (refer to references/troubleshooting.md)\n3. **Exit the installation process, do not retry on your own**\n4. Wait for further user instructions\n\nExample report format:\n```\nInstallation failed!\n\nError information (from logs):\n[Specific error content extracted from log/install.log]\n\nPossible causes:\n- [Possible causes analyzed based on the error information]\n\nPlease check the above issues and let me know if you need to retry or have other instructions.\n```\n\n### Step 9: Initialize and Start Cluster - Cluster Mode Only\n\nAfter successful installation, execute:\n\n```bash\n./deploy.sh cluster -i\n# or\n./deploy.sh cluster --init\n```\n\n### Step 10: Check Status\n\n**Check service status**:\n```bash\nsystemctl status kaiwudb\n```\n\n**Check cluster status (cluster mode only)**:\n```bash\n./deploy.sh cluster -s\n# or\n./deploy.sh cluster --status\n# or use the convenience script\nkw-status\n```\n\n### Step 11: Configure Auto-start on Boot (Optional)\n\n```bash\nsystemctl enable kaiwudb\n```\n\n## Resources\n\n### references/\nContains KaiwuDB related documents:\n\n- `installation_guide.md` - Detailed installation guide\n- `troubleshooting.md` - Common issues and solutions\n\n### assets/\nContains KaiwuDB configuration file templates and resources:\n\n- `deploy.cfg` - Deployment configuration file template\n\nFile v1.1.0:_meta.json\n\n{\n  \"ownerId\": \"kn7fr8q8f22jd6gzb6f7prf9g183z64v\",\n  \"slug\": \"kwdb-install-deploy\",\n  \"version\": \"1.1.0\",\n  \"publishedAt\": 1782118836346\n}\n\nFile v1.1.0:references/installation_guide.md\n\n# KaiwuDB Script Deployment Guide\n\n## Prerequisites\n\n### System Requirements\n\n- Hardware, operating system, and software dependencies of all nodes to be deployed must meet the installation and deployment requirements.\n- **Network Settings**:\n  - Network connectivity between all nodes.\n  - Nodes are located within the same data center.\n  - Network latency between physical machines is no higher than 50 ms.\n  - Clock difference between nodes is no greater than 500 ms.\n  - Required ports for KaiwuDB service have been reserved on each node.\n- KaiwuDB bare-metal or container installation package for the corresponding system version has been obtained.\n\n### User Permissions\n\n- SSH passwordless login is configured between the current node and other nodes in the cluster.\n- The installation user is the `root` user or a regular user with `sudo` privileges.\n- When deploying with the container installation package, if the installation user is a non-`root` user, add the user to the `docker` group by running `sudo usermod -aG docker $USER`.\n\n## Deployment Steps\n\n### Step 1: Confirm Deployment Mode\n\nFirst, confirm the deployment mode:\n\n**Ask**:\n\"Please select the deployment mode: single-node deployment (single) or cluster deployment (cluster)?\"\n\n### Step 1.1: Confirm Cluster Replica Count - Cluster Mode Only\n\nIf cluster deployment is selected, further confirm the number of replicas:\n\n**Ask**:\n\"Please select the cluster deployment type: single-replica cluster (single-replica) or multi-replica cluster (multi-replica)?\"\n\n### Step 2: Confirm Installation Package Location\n\nProvide the full path of the installation package, including the filename, for example:\n```\n/path/to/KaiwuDB-1.0.0.tar.gz\n```\n\n### Step 3: Extract Installation Package\n\n```bash\n# Create installation directory\nsudo mkdir -p /opt/kaiwudb\n\n# Extract installation package\ntar -xzf \"$INSTALL_PACKAGE_PATH\" -C /opt/kaiwudb\n\n# Enter installation directory\ncd /opt/kaiwudb/$(basename \"$INSTALL_PACKAGE_PATH\" .tar.gz)\n```\n\n### Step 4: Configure deploy.cfg File\n\nI will ask you about each configuration item step by step according to the deployment mode you selected, and then modify the `deploy.cfg` configuration file based on your answers.\n\n#### Global Configuration (global) - Common to All Modes\n\n1. **Security Mode (secure_mode)**:\n   - Select the security mode: insecure (non-secure mode), tls (TLS secure mode, default), tlcp (TLCP secure mode)\n\n2. **Management User (management_user)**:\n   - Enter the KaiwuDB management username (default: kaiwudb)\n\n3. **RESTful Port (rest_port)**:\n   - Enter the KaiwuDB Web service port (default: 8080)\n\n4. **KaiwuDB Service Port (kaiwudb_port)**:\n   - Enter the KaiwuDB service port (default: 26257)\n\n5. **BRPC Port (brpc_port)**:\n   - Enter the KaiwuDB time-series engine communication port (default: 27257)\n\n6. **Data Directory (data_root)**:\n   - Enter the KaiwuDB data storage directory (default: /var/lib/kaiwudb)\n\n7. **CPU Resource Usage (cpu)**:\n   - Enter the proportion of CPU resources occupied by KaiwuDB service (0-1, default: unlimited)\n\n#### Local Node Configuration (local) - Common to All Modes\n\n8. **Local Node IP Address (local_node_ip)**:\n   - Enter the IP address of the local node (used for external services)\n\n#### Cluster Configuration (cluster) - Cluster Mode Only\n\n9. **Other Cluster Node IP Addresses (cluster_node_ips)**:\n   - Enter the IP addresses of other cluster nodes (multiple addresses separated by commas)\n\n10. **SSH Port (ssh_port)**:\n    - Enter the SSH service port of the remote node (default: 22)\n\n11. **SSH Username (ssh_user)**:\n    - Enter the SSH login username for the remote node\n\nBased on your answers, I will automatically generate the corresponding `deploy.cfg` configuration file. The cluster configuration section will be automatically omitted for single-node deployment.\n\n### Step 5: Execute Installation Command\n\nExecute the corresponding installation command based on your selection:\n\n**Single-node deployment**:\n```bash\n./deploy.sh install --single\n```\n\n**Single-replica cluster deployment**:\n```bash\n./deploy.sh install --single-replica\n```\n\n**Multi-replica cluster deployment**:\n```bash\n./deploy.sh install --multi-replica\n```\n\n### Step 6: Confirm Installation Information\n\nAfter checking that the configuration is correct, enter `Y` or `y`. If you need to return to modify the configuration file, enter `N` or `n`.\n\n```shell\n================= KaiwuDB Basic Info =================\nDeploy Mode: bare-metal\nManagement User: kaiwudb\nStart Mode: single\nRESTful Port: 8080\nKaiwuDB Port: 26257\nBRPC Port: 27257\nData Root: /var/lib/kaiwudb\nSecure Mode: tls\nCPU Usage Limit: 1\nLocal Node Address: 192.168.122.221\n=========================================================\nPlease confirm the installation information above(Y/n):\n```\n\n### Step 7: Initialize and Start Cluster - Cluster Mode Only\n\n```bash\n./deploy.sh cluster -i\n# or\n./deploy.sh cluster --init\n```\n\n### Step 8: Check Status\n\n**Check service status**:\n```bash\nsystemctl status kaiwudb\n```\n\n**Check cluster status (cluster mode only)**:\n```bash\n./deploy.sh cluster -s\n# or\n./deploy.sh cluster --status\n# or use the convenience script\nkw-status\n```\n\n### Step 9: Configure Auto-start on Boot (Optional)\n\n```bash\nsystemctl enable kaiwudb\n```\n\n## Status Check Description\n\nField descriptions returned by the `kw-status` command:\n\n| Field | Description |\n|-------|-------------|\n| `id` | Node ID |\n| `address` | Node address |\n| `sql_address` | SQL address |\n| `build` | KaiwuDB version |\n| `started_at` | Start time |\n| `updated_at` | Update time |\n| `is_available`/`is_live` | Node status, both `true` indicates normal |\n\n## Deployment Modes\n\n### Bare-metal Deployment\n\nUse the `KaiwuDB-baremetal-*.tar.gz` installation package for deployment.\n\n### Container Deployment\n\nUse the `KaiwuDB-container-*.tar.gz` installation package for deployment. Ensure Docker is installed and configured.\n\nFile v1.1.0:references/troubleshooting.md\n\n# KaiwuDB Common Issues and Solutions\n\n## Installation Issues\n\n### 1. Environment Check Failure\n\n**Problem**: Script prompts environment check failure\n\n**Solution**:\n- Check if system requirements are met (memory, disk space)\n- Ensure the user running the script has sufficient permissions\n- Check if network connection is normal\n\n### 2. Dependency Installation Failure\n\n**Problem**: Error occurs during dependency installation\n\n**Solution**:\n- Check if system package manager is working normally (yum/apt)\n- Try manually updating package manager:\n  - CentOS: `sudo yum update -y`\n  - Ubuntu: `sudo apt-get update -y`\n- If network is slow, consider using domestic mirror sources\n\n### 3. Installation Package Download Failure\n\n**Problem**: Unable to download KaiwuDB installation package\n\n**Solution**:\n- Check network connection\n- Try manually downloading the installation package and placing it in the scripts/ directory\n- Contact technical support to obtain download link\n\n## Runtime Issues\n\n### 1. Database Cannot Start\n\n**Problem**: No response after executing start command\n\n**Solution**:\n- Check data directory permissions: `ls -ld /var/lib/kwdb`\n- Check log files: `cat /var/log/kwdb/kwdb.log`\n- Check if configuration file is correct\n\n### 2. Unable to Connect to Database\n\n**Problem**: Cannot connect to database using psql command\n\n**Solution**:\n- Check if kwdb process is running: `ps aux | grep kwdb`\n- Check if firewall allows port 5432 access\n- Check if listen_addresses configuration is set to '*'\n- Check if pg_hba.conf file allows connections\n\n### 3. Database Running Slowly\n\n**Problem**: Long query response time\n\n**Solution**:\n- Check system resource usage: `top`\n- Check slow query log: `/var/log/kwdb/slow_query.log`\n- Optimize query statements\n- Adjust configuration file parameters\n\n## Performance Issues\n\n### 1. High Memory Usage\n\n**Problem**: Database process occupies too much memory\n\n**Solution**:\n- Adjust shared_buffers parameter\n- Check for memory leaks\n- Increase system memory\n\n### 2. High Disk I/O\n\n**Problem**: Slow disk write speed\n\n**Solution**:\n- Check if disk space is sufficient\n- Consider using SSD disk\n- Adjust checkpoint-related parameters\n- Optimize queries to reduce disk I/O\n\n## Backup and Recovery\n\n### 1. Backup Database\n\n```bash\n/opt/kwdb/current/bin/pg_dump -h localhost -p 5432 -U $USER -d kwdb_db > backup.sql\n```\n\n### 2. Restore Database\n\n```bash\n/opt/kwdb/current/bin/psql -h localhost -p 5432 -U $USER -d kwdb_db < backup.sql\n```\n\n## Contact Support\n\nIf you encounter issues that cannot be resolved, please contact technical support:\n- Email: support@kaiwudb.com\n- Phone: 400-xxx-xxxx\n\nFile v1.1.0:skill-card.md\n\n## Description: <br>\nTriggered when the user wants to install or deploy KaiwuDB (kwdb, kaiwudb). Helps users complete script-based deployment of KaiwuDB clusters, including configuration file modification, installation command execution, cluster initialization, and status checks. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[kwdb](https://clawhub.ai/user/kwdb) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and database administrators use this skill to plan and execute user-confirmed KaiwuDB deployments on Linux hosts. It guides single-node and cluster installation, deployment configuration, installation command execution, initialization, status checks, and failure reporting. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill can guide privileged KaiwuDB deployment changes on a target host. <br>\nMitigation: Use it only on intended hosts, require an explicit maintenance window and backup for production systems, and review sudo, systemctl, and deploy.sh commands before execution. <br>\nRisk: Incorrect installation parameters can affect ports, data directories, security mode, or cluster connectivity. <br>\nMitigation: Confirm every generated deploy.cfg value and the installation package path before running deployment commands; do not rely on guessed defaults. <br>\n\n\n## Reference(s): <br>\n- [KWDB Install Deploy on ClawHub](https://clawhub.ai/kwdb/kwdb-install-deploy) <br>\n- [KaiwuDB Script Deployment Guide](references/installation_guide.md) <br>\n- [KaiwuDB Common Issues and Solutions](references/troubleshooting.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown with inline shell commands and configuration guidance] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Requires explicit user confirmation before applying installation parameters or running privileged deployment commands.] <br>\n\n## Skill Version(s): <br>\n1.1.0 (source: release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.1.0:assets/deploy.cfg\n\n[global]\n# Whether to turn on secure mode\nsecure_mode=tls\n# Management KaiwuDB user\nmanagement_user=kaiwudb\n# KaiwuDB cluster http port\nrest_port=8080\n# KaiwuDB service port\nkaiwudb_port=26257\n# KaiwuDB brpc port\nbrpc_port=27257\n# KaiwuDB data directory\ndata_root=/var/lib/kaiwudb\n# CPU usage[0-1]\ncpu=1\n\n[local]\n# local node configuration\nlocal_node_ip=192.168.122.221\n\nArchive v1.0.0: 5 files, 7949 bytes\n\nFiles: assets/deploy.cfg (369b), references/installation_guide.md (5909b), references/troubleshooting.md (2639b), SKILL.md (9705b), _meta.json (138b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: kwdb-install-deploy\ndescription: Triggered when the user wants to install or deploy KaiwuDB (kwdb, kaiwudb). Helps users complete script-based deployment of KaiwuDB clusters, including configuration file modification, installation command execution, cluster initialization, and status checks.\n---\n\n# KWDB Install\n\n## Overview\n\nThis skill provides script-based deployment for KaiwuDB, suitable for bare-metal or container deployment in Linux environments. Supports single-replica and multi-replica cluster deployments with complete deployment workflow guidance.\n\n## Mandatory Rules\n\n**The following three rules must be strictly followed:**\n\n### 1. Prohibit Guessing Installation Parameters\n\n**Do not guess or assume any installation parameters and proceed with installation unless explicitly specified by the user.**\n\n- All configuration parameters (ports, IPs, data directories, security modes, etc.) must be confirmed with the user one by one\n- Even if the user says \"use defaults\", the default values must be explicitly listed and confirmed with the user\n- The installation package path must be explicitly provided by the user and must not be guessed\n\n### 2. Must Read Logs on Installation Failure\n\n**When the installation command fails, you must read the log files in the `log/` directory under the same path as the installation script to obtain detailed failure information.**\n\nLog file path: `/opt/kaiwudb/<package-name>/log/` or `kaiwudb_install/log/`\n\n```bash\n# After installation failure, first read the logs\nls -la log/\ncat log/install.log  # or the latest generated log file\n```\n\n### 3. Exit After Reporting Failure, Prohibit Arbitrary Retries\n\n**After installation failure, you must:**\n1. Clearly display the error information obtained from the logs to the user\n2. Explain possible causes\n3. Exit the installation process, **do not retry on your own**\n4. Wait for user instructions before deciding on the next step\n\n**Exception**: Only when the user explicitly requests \"retry\", you may execute the installation command again.\n\n## Prerequisites\n\n### System Requirements\n\n- **Hardware**:\n  - Memory: At least 8 GB RAM (16 GB recommended)\n  - CPU: At least 2 cores (4 cores recommended)\n  - Disk: At least 50 GB available space (SSD recommended)\n- **Operating System**:\n  - CentOS 7/8\n  - Ubuntu 18.04/20.04/22.04\n- **Network**: All nodes must have network connectivity\n\n### User Permissions\n\n- SSH passwordless login configured between nodes\n- User must be `root` or have `sudo` privileges\n- For container deployment, non-root users must be in the `docker` group\n\n## Deployment Steps\n\n### Step 1: Confirm Deployment Mode\n\nFirst, I need to confirm the deployment mode you need:\n\n**Ask**:\n\"Please select the deployment mode: single-node deployment (single) or cluster deployment (cluster)?\"\n\n### Step 1.1: Confirm Cluster Replica Count - Cluster Mode Only\n\nIf cluster deployment is selected, I need to further confirm the number of replicas:\n\n**Ask**:\n\"Please select the cluster deployment type: single-replica cluster (single-replica) or multi-replica cluster (multi-replica)?\"\n\n### Step 2: Confirm Installation Package Location\n\nNext, I need to confirm the location of the KaiwuDB installation package with you. The installation package should be a `.tar.gz` file with `KaiwuDB` as the prefix, for example: `KaiwuDB-1.0.0.tar.gz`.\n\n**Ask**:\n\"Please provide the full path (including filename) of the KaiwuDB installation package. The installation package should be a tar.gz file with KaiwuDB as the prefix, for example /path/to/KaiwuDB-1.0.0.tar.gz.\"\n\n**Note**: You must wait for the user to provide the exact path and must not guess on your own.\n\n### Step 3: Verify Installation Package\n\nAfter confirming the installation package location, verify that the file exists and has the correct format:\n\n```bash\n# Check if the installation package exists\nif [ ! -f \"$INSTALL_PACKAGE_PATH\" ]; then\n    echo \"Error: Installation package does not exist, please check if the path is correct\"\n    exit 1\nfi\n\n# Check filename format\nif [[ \"$(basename $INSTALL_PACKAGE_PATH)\" != KaiwuDB*.tar.gz ]]; then\n    echo \"Error: Installation package filename is incorrect. It should be a tar.gz file with KaiwuDB as the prefix\"\n    exit 1\nfi\n```\n\n### Step 4: Extract Installation Package and Configure\n\n```bash\n# Create installation directory\nsudo mkdir -p /opt/kaiwudb\n\n# Extract installation package\ntar -xzf \"$INSTALL_PACKAGE_PATH\" -C /opt/kaiwudb\n\n# Enter installation directory\ncd /opt/kaiwudb/kaiwudb_install\n```\n\n### Step 5: Configure deploy.cfg File\n\nI will ask you about each configuration item step by step according to the deployment mode you selected, and then modify the `deploy.cfg` configuration file based on your answers.\n\n**Mandatory**: Unless the user voluntarily says \"all defaults\" or explicitly specifies parameter values, each item must be confirmed one by one. Even if the user selects default values, the defaults must be displayed and confirmed.\n\n#### Global Configuration (global) - Common to All Modes\n\n1. **Security Mode (secure_mode)**:\n   - Ask: \"Please select the security mode: insecure (non-secure mode), tls (TLS secure mode, default), tlcp (TLCP secure mode)\"\n\n2. **Management User (management_user)**:\n   - Ask: \"Please enter the KaiwuDB management username (default: kaiwudb)\"\n\n3. **RESTful Port (rest_port)**:\n   - Ask: \"Please enter the KaiwuDB Web service port (default: 8080)\"\n\n4. **KaiwuDB Service Port (kaiwudb_port)**:\n   - Ask: \"Please enter the KaiwuDB service port (default: 26257)\"\n\n5. **BRPC Port (brpc_port)**:\n   - Ask: \"Please enter the KaiwuDB time-series engine communication port (default: 27257)\"\n\n6. **Data Directory (data_root)**:\n   - Ask: \"Please enter the KaiwuDB data storage directory (default: /var/lib/kaiwudb)\"\n\n7. **CPU Resource Usage (cpu)**:\n   - Ask: \"Please enter the proportion of CPU resources occupied by KaiwuDB service (0-1, default: unlimited)\"\n\n#### Local Node Configuration (local) - Common to All Modes\n\n8. **Local Node IP Address (local_node_ip)**:\n   - Ask: \"Please enter the IP address of the local node (used for external services)\"\n   - **Note**: This parameter has no default value and must be provided by the user\n\n#### Cluster Configuration (cluster) - Cluster Mode Only\n\n9. **Other Cluster Node IP Addresses (cluster_node_ips)**:\n   - Ask: \"Please enter the IP addresses of other cluster nodes (multiple addresses separated by commas)\"\n\n10. **SSH Port (ssh_port)**:\n    - Ask: \"Please enter the SSH service port of the remote node (default: 22)\"\n\n11. **SSH Username (ssh_user)**:\n    - Ask: \"Please enter the SSH login username for the remote node\"\n\nBased on your answers, I will automatically generate the corresponding `deploy.cfg` configuration file. The cluster configuration section will be automatically omitted for single-node deployment.\n\n### Step 6: Execute Installation Command\n\nExecute the corresponding installation command based on your selection:\n\n**Single-node deployment**:\n```bash\n./deploy.sh install --single\n```\n\n**Single-replica cluster deployment**:\n```bash\n./deploy.sh install --single-replica\n```\n\n**Multi-replica cluster deployment**:\n```bash\n./deploy.sh install --multi-replica\n```\n\n**Important**: Before execution, all configuration parameters must be displayed to the user and confirmed before proceeding.\n\n### Step 7: Confirm Installation Information\n\nAfter checking that the configuration is correct, enter `Y` or `y`. If you need to return to modify the configuration file, enter `N` or `n`.\n\n```shell\n================= KaiwuDB Basic Info =================\nDeploy Mode: bare-metal\nManagement User: kaiwudb\nStart Mode: single\nRESTful Port: 8080\nKaiwuDB Port: 26257\nBRPC Port: 27257\nData Root: /var/lib/kaiwudb\nSecure Mode: tls\nCPU Usage Limit: 1\nLocal Node Address: 192.168.122.221\n=========================================================\nPlease confirm the installation information above(Y/n):\n```\n\n### Step 8: Handle Installation Failure\n\n**If the installation command execution fails (returns a non-zero exit code), the following operations must be performed:**\n\n```bash\n# 1. Enter the log directory\ncd log/\n\n# 2. List log files\nls -la\n\n# 3. Read the latest log file (usually install.log or a file with a timestamp)\ncat install.log\n# or\ntail -100 <latest log file>\n```\n\n**Report failure information to the user:**\n\n1. Clearly display the error information extracted from the logs\n2. Explain possible causes (refer to references/troubleshooting.md)\n3. **Exit the installation process, do not retry on your own**\n4. Wait for further user instructions\n\nExample report format:\n```\nInstallation failed!\n\nError information (from logs):\n[Specific error content extracted from log/install.log]\n\nPossible causes:\n- [Possible causes analyzed based on the error information]\n\nPlease check the above issues and let me know if you need to retry or have other instructions.\n```\n\n### Step 9: Initialize and Start Cluster - Cluster Mode Only\n\nAfter successful installation, execute:\n\n```bash\n./deploy.sh cluster -i\n# or\n./deploy.sh cluster --init\n```\n\n### Step 10: Check Status\n\n**Check service status**:\n```bash\nsystemctl status kaiwudb\n```\n\n**Check cluster status (cluster mode only)**:\n```bash\n./deploy.sh cluster -s\n# or\n./deploy.sh cluster --status\n# or use the convenience script\nkw-status\n```\n\n### Step 11: Configure Auto-start on Boot (Optional)\n\n```bash\nsystemctl enable kaiwudb\n```\n\n## Resources\n\n### references/\nContains KaiwuDB related documents:\n\n- `installation_guide.md` - Detailed installation guide\n- `troubleshooting.md` - Common issues and solutions\n\n### assets/\nContains KaiwuDB configuration file templates and resources:\n\n- `deploy.cfg` - Deployment configuration file template\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn7fr8q8f22jd6gzb6f7prf9g183z64v\",\n  \"slug\": \"kwdb-install-deploy\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1778644834367\n}\n\nFile v1.0.0:references/installation_guide.md\n\n# KaiwuDB Script Deployment Guide\n\n## Prerequisites\n\n### System Requirements\n\n- Hardware, operating system, and software dependencies of all nodes to be deployed must meet the installation and deployment requirements.\n- **Network Settings**:\n  - Network connectivity between all nodes.\n  - Nodes are located within the same data center.\n  - Network latency between physical machines is no higher than 50 ms.\n  - Clock difference between nodes is no greater than 500 ms.\n  - Required ports for KaiwuDB service have been reserved on each node.\n- KaiwuDB bare-metal or container installation package for the corresponding system version has been obtained.\n\n### User Permissions\n\n- SSH passwordless login is configured between the current node and other nodes in the cluster.\n- The installation user is the `root` user or a regular user with `sudo` privileges.\n- When deploying with the container installation package, if the installation user is a non-`root` user, add the user to the `docker` group by running `sudo usermod -aG docker $USER`.\n\n## Deployment Steps\n\n### Step 1: Confirm Deployment Mode\n\nFirst, confirm the deployment mode:\n\n**Ask**:\n\"Please select the deployment mode: single-node deployment (single) or cluster deployment (cluster)?\"\n\n### Step 1.1: Confirm Cluster Replica Count - Cluster Mode Only\n\nIf cluster deployment is selected, further confirm the number of replicas:\n\n**Ask**:\n\"Please select the cluster deployment type: single-replica cluster (single-replica) or multi-replica cluster (multi-replica)?\"\n\n### Step 2: Confirm Installation Package Location\n\nProvide the full path of the installation package, including the filename, for example:\n```\n/path/to/KaiwuDB-1.0.0.tar.gz\n```\n\n### Step 3: Extract Installation Package\n\n```bash\n# Create installation directory\nsudo mkdir -p /opt/kaiwudb\n\n# Extract installation package\ntar -xzf \"$INSTALL_PACKAGE_PATH\" -C /opt/kaiwudb\n\n# Enter installation directory\ncd /opt/kaiwudb/$(basename \"$INSTALL_PACKAGE_PATH\" .tar.gz)\n```\n\n### Step 4: Configure deploy.cfg File\n\nI will ask you about each configuration item step by step according to the deployment mode you selected, and then modify the `deploy.cfg` configuration file based on your answers.\n\n#### Global Configuration (global) - Common to All Modes\n\n1. **Security Mode (secure_mode)**:\n   - Select the security mode: insecure (non-secure mode), tls (TLS secure mode, default), tlcp (TLCP secure mode)\n\n2. **Management User (management_user)**:\n   - Enter the KaiwuDB management username (default: kaiwudb)\n\n3. **RESTful Port (rest_port)**:\n   - Enter the KaiwuDB Web service port (default: 8080)\n\n4. **KaiwuDB Service Port (kaiwudb_port)**:\n   - Enter the KaiwuDB service port (default: 26257)\n\n5. **BRPC Port (brpc_port)**:\n   - Enter the KaiwuDB time-series engine communication port (default: 27257)\n\n6. **Data Directory (data_root)**:\n   - Enter the KaiwuDB data storage directory (default: /var/lib/kaiwudb)\n\n7. **CPU Resource Usage (cpu)**:\n   - Enter the proportion of CPU resources occupied by KaiwuDB service (0-1, default: unlimited)\n\n#### Local Node Configuration (local) - Common to All Modes\n\n8. **Local Node IP Address (local_node_ip)**:\n   - Enter the IP address of the local node (used for external services)\n\n#### Cluster Configuration (cluster) - Cluster Mode Only\n\n9. **Other Cluster Node IP Addresses (cluster_node_ips)**:\n   - Enter the IP addresses of other cluster nodes (multiple addresses separated by commas)\n\n10. **SSH Port (ssh_port)**:\n    - Enter the SSH service port of the remote node (default: 22)\n\n11. **SSH Username (ssh_user)**:\n    - Enter the SSH login username for the remote node\n\nBased on your answers, I will automatically generate the corresponding `deploy.cfg` configuration file. The cluster configuration section will be automatically omitted for single-node deployment.\n\n### Step 5: Execute Installation Command\n\nExecute the corresponding installation command based on your selection:\n\n**Single-node deployment**:\n```bash\n./deploy.sh install --single\n```\n\n**Single-replica cluster deployment**:\n```bash\n./deploy.sh install --single-replica\n```\n\n**Multi-replica cluster deployment**:\n```bash\n./deploy.sh install --multi-replica\n```\n\n### Step 6: Confirm Installation Information\n\nAfter checking that the configuration is correct, enter `Y` or `y`. If you need to return to modify the configuration file, enter `N` or `n`.\n\n```shell\n================= KaiwuDB Basic Info =================\nDeploy Mode: bare-metal\nManagement User: kaiwudb\nStart Mode: single\nRESTful Port: 8080\nKaiwuDB Port: 26257\nBRPC Port: 27257\nData Root: /var/lib/kaiwudb\nSecure Mode: tls\nCPU Usage Limit: 1\nLocal Node Address: 192.168.122.221\n=========================================================\nPlease confirm the installation information above(Y/n):\n```\n\n### Step 7: Initialize and Start Cluster - Cluster Mode Only\n\n```bash\n./deploy.sh cluster -i\n# or\n./deploy.sh cluster --init\n```\n\n### Step 8: Check Status\n\n**Check service status**:\n```bash\nsystemctl status kaiwudb\n```\n\n**Check cluster status (cluster mode only)**:\n```bash\n./deploy.sh cluster -s\n# or\n./deploy.sh cluster --status\n# or use the convenience script\nkw-status\n```\n\n### Step 9: Configure Auto-start on Boot (Optional)\n\n```bash\nsystemctl enable kaiwudb\n```\n\n## Status Check Description\n\nField descriptions returned by the `kw-status` command:\n\n| Field | Description |\n|-------|-------------|\n| `id` | Node ID |\n| `address` | Node address |\n| `sql_address` | SQL address |\n| `build` | KaiwuDB version |\n| `started_at` | Start time |\n| `updated_at` | Update time |\n| `is_available`/`is_live` | Node status, both `true` indicates normal |\n\n## Deployment Modes\n\n### Bare-metal Deployment\n\nUse the `KaiwuDB-baremetal-*.tar.gz` installation package for deployment.\n\n### Container Deployment\n\nUse the `KaiwuDB-container-*.tar.gz` installation package for deployment. Ensure Docker is installed and configured.\n\nFile v1.0.0:references/troubleshooting.md\n\n# KaiwuDB Common Issues and Solutions\n\n## Installation Issues\n\n### 1. Environment Check Failure\n\n**Problem**: Script prompts environment check failure\n\n**Solution**:\n- Check if system requirements are met (memory, disk space)\n- Ensure the user running the script has sufficient permissions\n- Check if network connection is normal\n\n### 2. Dependency Installation Failure\n\n**Problem**: Error occurs during dependency installation\n\n**Solution**:\n- Check if system package manager is working normally (yum/apt)\n- Try manually updating package manager:\n  - CentOS: `sudo yum update -y`\n  - Ubuntu: `sudo apt-get update -y`\n- If network is slow, consider using domestic mirror sources\n\n### 3. Installation Package Download Failure\n\n**Problem**: Unable to download KaiwuDB installation package\n\n**Solution**:\n- Check network connection\n- Try manually downloading the installation package and placing it in the scripts/ directory\n- Contact technical support to obtain download link\n\n## Runtime Issues\n\n### 1. Database Cannot Start\n\n**Problem**: No response after executing start command\n\n**Solution**:\n- Check data directory permissions: `ls -ld /var/lib/kwdb`\n- Check log files: `cat /var/log/kwdb/kwdb.log`\n- Check if configuration file is correct\n\n### 2. Unable to Connect to Database\n\n**Problem**: Cannot connect to database using psql command\n\n**Solution**:\n- Check if kwdb process is running: `ps aux | grep kwdb`\n- Check if firewall allows port 5432 access\n- Check if listen_addresses configuration is set to '*'\n- Check if pg_hba.conf file allows connections\n\n### 3. Database Running Slowly\n\n**Problem**: Long query response time\n\n**Solution**:\n- Check system resource usage: `top`\n- Check slow query log: `/var/log/kwdb/slow_query.log`\n- Optimize query statements\n- Adjust configuration file parameters\n\n## Performance Issues\n\n### 1. High Memory Usage\n\n**Problem**: Database process occupies too much memory\n\n**Solution**:\n- Adjust shared_buffers parameter\n- Check for memory leaks\n- Increase system memory\n\n### 2. High Disk I/O\n\n**Problem**: Slow disk write speed\n\n**Solution**:\n- Check if disk space is sufficient\n- Consider using SSD disk\n- Adjust checkpoint-related parameters\n- Optimize queries to reduce disk I/O\n\n## Backup and Recovery\n\n### 1. Backup Database\n\n```bash\n/opt/kwdb/current/bin/pg_dump -h localhost -p 5432 -U $USER -d kwdb_db > backup.sql\n```\n\n### 2. Restore Database\n\n```bash\n/opt/kwdb/current/bin/psql -h localhost -p 5432 -U $USER -d kwdb_db < backup.sql\n```\n\n## Contact Support\n\nIf you encounter issues that cannot be resolved, please contact technical support:\n- Email: support@kaiwudb.com\n- Phone: 400-xxx-xxxx\n\nFile v1.0.0:assets/deploy.cfg\n\n[global]\n# Whether to turn on secure mode\nsecure_mode=tls\n# Management KaiwuDB user\nmanagement_user=kaiwudb\n# KaiwuDB cluster http port\nrest_port=8080\n# KaiwuDB service port\nkaiwudb_port=26257\n# KaiwuDB brpc port\nbrpc_port=27257\n# KaiwuDB data directory\ndata_root=/var/lib/kaiwudb\n# CPU usage[0-1]\ncpu=1\n\n[local]\n# local node configuration\nlocal_node_ip=192.168.122.221","readmeExcerpt":"Skill: KWDB Install Deploy Owner: kwdb Summary: Triggered when the user wants to install or deploy KaiwuDB (kwdb, kaiwudb). Helps users complete script-based deployment of KaiwuDB clusters, including configuration file modification, installation command execution, cluster initialization, and status checks. Tags: kwdb:1.2.1, latest:1.2.1, ready:1.2.1 Version history: v1.2.1 | 2026-08-28T00:47:14.321Z | auto kwdb-insta","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"# After installation failure, first read the logs\nls -la log/\ncat log/install.log  # or the latest generated log file"},{"language":"bash","snippet":"# Check if the installation package exists\nif [ ! -f \"$INSTALL_PACKAGE_PATH\" ]; then\n    echo \"Error: Installation package does not exist, please check if the path is correct\"\n    exit 1\nfi\n\n# Check filename format\nif [[ \"$(basename $INSTALL_PACKAGE_PATH)\" != KaiwuDB*.tar.gz ]]; then\n    echo \"Error: Installation package filename is incorrect. It should be a tar.gz file with KaiwuDB as the prefix\"\n    exit 1\nfi"},{"language":"bash","snippet":"# Create installation directory\nsudo mkdir -p /opt/kaiwudb\n\n# Extract installation package\ntar -xzf \"$INSTALL_PACKAGE_PATH\" -C /opt/kaiwudb\n\n# Enter installation directory\ncd /opt/kaiwudb/kaiwudb_install"},{"language":"bash","snippet":"./deploy.sh install --single"},{"language":"bash","snippet":"./deploy.sh install --single-replica"},{"language":"bash","snippet":"./deploy.sh install --multi-replica"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: kwdb-install-deploy\ndescription: Triggered when the user wants to install or deploy KaiwuDB (kwdb, kaiwudb). Helps users complete script-based deployment of KaiwuDB clusters, including configuration file modification, installation command execution, cluster initialization, and status checks.\n---\n\n# KWDB Install\n\n## Overview\n\nThis skill provides script-based deployment for KaiwuDB, suitable for bare-metal or container deployment in Linux environments. Supports single-replica and multi-replica cluster deployments with complete deployment workflow guidance.\n\n## Mandatory Rules\n\n**The following three rules must be strictly followed:**\n\n### 1. Prohibit Guessing Installation Parameters\n\n**Do not guess or assume any installation parameters and proceed with installation unless explicitly specified by the user.**\n\n- All configuration parameters (ports, IPs, data directories, security modes, etc.) must be confirmed with the user one by one\n- Even if the user says \"use defaults\", the default values must be explicitly listed and confirmed with the user\n- The installation package path must be explicitly provided by the user and must not be guessed\n\n### 2. Must Read Logs on Installation Failure\n\n**When the installation command fails, you must read the log files in the `log/` directory under the same path as the installation script to obtain detailed failure information.**\n\nLog file path: `/opt/kaiwudb/<package-name>/log/` or `kaiwudb_install/log/`\n\n```bash\n# After installation failure, first read the logs\nls -la log/\ncat log/install.log  # or the latest generated log file\n```\n\n### 3. Exit After Reporting Failure, Prohibit Arbitrary Retries\n\n**After installation failure, you must:**\n1. Clearly display the error information obtained from the logs to the user\n2. Explain possible causes\n3. Exit the installation process, **do not retry on your own**\n4. Wait for user instructions before deciding on the next step\n\n**Exception**: Only when the user explicitly requests \"retry\", you may execute the installation command again.\n\n## Prerequisites\n\n### System Requirements\n\n- **Hardware**:\n  - Memory: At least 8 GB RAM (16 GB recommended)\n  - CPU: At least 2 cores (4 cores recommended)\n  - Disk: At least 50 GB available space (SSD recommended)\n- **Operating System**:\n  - CentOS 7/8\n  - Ubuntu 18.04/20.04/22.04\n- **Network**: All nodes must have network connectivity\n\n### User Permissions\n\n- SSH passwordless login configured between nodes\n- User must be `root` or have `sudo` privileges\n- For container deployment, non-root users must be in the `docker` group\n\n## Deployment Steps\n\n### Step 1: Confirm Deployment Mode\n\nFirst, I need to confirm the deployment mode you need:\n\n**Ask**:\n\"Please select the deployment mode: single-node deployment (single) or cluster deployment (cluster)?\"\n\n### Step 1.1: Confirm Cluster Replica Count - Cluster Mode Only\n\nIf cluster deployment is selected, I need to further confirm the number of replicas:\n\n**Ask**:\n\"Please select the cluster dep"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7fr8q8f22jd6gzb6f7prf9g183z64v\",\n  \"slug\": \"kwdb-install-deploy\",\n  \"version\": \"1.2.1\",\n  \"publishedAt\": 1787878034321\n}"},{"path":"references/installation_guide.md","content":"# KaiwuDB Script Deployment Guide\n\n## Prerequisites\n\n### System Requirements\n\n- Hardware, operating system, and software dependencies of all nodes to be deployed must meet the installation and deployment requirements.\n- **Network Settings**:\n  - Network connectivity between all nodes.\n  - Nodes are located within the same data center.\n  - Network latency between physical machines is no higher than 50 ms.\n  - Clock difference between nodes is no greater than 500 ms.\n  - Required ports for KaiwuDB service have been reserved on each node.\n- KaiwuDB bare-metal or container installation package for the corresponding system version has been obtained.\n\n### User Permissions\n\n- SSH passwordless login is configured between the current node and other nodes in the cluster.\n- The installation user is the `root` user or a regular user with `sudo` privileges.\n- When deploying with the container installation package, if the installation user is a non-`root` user, add the user to the `docker` group by running `sudo usermod -aG docker $USER`.\n\n## Deployment Steps\n\n### Step 1: Confirm Deployment Mode\n\nFirst, confirm the deployment mode:\n\n**Ask**:\n\"Please select the deployment mode: single-node deployment (single) or cluster deployment (cluster)?\"\n\n### Step 1.1: Confirm Cluster Replica Count - Cluster Mode Only\n\nIf cluster deployment is selected, further confirm the number of replicas:\n\n**Ask**:\n\"Please select the cluster deployment type: single-replica cluster (single-replica) or multi-replica cluster (multi-replica)?\"\n\n### Step 2: Confirm Installation Package Location\n\nProvide the full path of the installation package, including the filename, for example:\n```\n/path/to/KaiwuDB-1.0.0.tar.gz\n```\n\n### Step 3: Extract Installation Package\n\n```bash\n# Create installation directory\nsudo mkdir -p /opt/kaiwudb\n\n# Extract installation package\ntar -xzf \"$INSTALL_PACKAGE_PATH\" -C /opt/kaiwudb\n\n# Enter installation directory\ncd /opt/kaiwudb/$(basename \"$INSTALL_PACKAGE_PATH\" .tar.gz)\n```\n\n### Step 4: Configure deploy.cfg File\n\nI will ask you about each configuration item step by step according to the deployment mode you selected, and then modify the `deploy.cfg` configuration file based on your answers.\n\n#### Global Configuration (global) - Common to All Modes\n\n1. **Security Mode (secure_mode)**:\n   - Select the security mode: insecure (non-secure mode), tls (TLS secure mode, default), tlcp (TLCP secure mode)\n\n2. **Management User (management_user)**:\n   - Enter the KaiwuDB management username (default: kaiwudb)\n\n3. **RESTful Port (rest_port)**:\n   - Enter the KaiwuDB Web service port (default: 8080)\n\n4. **KaiwuDB Service Port (kaiwudb_port)**:\n   - Enter the KaiwuDB service port (default: 26257)\n\n5. **BRPC Port (brpc_port)**:\n   - Enter the KaiwuDB time-series engine communication port (default: 27257)\n\n6. **Data Directory (data_root)**:\n   - Enter the KaiwuDB data storage directory (default: /var/lib/kaiwudb)\n\n7. **CPU Resource Usage (cpu)**:\n   - Enter the proportion of CPU "},{"path":"references/troubleshooting.md","content":"# KaiwuDB Common Issues and Solutions\n\n## Installation Issues\n\n### 1. Environment Check Failure\n\n**Problem**: Script prompts environment check failure\n\n**Solution**:\n- Check if system requirements are met (memory, disk space)\n- Ensure the user running the script has sufficient permissions\n- Check if network connection is normal\n\n### 2. Dependency Installation Failure\n\n**Problem**: Error occurs during dependency installation\n\n**Solution**:\n- Check if system package manager is working normally (yum/apt)\n- Try manually updating package manager:\n  - CentOS: `sudo yum update -y`\n  - Ubuntu: `sudo apt-get update -y`\n- If network is slow, consider using domestic mirror sources\n\n### 3. Installation Package Download Failure\n\n**Problem**: Unable to download KaiwuDB installation package\n\n**Solution**:\n- Check network connection\n- Try manually downloading the installation package and placing it in the scripts/ directory\n- Contact technical support to obtain download link\n\n## Runtime Issues\n\n### 1. Database Cannot Start\n\n**Problem**: No response after executing start command\n\n**Solution**:\n- Check data directory permissions: `ls -ld /var/lib/kwdb`\n- Check log files: `cat /var/log/kwdb/kwdb.log`\n- Check if configuration file is correct\n\n### 2. Unable to Connect to Database\n\n**Problem**: Cannot connect to database using psql command\n\n**Solution**:\n- Check if kwdb process is running: `ps aux | grep kwdb`\n- Check if firewall allows port 5432 access\n- Check if listen_addresses configuration is set to '*'\n- Check if pg_hba.conf file allows connections\n\n### 3. Database Running Slowly\n\n**Problem**: Long query response time\n\n**Solution**:\n- Check system resource usage: `top`\n- Check slow query log: `/var/log/kwdb/slow_query.log`\n- Optimize query statements\n- Adjust configuration file parameters\n\n## Performance Issues\n\n### 1. High Memory Usage\n\n**Problem**: Database process occupies too much memory\n\n**Solution**:\n- Adjust shared_buffers parameter\n- Check for memory leaks\n- Increase system memory\n\n### 2. High Disk I/O\n\n**Problem**: Slow disk write speed\n\n**Solution**:\n- Check if disk space is sufficient\n- Consider using SSD disk\n- Adjust checkpoint-related parameters\n- Optimize queries to reduce disk I/O\n\n## Backup and Recovery\n\n### 1. Backup Database\n\n```bash\n/opt/kwdb/current/bin/pg_dump -h localhost -p 5432 -U $USER -d kwdb_db > backup.sql\n```\n\n### 2. Restore Database\n\n```bash\n/opt/kwdb/current/bin/psql -h localhost -p 5432 -U $USER -d kwdb_db < backup.sql\n```\n\n## Contact Support\n\nIf you encounter issues that cannot be resolved, please contact technical support:\n- Email: support@kaiwudb.com\n- Phone: 400-xxx-xxxx"},{"path":"skill-card.md","content":"## Description:\n\nTriggered when the user wants to install or deploy KaiwuDB (kwdb, kaiwudb). Helps users complete script-based deployment of KaiwuDB clusters, including configuration file modification, installation command execution, cluster initialization, and status checks.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[kwdb](https://clawhub.ai/user/kwdb)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and database operators use this skill to prepare, configure, install, initialize, and check KaiwuDB deployments on Linux hosts or clusters.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: A user-supplied KaiwuDB archive may execute installer code with administrative access.\n\nMitigation: Verify the archive with an official signature or checksum and inspect or stage extracted files before allowing the agent to run installation commands.\n\nRisk: The deployment workflow can use sudo, docker group access, passwordless SSH, and service auto-start across cluster nodes.\n\nMitigation: Use a dedicated least-privilege deployment account where possible, confirm each node and setting with the operator, and require approval before install, cluster initialization, or auto-start commands.\n\n## Reference(s):\n\n- [KaiwuDB Script Deployment Guide](references/installation_guide.md)\n- [KaiwuDB Common Issues and Solutions](references/troubleshooting.md)\n- [KWDB Install Deploy on ClawHub](https://clawhub.ai/kwdb/skills/kwdb-install-deploy)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown with inline shell commands and configuration guidance]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Requires user confirmation of installation package path, deployment mode, node addresses, ports, security mode, and other deployment settings before execution.]\n\n## Skill Version(s):\n\n1.2.1 (source: server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1961,"uniquenessScore":39,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T03:12:51.905Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T03:12:51.905Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-11T05:29:29.555Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}