1.下载运行Elasticsearch

1.下载解压elasticsearch
Elasticsearch官网地址:https://www.elastic.co/ Elasticsearch最新版下载地址:https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html 
下载文件elasticsearch-1.7.2.zip到linux或Windows上,解压如下:
  1. [lizhiwei@localhost ElasticSearch]$ ll
  2. total 31028
  3. drwxr-xr-x. 8 lizhiwei lizhiwei 4096 Oct 9 05:32 elasticsearch-1.7.2
  4. -rwxrwxr-x. 1 lizhiwei lizhiwei 31766366 Oct 9 05:06 elasticsearch-1.7.2.zip
  5. [lizhiwei@localhost ElasticSearch]$ cd elasticsearch-1.7.2
  6. [lizhiwei@localhost elasticsearch-1.7.2]$ ll
  7. total 52
  8. drwxr-xr-x. 2 lizhiwei lizhiwei 4096 Sep 14 09:51 bin
  9. drwxr-xr-x. 2 lizhiwei lizhiwei 4096 Sep 14 09:51 config
  10. drwxrwxr-x. 3 lizhiwei lizhiwei 4096 Oct 9 05:17 data
  11. drwxr-xr-x. 3 lizhiwei lizhiwei 4096 Sep 14 09:51 lib
  12. -rw-rw-r--. 1 lizhiwei lizhiwei 11358 Sep 14 09:20 LICENSE.txt
  13. drwxrwxr-x. 2 lizhiwei lizhiwei 4096 Oct 9 05:17 logs
  14. -rw-rw-r--. 1 lizhiwei lizhiwei 150 Sep 14 09:20 NOTICE.txt
  15. drwxrwxr-x. 4 lizhiwei lizhiwei 4096 Oct 9 05:38 plugins
  16. -rw-rw-r--. 1 lizhiwei lizhiwei 8700 Sep 14 09:22 README.textile
  17. [lizhiwei@localhost elasticsearch-1.7.2]$
2.运行elasticsearch
elasticsearch启动脚本在解压目录bin下:
  1. [lizhiwei@localhost elasticsearch-1.7.2]$ cd bin/
  2. [lizhiwei@localhost bin]$ ll
  3. total 324
  4. -rwxr-xr-x. 1 lizhiwei lizhiwei 8114 Sep 14 09:51 elasticsearch
  5. -rw-rw-r--. 1 lizhiwei lizhiwei 901 Sep 14 09:51 elasticsearch.bat
  6. -rw-rw-r--. 1 lizhiwei lizhiwei 2797 Sep 14 09:51 elasticsearch.in.bat
  7. -rwxr-xr-x. 1 lizhiwei lizhiwei 2170 Sep 14 09:51 elasticsearch.in.sh
  8. -rw-rw-r--. 1 lizhiwei lizhiwei 104448 Sep 14 09:22 elasticsearch-service-mgr.exe
  9. -rw-rw-r--. 1 lizhiwei lizhiwei 103936 Sep 14 09:22 elasticsearch-service-x64.exe
  10. -rw-rw-r--. 1 lizhiwei lizhiwei 80896 Sep 14 09:22 elasticsearch-service-x86.exe
  11. -rwxr-xr-x. 1 lizhiwei lizhiwei 2523 Sep 14 09:51 plugin
  12. -rw-rw-r--. 1 lizhiwei lizhiwei 482 Sep 14 09:51 plugin.bat
  13. -rw-rw-r--. 1 lizhiwei lizhiwei 6210 Sep 14 09:51 service.bat
Linux以默认方式启动elasticsearch(依赖Java1.7):
  1. [lizhiwei@localhost bin]$ ./elasticsearch
  2. [2015-10-09 06:05:51,126][INFO ][node ] [Agamemnon] version[1.7.2], pid[3387], build[e43676b/2015-09-14T09:49:53Z]
  3. [2015-10-09 06:05:51,127][INFO ][node ] [Agamemnon] initializing ...
  4. [2015-10-09 06:05:51,249][INFO ][plugins ] [Agamemnon] loaded [marvel], sites [marvel, head]
  5. [2015-10-09 06:05:51,304][INFO ][env ] [Agamemnon] using [1] data paths, mounts [[/ (/dev/sda2)]], net usable_space [86.5gb], net total_space [95.3gb], types [ext4]
  6. [2015-10-09 06:05:53,939][INFO ][node ] [Agamemnon] initialized
  7. [2015-10-09 06:05:53,939][INFO ][node ] [Agamemnon] starting ...
  8. [2015-10-09 06:05:54,004][INFO ][transport ] [Agamemnon] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/192.168.110.100:9300]}
  9. [2015-10-09 06:05:54,017][INFO ][discovery ] [Agamemnon] elasticsearch/g0UtBViqRGOUdboFWcBUbw
  10. [2015-10-09 06:05:57,815][INFO ][cluster.service ] [Agamemnon] new_master [Agamemnon][g0UtBViqRGOUdboFWcBUbw][localhost.localdomain][inet[/192.168.110.100:9300]], reason: zen-disco-join (elected_as_master)
  11. [2015-10-09 06:05:57,936][INFO ][http ] [Agamemnon] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/192.168.110.100:9200]}
  12. [2015-10-09 06:05:57,937][INFO ][node ] [Agamemnon] started
  13. [2015-10-09 06:05:58,062][INFO ][gateway ] [Agamemnon] recovered [2] indices into cluster_state
检查是否启动成功,浏览器访问http://IP:9200/,如:http://192.168.110.100:9200/

2.安装Elasticsearch插件

1.安装Marvel插件插件
Elasticsearch Marvel是一个管理和监视工具,免费供开发使用。安装过程如下:
  1. [lizhiwei@localhost bin]$ ./plugin -i elasticsearch/marvel/latest
  2. -> Installing elasticsearch/marvel/latest...
  3. Trying http://download.elasticsearch.org/elasticsearch/marvel/marvel-latest.zip...
  4. Downloading .......................................DONE
  5. Installed elasticsearch/marvel/latest into /home/lizhiwei/SoftWare/ElasticSearch/elasticsearch-1.7.2/plugins/marvel

2.安装head插件
head插件也是ElasticSearch管理工具,安装如下:
  1. [lizhiwei@localhost bin]$ ./plugin -install mobz/elasticsearch-head
  2. -> Installing mobz/elasticsearch-head...
  3. Trying https://github.com/mobz/elasticsearch-head/archive/master.zip...
  4. Downloading ............................DONE
  5. Installed mobz/elasticsearch-head into /home/lizhiwei/SoftWare/ElasticSearch/elasticsearch-1.7.2/plugins/head
范围路径:http://IP:9200/_plugin/head/ 如下:

-------------------------------------------------------------------------------------------------------------------------------



posted on 2015-10-09 21:22  技术江湖-小焕  阅读(773)  评论(0编辑  收藏  举报