1、ES5.4.0安装包下载地址
https://www.elastic.co/downloads/past-releases/elasticsearch-5-4-02、Centos6.7 Elasticsearch5.4.0安装
步骤1:解压
-rw-r–r–. 1 root root 33302352 Jun 8 01:28 elasticsearch-5.4.0.tar.gz
tar -zxvf elasticsearch-5.4.0.tar.gz
步骤2:
拷贝到:/opt/路径下,改名: elasticsearch-5.4.0为 elasticsearch。
步骤3:linux下新建账户:elasticsearch
步骤4:修改/opt/elasticsearch的账户权限。
chown -R elasticsearch:elasticsearch /opt/elasticsearch
步骤5:修改配置文件/opt/elasticsearch/config/elasticsearch.yml
步骤6:切换到elasticsearch账户
步骤7:启动elasticsearch
步骤8:验证启动是否成功:

3、Head插件安装
步骤1:git clone git://github.com/mobz/elasticsearch-head.git
步骤2:切换到elasticsearch-head路径(我的解压路径:
/home/es01/elasticsearch/plugins/elasticsearch-head)
cd elasticsearch-head
npm install //一定要在elasticsearch-head目录下执行该命令
步骤3:修改配置
修改elasticsearch-head下Gruntfile.js文件,默认监听在127.0.0.1下9200端口
步骤4:启动服务
1)cd elasticsearch-head/node_modules/grunt/bin/
./grunt server
2)进入elasticsearch-head目录后,配置完Gruntfile.js 直接 npm run start 即可
步骤5:验证安装成功。
浏览器访问
http://localhost:9100/(localhost换成插件所在的机器的ip)
成功标志如下图所示:
1.x,2.x版本的访问:
http://IP:9200/_plugin/head5.x版本访问:
http://IP:9100/4、Kibana安装
kibana下载地址:
https://www.elastic.co/downloads/past-releases/kibana-5-4-1步骤2:切换路径
tar -xzf kibana-5.4.1-darwin-x86_64.tar.gz
cd kibana/
步骤3:修改配置
步骤4:运行kibana
./bin/kibana
5、logstash安装
logstash下载地址:
步骤1:安装公有签名key。
rpm –import https://artifacts.elastic.co/GPG-KEY-elasticsearch
步骤2:在/etc/yum.repos.d/下新增logstash.repo,添加如下内容:
[logstash-5.x]
name=Elastic repository for 5.x packages
baseurl=https://artifacts.elastic.co/packages/5.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
步骤3:安装logstash
sudo yum install logstash
步骤4:执行logstash(举例)
bin/logstash -f logstash-simple.conf
6、遇到的坑及解决方案
1)ES安装坑:
http://www.jianshu.com/p/89f8099a6d092)head安装坑:
http://www.echojb.com/network/2017/05/13/384500.html3)kibana安装坑:
https://www.elastic.co/guide/en/kibana/current/targz.html4)logstash安装坑:
https://www.elastic.co/guide/en/logstash/current/configuration.html5)ES跨域支持:
6)head插件npm安装参考:
http://t.cn/RZPxF2B作者:铭毅天下
转载请标明出处,原文地址:
http://blog.csdn.net/laoyang360/article/details/73368740