ES 6.7.2 集群搭建记录

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.7.2.tar.gz
tar -xvf elasticsearch-6.7.2.tar.gz

cat /etc/hosts
192.168.100.77    NJ100077 node-10077
192.168.100.78    NJ100078 node-10078
192.168.100.79    NJ100079 node-10079

# cat /data/elasticsearch-6.7.2/config/elasticsearch.yml |grep -v "^#"
cluster.name: flink-es
node.name: node-10078
network.host: 0.0.0.0
discovery.zen.ping.unicast.hosts: ["node-10077", "node-10078","node-10079"]
discovery.zen.minimum_master_nodes: 2

#----登陆验证
xpack.security.enabled: true
http.cors.enabled: true
http.cors.allow-origin: '*'
http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type

添加登陆验证 
启用trial license
curl -H "Content-Type:application/json"  -XPOST  http://192.168.100.78:9200/_xpack/license/start_trial?acknowledge=true

设置密码
./bin/elasticsearch-setup-passwords interactive

修改密码
curl -H "Content-Type:application/json" -XPOST -u elastic 'http://192.168.100.78:9200/_xpack/security/user/elastic/_password' -d '{ "password" : "123456" }'

elasticsearch.yml中开启安全验证配置
xpack.security.enabled: true

head插件访问
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type

======
遇到的问题处理:
1,es需用普通用户启动
2,报错    [1]: max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536]
解 #vim /etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536    
3,[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解 #vim /etc/sysctl.conf
vm.max_map_count=655360
#sysctl -p
 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值