ElasticSearchスタンドアロンの導入とそのプラグイン
9462 ワード
ElasticSearchスタンドアロンの導入とそのプラグイン
1.紹介
Elasticsearchは分布式、RESTfulスタイルの検索とデータ分析エンジンであり、絶えず現れる様々な例を解決することができる.Elastic Stackの核心として、データを集中的に格納し、予想外の状況を発見するのに役立ちます.
2.インストール
1.ダウンロード先:https://www.elastic.co/cn/downloads/past-releases/elasticsearch-6-6-2
2.プラグインelasticsearch-headのインストール
ダウンロードアドレスはgithubにあります.https://github.com/mobz/elasticsearch-head
インストールエラー
npm ERR! [email protected] install:
npm ERR! Exit status 1
Elasticsearch起動エラー
ERROR: [2] bootstrap checks failed [1]: max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536] [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
調整vm.max_map_countの大きさ
3.Kibanaのインストール
ダウンロード先:https://www.elastic.co/downloads/past-releases/kibana-6-6-2
開始
4.ES-SQLのインストール
オフラインインストールes-sql
オンラインインストールes-sql
es-sql-site-standalone.zipのインストール
簡単に使用:https://juejin.im/post/5c122057518825353624bdb2#heading-0
1.紹介
Elasticsearchは分布式、RESTfulスタイルの検索とデータ分析エンジンであり、絶えず現れる様々な例を解決することができる.Elastic Stackの核心として、データを集中的に格納し、予想外の状況を発見するのに役立ちます.
2.インストール
1.ダウンロード先:https://www.elastic.co/cn/downloads/past-releases/elasticsearch-6-6-2
#
[hadoop@hadoop001 software] tar -xzvf elasticsearch-6.6.2.tar.gz -C /home/hadoop/app/
#
[hadoop@hadoop001 config]$ pwd
/home/hadoop/app/elasticsearch-6.6.2/config
[hadoop@hadoop001 config]$ vim elasticsearch.yml
#
cluster.name: ruozedata-es-cluster
node.name: ruozedata-node1
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
network.host: 0.0.0.0
http.cors.enabled: true
http.cors.allow-origin: "*"
#
export ELASTICSEARCH_HOME=/home/hadoop/app/elasticsearch-6.6.2
export PATH=${ELASTICSEARCH_HOME}/bin:$PATH
#
[hadoop@hadoop001 config]$ elasticsearch
2.プラグインelasticsearch-headのインストール
ダウンロードアドレスはgithubにあります.https://github.com/mobz/elasticsearch-head
#
[hadoop@hadoop001 app]$ mkdir elasticsearch-head
#
[hadoop@hadoop001 app]$ git clone https://github.com/mobz/elasticsearch-head.git
# nodejs, tar , :https://nodejs.org/en/
[hadoop@hadoop001 app]$ wget https://npm.taobao.org/mirrors/node/v10.16.0/node-v10.16.0-linux-x64.tar.xz
[hadoop@hadoop001 app]$ xz -d node-v10.16.0-linux-x64.tar.xz
[hadoop@hadoop001 app]$ tar -xvf node-v10.16.0-linux-x64.tar
#
export NODEJS_HOME=/home/hadoop/software/node-v10.16.0-linux-x64
export PATH=${NODEJS_HOME}/bin:$PATH
# elasticsearch-head
[hadoop@hadoop001 elasticsearch-head]$ pwd
/home/hadoop/app/elasticsearch-head
[hadoop@hadoop001 elasticsearch-head]$ npm install
# head ,vim _site/app.js , xxxx es ip
this.base_uri = this.config.base_uri ||
this.prefs.get("app-base_uri") || "http://xxxx:9200"
#
[hadoop@hadoop001 elasticsearch-head]$ npm run start
インストールエラー
npm ERR! [email protected] install:
node install.js
npm ERR! Exit status 1
npm install [email protected] --ignore-scripts
Elasticsearch起動エラー
ERROR: [2] bootstrap checks failed [1]: max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536] [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
調整vm.max_map_countの大きさ
sysctl -w vm.max_map_count=655360
#
sysctl -a|grep vm.max_map_count
# root , limits.conf
vi /etc/security/limits.conf
* soft nofile 65536
* hard nofile 131072
#
vim /etc/sysctl.conf
#
vm.max_map_count=655360
3.Kibanaのインストール
ダウンロード先:https://www.elastic.co/downloads/past-releases/kibana-6-6-2
#
[hadoop@hadoop001 software]$ tar -xzvf kibana-6.6.2-linux-x86_64.tar.gz -C /home/hadoop/app/
#conf
[hadoop@hadoop001 config]$ pwd
/home/hadoop/app/kibana/config
[hadoop@hadoop001 config]$ vim kibana.yml
#
#Elasticsearch
elasticsearch.url: "http://hadoop001:9200"
##
server.host: "0.0.0.0"
## Elasticsearch Elasticsearch
elasticsearch.username: "admin"
## Elasticsearch Elasticsearch
elasticsearch.password: "admin"
開始
[hadoop@hadoop001 bin]$ nohup ./kibana >/dev/null 2>&1 &
4.ES-SQLのインストール
# github
https://github.com/NLPchina/elasticsearch-sql/
# ES ES-SQL
https://github.com/NLPchina/elasticsearch-sql/releases/download/6.6.2.0/elasticsearch-sql-6.6.2.0.zip
オフラインインストールes-sql
[hadoop@hadoop001 bin]$ elasticsearch-plugin install file:/home/hadoop/software/ELK/elasticsearch-sql-6.6.2.0.zip
オンラインインストールes-sql
./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.6.2.0/elasticsearch-sql-6.6.2.0.zip
es-sql-site-standalone.zipのインストール
# :https://github.com/NLPchina/elasticsearch-sql/releases/download/5.4.1.0/es-sql-site-standalone.zip
#
unzip es-sql-site-standalone.zip -d ~/app/elasticsearch-6.6.2
#
[hadoop@hadoop001 elasticsearch-6.6.2]$ cd site-server/
[hadoop@hadoop001 site-server]$ npm install express --save
#site_configuration
[hadoop@hadoop001 site-server]$ vim site_configuration.json
{
"port":8088
}
#
[hadoop@hadoop001 site-server]$ node node-server.js // 8080
簡単に使用:https://juejin.im/post/5c122057518825353624bdb2#heading-0