es-head-kinba

ElasticSearch6 安装部署

1、https://www.jianshu.com/p/72eb42c05dc4

2、配置文件修改
elasticsearch.yml
1)network.host: 0.0.0.0
访问 http://192.168.222.153:9200/

=========================================================================================================================================
3、安装head插件
Head是elasticsearch的集群管理工具,可以用于数据的浏览和查询

(1)elasticsearch-head是一款开源软件,被托管在github上面,所以如果我们要使用它,必须先安装git,通过git获取elasticsearch-head

(2)运行elasticsearch-head会用到grunt,而grunt需要npm包管理器,所以nodejs是必须要安装的

(3)elasticsearch5.0之后,elasticsearch-head不做为插件放在其plugins目录下了。

1)安装nodejs
https://blog.csdn.net/qq_38591756/article/details/82830121

遇到认证的问题如下操作
npm config set strict-ssl false


2)安装Head插件
cd /usr/local/
git clone git://github.com/mobz/elasticsearch-head.git
 
安装elasticsearch-head依赖包
[root@localhost local]# npm install -g grunt-cli
[root@localhost _site]# cd /usr/local/elasticsearch-head/
[root@localhost elasticsearch-head]# cnpm install

修改Gruntfile.js
[root@localhost elasticsearch-head]# vi Gruntfile.js
在connect-->server-->options下面添加:hostname:’*’,允许所有IP可以访问

修改elasticsearch-head默认连接地址
[root@localhost elasticsearch-head]# cd /usr/local/elasticsearch-head/_site/
[root@localhost _site]# vi app.js
将this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://localhost:9200";中的localhost修改成你es的服务器地址

配置elasticsearch允许跨域访问
打开elasticsearch的配置文件elasticsearch.yml,在文件末尾追加下面两行代码即可:
http.cors.enabled: true
http.cors.allow-origin: "*"

打开9100端口
[root@localhost elasticsearch-head]# firewall-cmd --zone=public --add-port=9100/tcp --permanent
重启防火墙
[root@localhost elasticsearch-head]# firewall-cmd --reload

启动elasticsearch

启动elasticsearch-head
[root@localhost _site]# cd /usr/local/elasticsearch-head/
[root@localhost elasticsearch-head]# node_modules/grunt/bin/grunt server

(11)访问elasticsearch-head
关闭防火墙:systemctl stop firewalld.service

浏览器输入网址:http://192.168.222.153:9100/


=========================================================================================================================================
### 1.8安装Kibana
Kibana是一个针对Elasticsearch的开源分析及可视化平台,使用Kibana可以查询、查看并与存储在ES索引的数据进行交互操作,使用Kibana能执行高级的数据分析,并能以图表、表格和地图的形式查看数据

(1)下载Kibana
https://www.elastic.co/cn/downloads/past-releases/kibana-6-2-4

(2)把下载好的压缩包拷贝到/soft目录下

(3)解压缩,并把解压后的目录移动到/user/local/kibana

(4)编辑kibana配置文件
[root@localhost /]# vi /usr/local/kibana/config/kibana.yml
将server.host,elasticsearch.url修改成所在服务器的ip地址

(5)开启5601端口
Kibana的默认端口是5601
开启防火墙:systemctl start firewalld.service
开启5601端口:firewall-cmd --permanent --zone=public --add-port=5601/tcp
重启防火墙:firewall-cmd –reload

(6)启动Kibana
[root@localhost /]# /usr/local/kibana/bin/kibana

浏览器访问:http://192.168.222.153:5601

  

猜你喜欢

转载自www.cnblogs.com/bill2014/p/12332503.html