ES安装、注意点(Elasticsearch 7.3.2)

ES安装、注意点(Elasticsearch 7.3.2)

时间:2019年10月22日
系统:CentOS 7.2

JDK安装

1.8

下载安装包

网页地址:https://www.elastic.co/cn/downloads/elasticsearch
下载地址:https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.3.2-linux-x86_64.tar.gz

cd /usr/local/es

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.3.2-linux-x86_64.tar.gz

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

TIPS:

  1. 官方地址下载比较慢
使用elastic用户管理
#创建用户
useradd elsearch
#目录授权
chown -R elsearch:elsearch /usr/local/es
#切换用户
su elsearch
配置
cd /usr/local/es/elasticsearch-7.3.2
vim config/elasticsearch.yml
#支持远程访问
network.host: 192.168.1.92

#配置需要发现的初始节点列表
discovery.seed_hosts: ["192.168.1.92"]

#设置节点名称
node.name: master

#设置主节点列表
cluster.initial_master_nodes: ["master"]
启动和停止
cd /usr/local/es/elasticsearch-7.3.2
#启动
./bin/elasticsearch
#守护进程启动
./bin/elasticsearch -d

#其他启动方式【未验证】
./bin/elasticsearch -Xms512m -Xmx512m
#停止集群【未验证】
curl -X POST http://主机IP:9200/_cluster/nodes/节点标识符(如es-node1)/_shutdown
#检查服务是否启动
curl http://127.0.0.1:9200
curl http://192.168.1.92:9200

{
  "name" : "da3f6f7a9b00",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "o_KisXPYS26kfhcLhaPldg",
  "version" : {
    "number" : "7.3.2",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "1c1faf1",
    "build_date" : "2019-09-06T14:40:30.409026Z",
    "build_snapshot" : false,
    "lucene_version" : "8.1.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}
注意点
  1. 系统条件不满足
ERROR: [1] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
#切换到root用户修改配置sysctl.conf
vim /etc/sysctl.conf

#添加配置
vm.max_map_count=262144

#应用
sysctl -p
  1. 添加配置network.host: 192.168.1.92后启动报错
ERROR: [1] bootstrap checks failed
[1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers,cluster.initial_master_nodes] must be configured
【分析】:需要至少配置一项[discovery.seed_hosts, discovery.seed_providers,cluster.initial_master_nodes]

【解决方案】添加配置:discovery.seed_hosts: ["192.168.1.92"]
  1. 待续
HEAD插件安装

见同目录文档:ES-HEAD插件安装.md

IK分词器安装

见同目录文档:ES-IK中文分词器安装.md

Kibana安装

见同目录文档:ES-Kibana安装.md

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值