linux上安装elasticsearch-6.6.2

1.在linux上安装jdk8

2.在官网(https://www.elastic.co/downloads/elasticsearch)上下载最新elasticsearch版本,目前的版本是6.6.2,下载地址为:https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.2.tar.gz

3.进入/usr/local/src路径:

  • wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.2.tar.gz
  • tar -zxvf elasticsearch-6.6.2.tar.gz
  • mv elasticsearch-6.6.2.tar.gz /usr/local

4.创建非root用户启动elasticsearch,因为elasticsearch不允许以root用户启动

  • groupadd esgroup
  • useradd esuser -g esgroup -p flzx3QC
  • chown -R esuser:esgroup /usr/local/elasticsearch-6.6.2

5.切换到esuser目录下,并更改es的配置文件

  • su esuser
  • vim conf/elasticsearch.yml   
#放开外网访问
network.host: 192.168.0.116
#端口号
http.port:9200
#java.lang.UnsupportedOperationException: seccomp unavailable: CONFIG_SECCOMP not compiled into kernel, CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER are needed 解决这个异常
bootstrap.system_call_filter: false

6.启动es,解决如下报错方式

  • ./bin/elasticsearch  启动会出现如下三个错误:
ERROR: [3] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max number of threads [1024] for user [esuser] is too low, increase to at least [4096]
[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

解决方法:

  问题1: vim /etc/security/limits.conf  文件后面加入:

esuser soft nofile 65536
esuser hard nofile 65536
esuser soft nproc 4096
esuser hard nproc 6096

  问题2:vim /etc/security/limits.d/20-nproc.conf修改 esuser soft nproc 4096

  问题3:vim  /etc/sysctl.conf  追加:vm.max_map_count=655360

  执行下面命令生效:sysctl -p

关闭防火墙:service iptables stop;

如问题还没解决,需要重启linux服务器

7.后台进程启动es:  ./bin/elasticsearch -d

 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

安装Kibana

Kibana是一个针对Elasticsearch的开源分析及可视化平台,使用Kibana可以查询、查看并与存储在ES索引的数据进行交互操作,使用Kibana能执行高级的数据分析,并能以图表、表格和地图的形式查看数据.

1)下载Kibana,注意其版本要和elasticsearch的版本保持一致

https://www.elastic.co/downloads/kibana

2)把下载好的压缩包拷贝到/soft目录下

3)解压缩,并把解压后的目录移动到/user/local/kibana

4)编辑kibana配置文件

vi /usr/local/kibana/config/kibana.yml

将server.host,elasticsearch.url修改成所在服务器的ip地址

5)开启5601端口

Kibana的默认端口是5601

开启防火墙:systemctl start firewalld.service

开启5601端口:firewall-cmd --permanent --zone=public --add-port=5601/tcp

重启防火墙:firewall-cmd –reload

6)启动Kibana

[root@localhost /]# /usr/local/kibana/bin/kibana

浏览器访问:http://192.168.0.116:5601

 

转载于:https://www.cnblogs.com/lizongti/p/10557177.html

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值