ELK Stack 安装

最近准备上 ELK Stack,留作记录

1. 安装 Elasticsearch

1. 创建用户

es 不能直接用 root 用户启,不如直接创个专门的用户

useradd elsearch
su - elsearch

2. 下载 es

推荐国内镜像网站
https://mirrors.huaweicloud.com/elasticsearch/

wget https://mirrors.huaweicloud.com/elasticsearch/7.5.0/elasticsearch-7.5.0-linux-x86_64.tar.gz

3. 解压配置

解压

tar -zxvf elasticsearch-7.5.0-linux-x86_64.tar.gz

修改配置文件,位置在 config/elasticsearch.yml

node.name: node-1
network.host: 0.0.0.0
cluster.initial_master_nodes: ["node-1"]

http.cors.enabled: true
http.cors.allow-origin: /.*/

如果是云服务器,打开对应的安全组端口 9200

4. 启动 es

这儿必须用非 root 用户启动

bin/elasticsearch

启动成功测试

 curl localhost:9200
 # 如果是云服务器则 公网IP:9200

当返回结果为如下结果,代表安装成功

{
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值