您好,登錄后才能下訂單哦!
簡要說明:elasticsearch安裝好后需要安裝相應的插件Head ,Kopf與Bigdesk,才能更好的實現各種功能,一下就是這三種插件安裝的基本步驟
(一)安裝ElasticSearch-Head
ElasticSearch-Head 是一個與Elastic集群(Cluster)相交互的Web前臺。
ES-Head的主要作用:
它展現ES集群的拓撲結構,并且可以通過它來進行索引(Index)和節點(Node)級別的操作
它提供一組針對集群的查詢API,并將結果以json和表格形式返回
它提供一些快捷菜單,用以展現集群的各種狀態
安裝方分為:在線安裝和手動安裝
(1)在線安裝
[appuser@zabbix elasticsearch]$ ./bin/plugin install mobz/elasticsearch-head -> Installing mobz/elasticsearch-head... Trying https://github.com/mobz/elasticsearch-head/archive/master.zip ... Downloading ...........................................................................................................................................................................................................................................................................................................DONE Verifying https://github.com/mobz/elasticsearch-head/archive/master.zip checksums if available ... NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify) Installed head into /usr/local/elasticsearch/plugins/head [appuser@zabbix elasticsearch]$ ls plugins/ head
(2)手動安裝
在安裝前需要在https://github.com/mobz/elasticsearch-head.git 網站下 先下載文件elasticsearch-head-master.zip(wget https://github.com/mobz/elasticsearch-head/archive/master.zip)
[appuser@GJB-UAT elasticsearch]$ ./plugin install file:///tmp/install/elk/elasticsearch- head-master.zip -> Installing /tmp/install/elk/elasticsearch-head-master.zip... Trying https://download.elastic.co//tmp/tmp-install.zip ... Trying https://search.maven.org/remotecontent?filepath=/tmp/install/tmp-install.zip ... [appuser@GJB-UAT plugins]$ ll /usr/local/elasticsearch/plugins/ drwxrwxr-x. 5 appuser appuser 4096 5月 11 16:31 head #########不過最簡單的方式是:把剛下載的elasticsearch-head-master.zip解壓并放到 /usr/local/elasticsearch/plugins/head目錄下 [root@db22 elk]# unzip elasticsearch-head-master.zip Archive: elasticsearch-head-master.zip adc0c89be13dd6268d835e34922753e1eeb5856c creating: elasticsearch-head-master/ extracting: elasticsearch-head-master/.dockerignore inflating: elasticsearch-head-master/.gitignore inflating: elasticsearch-head-master/.jshintrc inflating: elasticsearch-head-master/Dockerfile inflating: elasticsearch-head-master/Dockerfile-alpine inflating: elasticsearch-head-master/Gruntfile.js inflating: elasticsearch-head-master/LICENCE inflating: elasticsearch-head-master/README.textile creating: elasticsearch-head-master/_site/ inflating: elasticsearch-head-master/_site/app.css [appuser@db22 plugins]$ cp -p -r /tmp/install/elk/elasticsearch-head-master/* head/ [appuser@db22 plugins]$ ll head/ total 60 -rw-r--r--. 1 appuser appuser 248 Mar 29 11:05 Dockerfile -rw-r--r--. 1 appuser appuser 221 Mar 29 11:05 Dockerfile-alpine -rw-r--r--. 1 appuser appuser 104 Mar 29 11:05 elasticsearch-head.sublime-project -rw-r--r--. 1 appuser appuser 2171 Mar 29 11:05 Gruntfile.js -rw-r--r--. 1 appuser appuser 3482 Mar 29 11:05 grunt_fileSets.js -rw-r--r--. 1 appuser appuser 1088 Mar 29 11:05 index.html -rw-r--r--. 1 appuser appuser 559 Mar 29 11:05 LICENCE -rw-r--r--. 1 appuser appuser 886 Mar 29 11:05 package.json -rw-r--r--. 1 appuser appuser 100 Mar 29 11:05 plugin-descriptor.properties drwxr-xr-x. 4 appuser appuser 4096 Mar 29 11:05 proxy -rw-r--r--. 1 appuser appuser 6692 Mar 29 11:05 README.textile drwxr-xr-x. 5 appuser appuser 4096 Mar 29 11:05 _site drwxr-xr-x. 4 appuser appuser 4096 Mar 29 11:05 src drwxr-xr-x. 4 appuser appuser 4096 Mar 29 11:05 test [appuser@db22 elasticsearch]$ /usr/local/elasticsearch/bin/elasticsearch &
插件head安裝完成后的訪問地址如下:http://IP:9200/_plugin/head/(本人的訪問地址如下:http://192.168.180.3:9200/_plugin/head/)
備注:在2.x之前版本的命令行格式為:
./bin/plugin install --url file:///tmp/install/elk/elasticsearch-head-master.zip
(二)安裝ElasticSearch-Kopf
1,介紹:kopf是一個ElasticSearch的管理工具,它提供了對ES集群操作的API。版本支持如下:
2,安裝步驟如下:
[appuser@GJB-UAT local]$ ./elasticsearch/bin/plugin install lmenezes/elasticsea rch-kopf -> Installing lmenezes/elasticsearch-kopf... Trying https://github.com/lmenezes/elasticsearch-kopf/archive/master.zip ... Downloading ..............................DONE Verifying https://github.com/lmenezes/elasticsearch-kopf/archive/master.zip checksums if available ... NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify) Installed kopf into /usr/local/elasticsearch/plugins/kopf [appuser@GJB-UAT local]$ ll elasticsearch/plugins/ drwxrwxr-x. 5 appuser appuser 4096 5月 11 16:31 head drwxrwxr-x 8 appuser appuser 4096 5月 16 15:56 kopf
3,訪問地址如下:http://IP:9200/_plugin/kopf (http://192.168.180.3:9200/_plugin/kopf/)
(三)安裝 ElasticSearch-Bigdesk
1,說明:bigdesk是elasticsearch的一個集群監控工具,可以通過它來查看es集群的各種狀態,如:cpu、內存使用情況,索引數據、搜索情況,http連接數等。
2,安裝步驟:
安裝打開網站https://github.com/lukas-vlcek/bigdesk
[appuser@GJB-UAT elk]$ unzip bigdesk-master.zip Archive: bigdesk-master.zip 4dd7545d4c012bf56def273385a7626cd7d70bc6 creating: bigdesk-master/ extracting: bigdesk-master/.gitignore inflating: bigdesk-master/LICENSE inflating: bigdesk-master/NOTICE inflating: bigdesk-master/README.md inflating: bigdesk-master/bigdesk-1.0.0.jpg inflating: bigdesk-master/bigdesk-2.0.0-SNAPSHOT.jpg creating: bigdesk-master/css/ creating: bigdesk-master/css/CssGrid_2/ inflating: bigdesk-master/css/CssGrid_2/1140.css inflating: bigdesk-master/css/CssGrid_2/License.txt inflating: bigdesk-master/css/CssGrid_2/ie.css inflating: bigdesk-master/css/CssGrid_2/styles.css inflating: bigdesk-master/css/bigdesk.css inflating: bigdesk-master/css/normalize.css inflating: bigdesk-master/css/reset.css creating: bigdesk-master/p_w_picpaths/ inflating: bigdesk-master/p_w_picpaths/1license.txt extracting: bigdesk-master/p_w_picpaths/award_star_gold.png inflating: bigdesk-master/p_w_picpaths/es-logo.png extracting: bigdesk-master/p_w_picpaths/favicon.png inflating: bigdesk-master/index.html creating: bigdesk-master/js/ inflating: bigdesk-master/js/bigdeskApp.js creating: bigdesk-master/js/charts/ inflating: bigdesk-master/js/charts/bigdesk_charts.js inflating: bigdesk-master/js/charts/common.css creating: bigdesk-master/js/charts/not-available/ inflating: bigdesk-master/js/charts/not-available/not-available-chart.css inflating: bigdesk-master/js/charts/not-available/not-available-chart.js inflating: bigdesk-master/js/charts/not-available/test-not-available-chart.html creating: bigdesk-master/js/charts/pack/ inflating: bigdesk-master/js/charts/pack/pack.css creating: bigdesk-master/js/charts/time-area/ inflating: bigdesk-master/js/charts/time-area/test-time-area-chart.html inflating: bigdesk-master/js/charts/time-area/time-area-chart.css inflating: bigdesk-master/js/charts/time-area/time-area-chart.js creating: bigdesk-master/js/charts/time-series/ inflating: bigdesk-master/js/charts/time-series/test-time-series-chart.html inflating: bigdesk-master/js/charts/time-series/time-series-chart.css inflating: bigdesk-master/js/charts/time-series/time-series-chart.js creating: bigdesk-master/js/lib/ creating: bigdesk-master/js/lib/D3-v2.8.1/ inflating: bigdesk-master/js/lib/D3-v2.8.1/LICENSE inflating: bigdesk-master/js/lib/D3-v2.8.1/d3.v2.min.js creating: bigdesk-master/js/lib/backbone/ inflating: bigdesk-master/js/lib/backbone/LICENSE inflating: bigdesk-master/js/lib/backbone/backbone-min.js creating: bigdesk-master/js/lib/css3-mediaqueries/ inflating: bigdesk-master/js/lib/css3-mediaqueries/License.txt inflating: bigdesk-master/js/lib/css3-mediaqueries/css3-mediaqueries.js creating: bigdesk-master/js/lib/jquery/ inflating: bigdesk-master/js/lib/jquery/jquery-1.7.1.min.js creating: bigdesk-master/js/lib/mustache/ inflating: bigdesk-master/js/lib/mustache/LICENSE inflating: bigdesk-master/js/lib/mustache/mustache.js creating: bigdesk-master/js/lib/tinysort/ inflating: bigdesk-master/js/lib/tinysort/License.txt inflating: bigdesk-master/js/lib/tinysort/jquery.tinysort.min.js creating: bigdesk-master/js/lib/underscore/ inflating: bigdesk-master/js/lib/underscore/LICENSE inflating: bigdesk-master/js/lib/underscore/underscore-min.js creating: bigdesk-master/js/models/ inflating: bigdesk-master/js/models/Hello.js creating: bigdesk-master/js/models/cluster/ inflating: bigdesk-master/js/models/cluster/ClusterHealth.js inflating: bigdesk-master/js/models/cluster/ClusterState.js inflating: bigdesk-master/js/models/cluster/IndicesStatus.js inflating: bigdesk-master/js/models/cluster/NodeInfo.js inflating: bigdesk-master/js/models/cluster/NodesState.js inflating: bigdesk-master/js/models/cluster/NodesStats.js creating: bigdesk-master/js/store/ inflating: bigdesk-master/js/store/BigdeskStore.js creating: bigdesk-master/js/util/ inflating: bigdesk-master/js/util/bigdesk_extension.js creating: bigdesk-master/js/views/ inflating: bigdesk-master/js/views/ClusterHealthView.js inflating: bigdesk-master/js/views/ClusterNodesListView.js inflating: bigdesk-master/js/views/ClusterStateView.js inflating: bigdesk-master/js/views/SelectedClusterNodeView.js inflating: bigdesk-master/js/views/templates.js [appuser@GJB-UAT elk]$ ll 總用量 330504 drwxrwxr-x 5 appuser appuser 4096 4月 27 2015 bigdesk-master -rw-r--r-- 1 root root 337682 5月 16 15:07 bigdesk-master.zip -rw-r--r-- 1 appuser appuser 920168 5月 16 15:28 master.zip drwxr-xr-x 9 appuser appuser 4096 5月 3 00:34 node-v6.10.3 -rw-r--r-- 1 appuser appuser 26762674 5月 16 13:32 node-v6.10.3.tar.gz [appuser@GJB-UAT elk]$ cd bigdesk-master [appuser@GJB-UAT bigdesk-master]$ ls bigdesk-1.0.0.jpg css index.html LICENSE README.md bigdesk-2.0.0-SNAPSHOT.jpg p_w_picpaths js NOTICE [appuser@GJB-UAT bigdesk-master]$ mv * /usr/local/elasticsearch/plugins/bigdesk/_site
3,在plugin/bigdesk目錄下創建/usr/local/elasticsearch/plugins/bigdesk/plugin-descriptor.properties
[appuser@GJB-UAT bigdesk]$ vim /usr/local/elasticsearch/plugins/bigdesk/plugin-descrip tor.properties description=head - A web front end for an elastic search cluster version=master site=true name=bigdesk
4,修改BigdeskStore.js 文件在第142行的地方去掉major == 1條件
[appuser@GJB-UAT _site]$ vim /usr/local/elasticsearch/plugins/bigdesk/_site/js/store/B
igdeskStore.js #####在第142行的時候去掉major == 1條件
return ( minor >= 0 && maintenance >= 0 && (build != 'Beta1' || build != 'Beta2
'));
// return (major == 1 && minor >= 0 && maintenance >= 0 && (build != 'Beta1' |
| build != 'Beta2'));
5,重啟elasticsearch 然后訪問,訪問地址: http:IP:9200/_plugin/bigdesk (http://192.168.180.3:9200/_plugin/bigdesk/)
Bigdesk目前只支持到ElasticSearch 1.3.x
至此ElasticSearch插件安裝---Head ,Kopf與Bigdesk插件安裝完成。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。