目录
1.配置ElasticSearch5.x版本
1.1.修改配置文件elasticsearch.yml
1.2.修改系统参数limits.conf
2.安装head插件
2.1.git下载软件包
2.2.node安装
2.3.安装grunt
2.4.修改Elasticsearch配置文件
2.5.修改Gruntfile.js
2.6.修改app.js
2.7.运行head
2.8.后台启动elasticsearch-head
3.x-pack安全模块(security机制)
3.1.修改Elasticsearch配置文件
3.2.页面访问
4.参考资料:
请参考《linux下安装ElasticSearch2.4.4》
大体步骤同上,这里只说下配置:
cat /usr/local/elasticsearch/config/elasticsearch.yml
path.data: /data/elasticsearch/data
path.logs: /data/elasticsearch/logs
network.host: 0.0.0.0
http.cors.enabled: true
http.cors.allow-origin: "*"
同样需要注意,参数前加空格
cat /etc/security/limits.conf
* soft nproc 65536
* hard nproc 65536
* soft nofile 65536
* hard nofile 65536
cat /etc/sysctl.conf
vm.max_map_count= 262144
修改完后执行命令sysctl -p
至此5.0.2版本配置完成,正常用非root帐户启动即可
yum -y install git
git clone git://github.com/mobz/elasticsearch-head.git
备注:安装包不要放到elasticsearch/plugins目录下
请参考《node.js安装》
http://www.cnblogs.com/shhnwangjian/p/6559732.html
npm install -g grunt-cli
/etc/elasticsearch/elasticsearch.yml
1 2 |
http.cors.enabled: true http.cors.allow-origin: "*" |
elasticsearch-head/Gruntfile.js
connect: {
server: {
options: {
hostname: '0.0.0.0',
port: 9100,
base: '.',
keepalive: true
}
}
}
增加hostname属性,设置为0.0.0.0
elasticsearch-head/_site/app.js
this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://10.10.83.163:9200";
把localhost修改成ES的服务器地址,如上面10.10.83.163
进入elasticsearch-head 目录
npm install
启动
grunt server
页面访问:http://10.10.83.163:9100
nohup grunt server &
如果想关闭head插件,查找进程命令:
ps aux|grep head
/etc/elasticsearch/elasticsearch.yml
http.cors.allow-headers: Authorization
http://10.10.83.163:9100/?auth_user=elastic&auth_password=changeme
分类: ELK
Elasticsearch5.5 部署Head插件
http://www.cnblogs.com/shhnwangjian/p/7155132.html
node.js的安装
http://www.cnblogs.com/shhnwangjian/p/6559732.html