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
安装问题:
- [2]解决方案
[root@localhost bin]# vi /etc/security/limits.conf
nofile - 打开文件的最大数目
noproc - 进程的最大数目
soft 指的是当前系统生效的设置值
hard 表明系统中所能设定的最大值
* hard nofile 65536
* soft nofile 131072
* hard nproc 4096
* soft nproc 2048
- 解决方案
[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=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