less /var/log/elasticsearch/test.log #查看日志
......
[2018-08-21 16:45:52,015][WARN ][bootstrap ] These can be adjusted by modifying /etc/security/limits.conf, for example:
# allow user 'elasticsearch' mlockall
elasticsearch soft memlock unlimited
elasticsearch hard memlock unlimited
......
vim /etc/security/limits.conf #末尾添加 不限制内存
elasticsearch soft memlock unlimited
elasticsearch hard memlock unlimited
systemctl restart elasticsearch.service #重启服务 8.文件数量限制 :
ulimit -a #查看文件限制数量
......
open files (-n) 1024
......
vim /etc/security/limits.conf #末尾添加
* soft nofile 65535
* hard nofile 65535
#重启服务器生效 测试访问 http://192.168.100.129:9200
[root@localhost ~]# /usr/share/elasticsearch/bin/plugin install mobz/elasticsearch-head #安装 head 插件
-> Installing mobz/elasticsearch-head...
Trying https://github.com/mobz/elasticsearch-head/archive/master.zip ...
Downloading ....................DONE
Verifying https://github.com/mobz/elasticsearch-head/archive/master.zip checksums if available ...
NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify)
Installed head into /usr/share/elasticsearch/plugins/head
2.插件安装位置 :
[root@localhost ~]# ls /usr/share/elasticsearch/plugins/ #插件安装位置 不需要直接删除即可
head 3.测试访问 http://192.168.100.129:9200/_plugin/head/
搭建 ElasticSearch 群集
1.在 ES 节点1服务器修改配置文件 :
vim /etc/elasticsearch/elasticsearch.yml
69行 自动发现机制
discovery.zen.ping.unicast.hosts: ["127.0.0.1", "192.168.100.130"] 2.安装步骤同上,配置 ES 节点2服务器 :
tar zxvf kibana-4.3.1-linux-x64.tar.gz -C /usr/local/
cd /usr/local/
mv kibana-4.3.1-linux-x64/ kibana #重命名
vim /usr/local/kibana/config/kibana.yml
//2行
server.port: 5601
//5行
server.host: "0.0.0.0"
//12行 ES地址
elasticsearch.url: "http://192.168.175.132:9200" #从 ES 中拿数据
//20行
kibana.index: ".kibana" 3.启动监控 :
[root@localhost local]# /usr/local/kibana/bin/kibana
log [20:17:53.006] [info][status][plugin:kibana] Status changed from uninitialized to green - Ready
log [20:17:53.028] [info][status][plugin:elasticsearch] Status changed from uninitialized to yellow - Waiting for Elasticsearch
...... 4.访问 http://192.168.100.129:5601