在最新的elasticsearch2.3.3发布后,出现了很多和以前安装步骤不同的地方
一、安装介绍
ubuntu :
longshao@localhost:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial
longshao@localhost:~$
JDK
longshao@localhost:~$ java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
longshao@localhost:~$ echo $JAVA_HOME
/usr/java/jdk1.8.0_91
longshao@localhost:~$
Java 7 or later
Elasticsearch 2.3.3
Kibana 4.5.1
Elasticsearch License 2.3.3 plugin
下载地址
Elasticsearch 2.3.3 点击下载,
解压缩 tar -xvf elasticsearch-2.3.3.tar.gz
进入目录
修改配置文件:
longshao@localhost:/usr/es/elasticsearch-2.3.3$ cd config/
longshao@localhost:/usr/es/elasticsearch-2.3.3/config$ ls
elasticsearch.yml logging.yml scripts
longshao@localhost:/usr/es/elasticsearch-2.3.3/config$ sudo vim elasticsearch.yml
[sudo] password for longshao:
longshao@localhost:/usr/es/elasticsearch-2.3.3/config$ sudo vim elasticsearch.yml
在elasticsearch.yml 修改一行代码,将#去掉
由于在新的版本里默认绑定ip为 127.0.0.1,所以在外界进行访问的时候是无法根据ubuntu 的IP进行访问
network.host: 0.0.0.0
longshao@localhost:/usr/es/elasticsearch-2.3.3/config$ cd ..
longshao@localhost:/usr/es/elasticsearch-2.3.3$ bin/elasticsearch
[2016-06-03 01:28:32,852][INFO ][node ] [Paris] version[2.3.3], pid[1199], build[218bdf1/2016-05-17T15:40:04Z]
[2016-06-03 01:28:32,858][INFO ][node ] [Paris] initializing ...
[2016-06-03 01:28:33,895][INFO ][plugins ] [Paris] modules [reindex, lang-expression, lang-groovy], plugins [license, marvel-agent], sites []
[2016-06-03 01:28:33,935][INFO ][env ] [Paris] using [1] data paths, mounts [[/ (/dev/sda1)]], net usable_space [15.6gb], net total_space [18.5gb], spins? [possibly], types [ext4]
[2016-06-03 01:28:33,936][INFO ][env ] [Paris] heap size [1015.6mb], compressed ordinary object pointers [true]
[2016-06-03 01:28:38,351][INFO ][node ] [Paris] initialized
[2016-06-03 01:28:38,355][INFO ][node ] [Paris] starting ...
[2016-06-03 01:28:38,521][INFO ][transport ] [Paris] publish_address {192.168.202.130:9300}, bound_addresses {0.0.0.0:9300}
[2016-06-03 01:28:38,537][INFO ][discovery ] [Paris] elasticsearch/RnkX2n0gRXiz_KulzDwNQQ
[2016-06-03 01:28:41,613][INFO ][cluster.service ] [Paris] new_master {Paris}{RnkX2n0gRXiz_KulzDwNQQ}{192.168.202.130}{192.168.202.130:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2016-06-03 01:28:41,654][INFO ][http ] [Paris] publish_address {192.168.202.130:9200}, bound_addresses {0.0.0.0:9200}
[2016-06-03 01:28:41,658][INFO ][node ] [Paris] started
[2016-06-03 01:28:42,264][INFO ][license.plugin.core ] [Paris] license [9cd0ee9e-cd53-47da-8de0-81830c0a9e11] - valid
[2016-06-03 01:28:42,274][ERROR][license.plugin.core ] [Paris]
#
# License will expire on [Sunday, July 03, 2016]. If you have a new license, please update it.
# Otherwise, please reach out to your support contact.
#
# Commercial plugins operate with reduced functionality on license expiration:
# - marvel
# - The agent will stop collecting cluster and indices metrics
# - The agent will stop automatically cleaning indices older than [marvel.history.duration]
[2016-06-03 01:28:42,348][INFO ][gateway ] [Paris] recovered [3] indices into cluster_state
[2016-06-03 01:28:43,728][INFO ][cluster.routing.allocation] [Paris] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[shutdown][2], [.marvel-es-1-2016.06.03][0], [.marvel-es-1-2016.06.03][0], [shutdown][2]] ...]).
[2016-06-03 01:43:15,141][INFO ][cluster.metadata ] [Paris] [.kibana] creating index, cause [api], templates [], shards [1]/[1], mappings [config]
[2016-06-03 01:43:15,278][INFO ][cluster.routing.allocation] [Paris] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[.kibana][0]] ...]).
[2016-06-03 01:43:18,018][INFO ][cluster.metadata ] [Paris] [.kibana] create_mapping [index-pattern]
^C[2016-06-03 01:47:35,596][INFO ][node ] [Paris] stopping ...
[2016-06-03 01:47:35,715][INFO ][node ] [Paris] stopped
[2016-06-03 01:47:35,716][INFO ][node ] [Paris] closing ...
[2016-06-03 01:47:35,736][INFO ][node ] [Paris] closed
longshao@localhost:/usr/es/elasticsearch-2.3.3$ bin/elasticsearch
[2016-06-03 01:48:03,434][INFO ][node ] [Mad Dog Rassitano] version[2.3.3], pid[1430], build[218bdf1/2016-05-17T15:40:04Z]
[2016-06-03 01:48:03,435][INFO ][node ] [Mad Dog Rassitano] initializing ...
[2016-06-03 01:48:04,547][INFO ][plugins ] [Mad Dog Rassitano] modules [reindex, lang-expression, lang-groovy], plugins [license, marvel-agent], sites []
[2016-06-03 01:48:04,583][INFO ][env ] [Mad Dog Rassitano] using [1] data paths, mounts [[/ (/dev/sda1)]], net usable_space [15.6gb], net total_space [18.5gb], spins? [possibly], types [ext4]
[2016-06-03 01:48:04,583][INFO ][env ] [Mad Dog Rassitano] heap size [1015.6mb], compressed ordinary object pointers [true]
[2016-06-03 01:48:09,336][INFO ][node ] [Mad Dog Rassitano] initialized
[2016-06-03 01:48:09,345][INFO ][node ] [Mad Dog Rassitano] starting ...
[2016-06-03 01:48:09,502][INFO ][transport ] [Mad Dog Rassitano] publish_address {192.168.202.130:9300}, bound_addresses {0.0.0.0:9300}
[2016-06-03 01:48:09,507][INFO ][discovery ] [Mad Dog Rassitano] elasticsearch/rjUt61l4QYeX-O2v7kyfPA
[2016-06-03 01:48:12,594][INFO ][cluster.service ] [Mad Dog Rassitano] new_master {Mad Dog Rassitano}{rjUt61l4QYeX-O2v7kyfPA}{192.168.202.130}{192.168.202.130:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2016-06-03 01:48:12,660][INFO ][http ] [Mad Dog Rassitano] publish_address {192.168.202.130:9200}, bound_addresses {0.0.0.0:9200}
[2016-06-03 01:48:12,662][INFO ][node ] [Mad Dog Rassitano] started
[2016-06-03 01:48:13,268][INFO ][license.plugin.core ] [Mad Dog Rassitano] license [9cd0ee9e-cd53-47da-8de0-81830c0a9e11] - valid
[2016-06-03 01:48:13,277][ERROR][license.plugin.core ] [Mad Dog Rassitano]
#
# License will expire on [Sunday, July 03, 2016]. If you have a new license, please update it.
# Otherwise, please reach out to your support contact.
#
# Commercial plugins operate with reduced functionality on license expiration:
# - marvel
# - The agent will stop collecting cluster and indices metrics
# - The agent will stop automatically cleaning indices older than [marvel.history.duration]
[2016-06-03 01:48:13,350][INFO ][gateway ] [Mad Dog Rassitano] recovered [4] indices into cluster_state
[2016-06-03 01:48:14,854][INFO ][cluster.routing.allocation] [Mad Dog Rassitano] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[shutdown][0], [shutdown][0]] ...]).
^C[2016-06-03 01:48:20,809][INFO ][node ] [Mad Dog Rassitano] stopping ...
[2016-06-03 01:48:21,170][INFO ][node ] [Mad Dog Rassitano] stopped
[2016-06-03 01:48:21,171][INFO ][node ] [Mad Dog Rassitano] closing ...
[2016-06-03 01:48:21,188][INFO ][node ] [Mad Dog Rassitano] closed
longshao@localhost:/usr/es/elasticsearch-2.3.3$ clear
longshao@localhost:/usr/es/elasticsearch-2.3.3$
longshao@localhost:/usr/es/elasticsearch-2.3.3$
longshao@localhost:/usr/es/elasticsearch-2.3.3$ bin/elasticsearch
[2016-06-03 01:48:29,408][INFO ][node ] [Goliath] version[2.3.3], pid[1496], build[218bdf1/2016-05-17T15:40:04Z]
[2016-06-03 01:48:29,409][INFO ][node ] [Goliath] initializing ...
[2016-06-03 01:48:30,460][INFO ][plugins ] [Goliath] modules [reindex, lang-expression, lang-groovy], plugins [license, marvel-agent], sites []
[2016-06-03 01:48:30,498][INFO ][env ] [Goliath] using [1] data paths, mounts [[/ (/dev/sda1)]], net usable_space [15.6gb], net total_space [18.5gb], spins? [possibly], types [ext4]
[2016-06-03 01:48:30,499][INFO ][env ] [Goliath] heap size [1015.6mb], compressed ordinary object pointers [true]
[2016-06-03 01:48:34,684][INFO ][node ] [Goliath] initialized
[2016-06-03 01:48:34,690][INFO ][node ] [Goliath] starting ...
[2016-06-03 01:48:34,850][INFO ][transport ] [Goliath] publish_address {192.168.202.130:9300}, bound_addresses {0.0.0.0:9300}
[2016-06-03 01:48:34,860][INFO ][discovery ] [Goliath] elasticsearch/wMEwydMASG-bXjIx0ZAvDQ
[2016-06-03 01:48:37,942][INFO ][cluster.service ] [Goliath] new_master {Goliath}{wMEwydMASG-bXjIx0ZAvDQ}{192.168.202.130}{192.168.202.130:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2016-06-03 01:48:38,036][INFO ][http ] [Goliath] publish_address {192.168.202.130:9200}, bound_addresses {0.0.0.0:9200}
[2016-06-03 01:48:38,036][INFO ][node ] [Goliath] started
[2016-06-03 01:48:38,667][INFO ][license.plugin.core ] [Goliath] license [9cd0ee9e-cd53-47da-8de0-81830c0a9e11] - valid
[2016-06-03 01:48:38,675][ERROR][license.plugin.core ] [Goliath]
#
# License will expire on [Sunday, July 03, 2016]. If you have a new license, please update it.
# Otherwise, please reach out to your support contact.
#
# Commercial plugins operate with reduced functionality on license expiration:
# - marvel
# - The agent will stop collecting cluster and indices metrics
# - The agent will stop automatically cleaning indices older than [marvel.history.duration]
[2016-06-03 01:48:38,753][INFO ][gateway ] [Goliath] recovered [4] indices into cluster_state
[2016-06-03 01:48:40,288][INFO ][cluster.routing.allocation] [Goliath] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[shutdown][0], [shutdown][0]] ...]).
开启服务后就可以进行访问了:
longshao@localhost:~$ curl localhost:9200
{
"name" : "Goliath",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "2.3.3",
"build_hash" : "218bdf10790eef486ff2c41a3df5cfa32dadcfde",
"build_timestamp" : "2016-05-17T15:40:04Z",
"build_snapshot" : false,
"lucene_version" : "5.5.0"
},
"tagline" : "You Know, for Search"
}
longshao@localhost:~$
进入下面网站选择版本
https://www.elastic.co/downloads/elasticsearch
kibana 4.5.1的安装,直接解压缩
Kibana 4.5.1点击下载
进入下面网站选择自己的版本
https://www.elastic.co/downloads/kibana
tar -xvf kibana-4.5.1-linux-x64.tar.gz
解压缩后修改配置文件
在配置文件下:
追加
elasticsearch_url:"http://${IP}:9200"
installing marvel
Elasticsearch License 2.3.3 plugin
License==https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/license/2.3.3/license-2.3.3.zip (License 2.3.3)
marvelagent==https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/marvel-agent/2.3.3/marvel-agent-2.3.3.zip (marvel-agent)
将上面两个插件下载到本地,然后可以通过WinSCP放到ubuntuOS系统的里;
marvel==https://download.elasticsearch.org/elasticsearch/marvel/marvel-2.3.3.tar.gz (marvel-2.3.3)
对上面的插件进行安装
bin/plugin install ${PATH}/license-2.3.3.zip
bin/plugin install ${PATH}/marvel-agent-2.3.3.zip
bin/plugin install license
bin/plugin install marvel-agent
bin/kibana plugin --install marvel --url https://download.elasticsearch.org/elasticsearch/marvel/marvel-2.3.3.tar.gz
上面OK后就可以验证是否成功安装了 kibana
浏览器: URL:http://${IP}:5601/
小结:在做elasticsearch实验的时候
不要直接使用yum或者apk直接安装,由于linux系统 的关于es的数据源还都是版本很低的es,而对于低版本的es对其的支持会很低,在装插件的时候,插件的源为404,不能下载安装。
必要的时候可以去官网去读文档进行安装。