中文手册地址:(最基本的一些知识在这里只做简单介绍)
JDK下载地址:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Elasticsearch下载地址:
https://www.elastic.co/downloads/elasticsearch
安装JDK
确认现有JDK版本
# java –version
安装以及配置环境变量
# tar zxvf jdk-8u60-linux-x64.tar.gz
# vim /etc/profile
#JDK1.8
export JAVA_HOME=/opt/jdk1.8.0_60
export JAVA_BIN=/opt/jdk1.8.0_60/bin
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME JAVA_BIN PATH CLASSPATH
确认安装
# java -version
启动Elasticsearch
启动命令
./bin/elasticsearch –d (-d 参数是为了让服务后台运行)
Web服务地址
http://localhost:9200
Elasticsearch目录结构
/bin 运行ElasticSearch实例和管理插件的一些脚本
/config 配置文件路径,包含elasticsearch.yml
/data 在节点上每个索引/碎片的数据文件的位置。可以有多个目录
/lib ElasticSearch使用的一些库
/logs 日志的文件夹
/plugins 已经安装的插件存放位置
Head 插件
head插件是一个elasticsearch的集群管理工具,它是完全由html5编写的独立网页程序。
Github:
https://github.com/mobz/elasticsearch-head
安装:
sudo elasticsearch/bin/plugin -install mobz/elasticsearch-head
访问:
http://localhost:9200/_plugin/head/
Bigdesk 插件
bigdesk是elasticsearch的一个集群监控工具,可以通过它来查看集群的各种状态,如:cpu、内存使用情况,索引数据、搜索情况,http连接数等。
Github:
https://github.com/lukas-vlcek/bigdesk
安装:
sudo elasticsearch/bin/plugin -install lukas-vlcek/bigdesk/2.5.0
访问:
http://localhost:9200/_plugin/bigdesk/
Marvel 插件
Marvel也是elasticsearch的一个管理监控工具,集head和bigdesk优点为一身。
但是Marvel插件不是免费的。
官方介绍:
https://www.elastic.co/products/marvel
安装:
sudo elasticsearch/bin/plugin -install elasticsearch/marvel/latest
sudo elasticsearch/bin/plugin --url file:///opt/marvel-latest.zip --install marvel (没网下安装)
访问:
http://localhost:9200/_plugin/marvel/