0
点赞
收藏
分享

微信扫一扫

零基础学Python(2)— 安装Python开发工具之PyCharm

米小格儿 2024-01-20 阅读 9
consulcentos

一、下载安装

参考官网文档

Install | Consul | HashiCorp Developer

进入Centos 执行下面命令

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
sudo yum -y install consul

这种方法安装完成后,会交给Systemctl 管理

使用命令查询软件安装位置

whereis consul

二、启动Consul

启动consul

systemctl start consul

查看consul状态,发现启动是成功了,但是从日志上来看,是有错误发生的

systemctl status consul  

另外UI地址 http://192.168.31.110:8500/ui/dc1/services  也访问不了,经过我的一番探索,明白启动之前需要配置相关启动参数才行

三、配置启动参数

查看 /etc/consul.d/ 目录

ls /etc/consul.d/

 consul.hcl 文件就是consul的配置文件

vim /etc/consul.d/consul.hcl

按照如下图这样配置即可

四、查看服务内存占用情况

上篇文章我们看了Nacos启动啥也不干,占用了700M的内存,现在我们看看consul,仅启动会暂用多少内存

启动consul前内存占用 189M

启动consul后内存占用222M

总共占用内存为 222M - 189M = 33M

总结: 这一对比,内存占用差别真的差太远了,consul完胜!!!

举报

相关推荐

0 条评论