Merge pull request #24 from Toms1999/main

[fix] Update Consul部署说明.md
pull/27/head
StarsL.cn 2022-07-07 12:26:01 +08:00 committed by GitHub
commit eafe7439f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -5,17 +5,17 @@
yum install -y yum-utils yum install -y yum-utils
yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
yum -y install consul yum -y install consul
# 或者直接下RPM包安装 # 或者直接下RPM包安装(推荐)
wget https://rpm.releases.hashicorp.com/RHEL/7/x86_64/stable/consul-1.12.2-1.x86_64.rpm wget https://rpm.releases.hashicorp.com/RHEL/7/x86_64/stable/consul-1.12.2-1.x86_64.rpm
rpm -ivh ./consul-1.12.2-1.x86_64.rpm rpm -ivh ./consul-1.12.2-1.x86_64.rpm
``` ```
##### 配置 ##### 配置
```bash ```bash
vi /etc/consul.d/consul.hcl vi /etc/consul.d/consul.hcl
log_level = "ERROR" #日志级别日志太多可以只打印error日志不需要可以去掉这行。 log_level = "ERROR" #日志级别日志太多可以只打印error日志不需要可以去掉这行。
advertise_addr = "192.168.x.x" #可以先不加这行,如果启动有问题再加上,一般有多网卡需要配置这行,填写你的网卡IP。 advertise_addr = "192.168.x.x" #填写你的网卡IP。
data_dir = "/opt/consul" data_dir = "/opt/consul"
client_addr = "0.0.0.0" client_addr = "0.0.0.0"
ui_config{ ui_config{