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