ElasticSerach单机安装
192.168.14.10 root elk
/home/elk/soft
[[email protected] elasticserach]# tar -zxvf elasticsearch-6.3.1.tar.gz
[[email protected] elasticserach]# cd elasticsearch-6.3.1/bin
[[email protected] bin]# ./elasticsearch
[[email protected] bin]# su elk1
[[email protected] bin]$ ./elasticsearch
[[email protected] bin]# chown -R elk1:elk1 /home/elk1/elasticsearch
[[email protected] bin]$ ./elasticsearch
[[email protected] config]$ vi jvm.options
[[email protected] bin]$ ./elasticsearch
[[email protected] jdk1.8.0_171]# curl 127.0.0.1:9200
#后台启动
[[email protected] bin]$ ./elasticsearch -d
#关闭程序
[[email protected] bin]$ ps -ef|grep elastic
[[email protected] bin]$ kill 10097
#设置浏览器访问
[[email protected] bin]systemctl stop firewalld
[[email protected] bin]vi config/elasticsearch.yml
安装问题:
- [2]解决方案
[[email protected] bin]# vi /etc/security/limits.conf
nofile - 打开文件的最大数目
noproc - 进程的最大数目
soft 指的是当前系统生效的设置值
hard 表明系统中所能设定的最大值
* hard nofile 65536
* soft nofile 131072
* hard nproc 4096
* soft nproc 2048
- 解决方案
[[email protected] bin]# vi /etc/sysctl.conf
[[email protected] bin]# sysctl -p
vm.max_map_count=655360
fs.file-max=655360
vm.max_map_count=65530,因此缺省配置下,单个jvm能开启的最大线程数为其一半
file-max是设置 系统所有进程一共可以打开的文件数量
# 测试
Liunx执行: curl 'http://localhost:9200/?pretty'
浏览器访问:http://localhost:9200/?pretty
# 状态查看命令
语法:ip:post/_cat/[args](?v|?format=json&pretty)
(?v表示显示字段说明,?format=json&pretty表示显示成json格式)
- 查看所有索引
GET _cat/indices?v
- 查看es集群状态
GET _cat/health?v