【Elasticsearch 指南系列】(1.2) ——Elasticsearch 安装

EngineBUS 发表于 2016-10-22 16:37:17 | 显示全部楼层 [复制链接]
1 180
安装 JAVA
  1. yum install java-1.7.0-openjdk -y
复制代码
安装 Elasticsearch
EngineBUS enginebus EngineBUS enginebus
了解 Elasticsearch 最简单的方法就是去尽情的玩儿它(汗),准备好了我们就开始吧。
安装 Elasticsearch 只有一个要求,就是要安装最新版本的JAVA。你可以到官方网站下载它:www.java.com.
你可以在这里下载到最新版本的 Elasticsearch: elasticsearch.org/download.(推荐)
  1. curl -L -O http://download.elasticsearch.org/PATH/TO/LATEST/$VERSION.zip
    EngineBUS enginebus EngineBUS enginebus
  2. unzip elasticsearch-$VERSION.zip
    EngineBUS enginebus EngineBUS enginebus
  3. cd  elasticsearch-$VERSION
复制代码

EngineBUS enginebus EngineBUS enginebus
提示: 当你安装 Elasticsearch 时,你可以到 下载页面 选择Debian或者RP安装包。或者你也可以使用官方提供的 Puppet module 或者 Chef cookbook.

EngineBUS enginebus EngineBUS enginebus安装 Marvel
EngineBUS enginebus EngineBUS enginebus这是个付费的监控插件 暂不翻译,具体看Marvel官网
Marvel is a management and monitoring tool for Elasticsearch which is free for development use. It comes with an interactive console called Sense which makes it very easy to talk to Elasticsearch directly from your browser.
Many of the code examples in this book include a ``View in Sense'' link. When clicked, it will open up a working example of the code in the Sense console. You do not have to install Marvel, but it will make this book much more interactive by allowing you to experiment with the code samples on your local Elasticsearch cluster.
Marvel is available as a plugin. To download and install it, run this command in the Elasticsearch directory:

EngineBUS enginebus EngineBUS enginebus
  1. ./bin/plugin -i elasticsearch/marvel/latest
    EngineBUS enginebus EngineBUS enginebus
复制代码
You probably don't want Marvel to monitor your local cluster, so you can disable data collection with this command:

EngineBUS enginebus EngineBUS enginebus
  1. echo 'marvel.agent.enabled: false' >> ./config/elasticsearch.yml
复制代码
运行 Elasticsearch
EngineBUS enginebus EngineBUS enginebusElasticsearch 已经蓄势待发,现在你便可以运行它了:
EngineBUS enginebus EngineBUS enginebus
  1. ./bin/elasticsearch
复制代码
如果你想让它在后台保持运行的话可以在命令后面再加一个 -d
开启后你就可以使用另一个终端窗口来进行测试了:

EngineBUS enginebus EngineBUS enginebus
  1. curl 'http://localhost:9200/?pretty'
复制代码
你应该看到如下提示:
  1. {
    EngineBUS enginebus EngineBUS enginebus
  2.    "status": 200,
    EngineBUS enginebus EngineBUS enginebus
  3.    "name": "Shrunken Bones",
    EngineBUS enginebus EngineBUS enginebus
  4.    "version": {
    EngineBUS enginebus EngineBUS enginebus
  5.       "number": "1.4.0",
    EngineBUS enginebus EngineBUS enginebus
  6.       "lucene_version": "4.10"
    EngineBUS enginebus EngineBUS enginebus
  7.    },
    EngineBUS enginebus EngineBUS enginebus
  8.    "tagline": "You Know, for Search"
    EngineBUS enginebus EngineBUS enginebus
  9. }
复制代码
这就说明你的 Elasticsearch 集群 已经上线运行了,这时我们就可以进行各种实验了。

EngineBUS enginebus EngineBUS enginebus集群和节点
节点 是 Elasticsearch 运行的实例。集群的节点,它们协同工作,互相分享数据,提供了故障转移和扩展的功能。当然一个节点也可以是一个集群。

EngineBUS enginebus EngineBUS enginebus

EngineBUS enginebus EngineBUS enginebus
EngineBUS enginebus EngineBUS enginebus
EngineBUS enginebus EngineBUS enginebus
EngineBUS enginebus EngineBUS enginebus
发表于 2016-10-22 16:37:17 | 显示全部楼层
Elasticsearch 是绿色软件,下载就可以运行,而且各个平台都放在一起,Windows系统下启动是./bin/elasticsearch.bat  不同的就是加了bat。其余多数命令都是类似的
Nothing seek, nothing find.
您需要登录后才可以回帖 登录 | Sign Up

本版积分规则

推荐阅读

QQ| Archiver|手机版|小黑屋| 引擎巴士 EngineBUS  

Powered by Discuz! X3.2© 2001-2013 Comsenz Inc.  

返回顶部 返回列表