From e5e9f0a582ebadca5b7d12084e976f6a4e17ef23 Mon Sep 17 00:00:00 2001 From: "StarsL.cn" Date: Thu, 31 Aug 2023 14:56:44 +0800 Subject: [PATCH] =?UTF-8?q?Update=20Consul=E9=83=A8=E7=BD=B2=E8=AF=B4?= =?UTF-8?q?=E6=98=8E.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Consul部署说明.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/Consul部署说明.md b/docs/Consul部署说明.md index 7a01487..9a08b9c 100644 --- a/docs/Consul部署说明.md +++ b/docs/Consul部署说明.md @@ -1,4 +1,4 @@ -#### 安装 +### 安装 > 以下为CentOS7安装说明,其它系统安装部分请参考官网: > https://developer.hashicorp.com/consul/downloads ```bash @@ -11,12 +11,12 @@ wget https://rpm.releases.hashicorp.com/RHEL/7/x86_64/stable/consul-1.16.0-1.x86 rpm -ivh ./consul-1.16.0-1.x86_64.rpm ``` -#### 配置 +### 配置 - **执行以下命令获取UUID,填写到下面配置末尾部分,作为最高权限的token** ```bash uuidgen ``` -> 清空`/etc/consul.d/consul.hcl`,并使用以下完整配置内容 +- **清空`/etc/consul.d/consul.hcl`,并使用以下完整配置内容** ```bash data_dir = "/opt/consul" log_level = "error" @@ -54,7 +54,7 @@ acl = { } ``` -#### 启动服务 +### 启动服务 ```bash mkdir /opt/consul @@ -68,6 +68,8 @@ systemctl restart consul.service - 浏览器访问Consul的8500端口 - 使用生成的UUID登录 +--- + ### consul kv 备份还原 ``` consul kv export --http-addr=http://127.0.0.1:8500 -token=xxxxxxxx '' > consul_kv_bak.json