elastic安装和使用

2.4、ElasticSerach单机安装
192.168.14.10 root elk
/home/elk/soft

[root@localhost elasticserach]# tar -zxvf elasticsearch-6.3.1.tar.gz

[root@localhost elasticserach]# cd elasticsearch-6.3.1/bin

[root@localhost bin]# ./elasticsearch
在这里插入图片描述

[root@localhost bin]# su elk1
[elk1@localhost bin]$ ./elasticsearch
在这里插入图片描述

[root@localhost bin]# chown -R elk1:elk1 /home/elk1/elasticsearch

[elk1@localhost bin]$ ./elasticsearch

[elk1@localhost config]$ vi jvm.options
在这里插入图片描述

[elk1@localhost bin]$ ./elasticsearch
在这里插入图片描述

[root@localhost jdk1.8.0_171]# curl 127.0.0.1:9200
在这里插入图片描述

#后台启动
[elk1@localhost bin]$ ./elasticsearch -d

#关闭程序
[elk1@localhost bin]$ ps -ef|grep elastic
在这里插入图片描述

[elk1@localhost bin]$ kill 10097
在这里插入图片描述

#设置浏览器访问
[root@localhost bin]systemctl stop firewalld
[root@localhost bin]vi config/elasticsearch.yml
在这里插入图片描述

安装问题:
在这里插入图片描述

[1][2]解决方案
[root@localhost bin]# vi /etc/security/limits.conf
在这里插入图片描述

nofile - 打开文件的最大数目
noproc - 进程的最大数目
soft 指的是当前系统生效的设置值
hard 表明系统中所能设定的最大值

  • hard nofile 655360
  • soft nofile 131072
  • hard nproc 4096
  • soft nproc 2048

[3]解决方案
[root@localhost bin]# vi /etc/sysctl.conf
[root@localhost bin]# sysctl -p
vm.max_map_count=655360
fs.file-max=655360
在这里插入图片描述

vm.max_map_count=655360,因此缺省配置下,单个jvm能开启的最大线程数为其一半
file-max是设置 系统所有进程一共可以打开的文件数量

测试

Liunx执行: curl ‘http://localhost:9200/?pretty’
浏览器访问:http://localhost:9200/?pretty
如果虚拟机运行之后无法访问,可以关闭防火墙

状态查看命令

语法:ip:post/_cat/args
(?v表示显示字段说明,?format=json&pretty表示显示成json格式)
1、查看所有索引
GET _cat/indices?v
2、查看es集群状态
GET _cat/health?v

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值