19-linux下ElasticSearch.6.2.1与head、Kibana、X-Pack、SQL、IK、PINYIN插件的配置安装
2018-02-25 10:53
1746 查看
1.安装elasticsearch-head
1.1 直接使用命令安装报错
elasticsearch-6.2.0\bin>elasticsearch-plugin install elasticsearch-head A tool for managing installed elasticsearch plugins Commands -------- list - Lists installed elasticsearch plugins install - Install a plugin remove - removes a plugin from Elasticsearch Non-option arguments: command Option Description ------ ----------- -h, --help show help -s, --silent show minimal output -v, --verbose show verbose output ERROR: Unknown plugin elasticsearch-head
1.2 采用nodejs安装
6.X中,elasticsearch-head不能放在elasticsearch的 plugins、modules 目录下
不能使用 elasticsearch-plugin install
直接启动elasticsearch即可
安装 elasticsearch-head
1.修改 elasticsearch/config/elasticsearch.yml
2.添加
http.cors.enabled: true http.cors.allow-origin: "*"
3.下载 elasticsearch-head 或者 git clone 到随便一个文件夹
https://github.com/mobz/elasticsearch-head
我是直接下载到
[es@biluos elasticsearch-head-master]$ pwd /home/es/elasticsearch-head-master
目录的
4.安装nodejs
http://blog.csdn.net/qq_21383435/article/details/79367366
5.cd /home/es/elasticsearch-head-master
6.npm install -g grunt-cli
grunt是一个很方便的构建工具,可以进行打包压缩、测试、执行等等的工作
[es@biluos elasticsearch-head-master]$ npm install -g grunt-cli npm WARN checkPermissions Missing write access to /opt/moudles/node-v8.9.4-linux-x64/lib/node_modules npm ERR! path /opt/moudles/node-v8.9.4-linux-x64/lib/node_modules npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error: EACCES: permission denied, access '/opt/moudles/node-v8.9.4-linux-x64/lib/node_modules' npm ERR! { Error: EACCES: permission denied, access '/opt/moudles/node-v8.9.4-linux-x64/lib/node_modules' npm ERR! stack: 'Error: EACCES: permission denied, access \'/opt/moudles/node-v8.9.4-linux-x64/lib/node_modules\'', npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/opt/moudles/node-v8.9.4-linux-x64/lib/node_modules' } npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! A complete log of this run can be found in: npm ERR! /home/es/.npm/_logs/2018-02-25T02_49_37_372Z-debug.log
一看就知道是权限问题,因为我的nodejs是root安装的,这里我是es用户
[es@biluos elasticsearch-head-master]$ su root Password: [root@biluos elasticsearch-head-master]# npm install -g grunt-cli /opt/moudles/node-v8.9.4-linux-x64/bin/grunt -> /opt/moudles/node-v8.9.4-linux-x64/lib/node_modules/grunt-cli/bin/grunt + grunt-cli@1.2.0 added 16 packages in 21.663s
7.npm install
[root@biluos elasticsearch-head-master]# npm install npm WARN deprecated http2@3.3.7: Use the built-in module in node 9.0.0 or newer, instead npm WARN deprecated coffee-script@1.10.0: CoffeeScript on NPM has moved to "coffeescript" (no hyphen) > phantomjs-prebuilt@2.1.16 install /home/es/elasticsearch-head-master/node_modules/phantomjs-prebuilt > node install.js module.js:540 throw err; ^ Error: Cannot find module '/home/es/elasticsearch-head-master/node_modules/phantomjs-prebuilt/install.js' at Function.Module._resolveFilename (module.js:538:15) at Function.Module._load (module.js:468:25) at Function.Module.runMain (module.js:684:10) at startup (bootstrap_node.js:187:16) at bootstrap_node.js:608:3 npm WARN elasticsearch-head@0.0.0 license should be a valid SPDX license expression npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the phantomjs-prebuilt@2.1.16 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2018-02-25T03_01_11_887Z-debug.log
这一点是因为我的elasticsearch是es用户,而elasticsearch-head-master文件是root用户
[root@biluos es]# ll total 12 drwxr-xr-x 4 es es 4096 Feb 9 14:55 elasticsearch [root@biluos elasticsearch-head-master]# ll /home/es/elasticsearch-head-master/node_modules total 1028 drwxr-xr-x 2 root root 4096 Feb 25 11:01 abbrev drwxr-xr-x 2 root root 4096 Feb 25 11:01 accepts drwxr-xr-x 3 root root 4096 Feb 25 11:01 after drwxr-xr-x 2 root root 4096 Feb 25 11:01 ansi-regex drwxr-xr-x 2 root root 4096 Feb 25 11:01 ansi-styles
这里我统一用户为es
[root@biluos es]# chown -R es:es elasticsearch-head-master/
然后使用es用户,安装成功
[root@biluos elasticsearch-head-master]# su es [es@biluos elasticsearch-head-master]$ npm install > phantomjs-prebuilt@2.1.16 install /home/es/elasticsearch-head-master/node_modules/phantomjs-prebuilt > node install.js PhantomJS not found on PATH Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2 Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 Receiving... [=============---------------------------] 33 [===================================-----] 87% Received 22866K total. Extracting tar contents (via spawned process) Removing /home/es/elasticsearch-head-master/node_modules/phantomjs-prebuilt/lib/phantom Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1519527928056/phantomjs-2.1.1-linux-x86_64 -> /home/es/elasticsearch-head-master/node_modules/phantomjs-prebuilt/lib/phantom Writing location.js file Done. Phantomjs binary available at /home/es/elasticsearch-head-master/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN elasticsearch-head@0.0.0 license should be a valid SPDX license expression npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) added 70 packages in 84.93s [es@biluos elasticsearch-head-master]$
8.grunt server
[es@biluos elasticsearch-head-master]$ grunt server (node:6612) ExperimentalWarning: The http2 module is an experimental API. Running "connect:server" (connect) task Waiting forever... Started connect web server on http://localhost:9100
9.http://192.168.10.173:9100/ 成功
10.启动我们的elasticsearch
[es@biluos elasticsearch-6.2.0]$ bin/elasticsearch [2018-02-25T11:11:14,998][INFO ][o.e.n.Node ] [node-1] initializing ... [2018-02-25T11:11:15,117][INFO ][o.e.e.NodeEnvironment ] [node-1] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [6.2gb], net total_space [25.4gb], types [rootfs] [2018-02-25T11:11:15,117][INFO ][o.e.e.NodeEnvironment ] [node-1] heap size [1.9gb], compressed ordinary object pointers [true] [2018-02-25T11:11:15,182][INFO ][o.e.n.Node ] [node-1] node name [node-1], node ID [Wquj4gYuTteo7M5uXzSBiQ]
2.2. 安装Kibana
参考windows下安装:http://blog.csdn.net/qq_21383435/article/details/792866211.下载linux
https://www.elastic.co/downloads/kibana
2.解压
/home/es/kibana
[root@biluos kibana]# pwd /home/es/kibana [root@biluos kibana]# cd ../ [root@biluos es]# ll total 12 drwxr-xr-x 4 es es 4096 Feb 9 14:55 elasticsearch drwxr-xr-x 7 es es 4096 Feb 25 11:05 elasticsearch-head-master drwxr-xr-x 4 root root 4096 Feb 10 11:56 kibana [root@biluos es]#
这里是root用户,但是用户不影响启动kibana
3.修改配置
[root@biluos kibana-6.2.1-linux-x86_64]#vim config/kibana.yml elasticsearch.url: "http://192.168.10.173:9200" server.host: "192.168.10.173"
elasticsearch.url:是我们连接那个es
server.host:是kibana运行的地址
4.直接运行
[root@biluos kibana-6.2.1-linux-x86_64]# bin/kibana log [03:21:34.590] [info][status][plugin:kibana@6.2.1] Status changed from uninitialized to green - Ready log [03:21:34.662] [info][status][plugin:elasticsearch@6.2.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch log [03:21:34.669] [info][status][plugin:xpack_main@6.2.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch log [03:21:34.683] [info][status][plugin:searchprofiler@6.2.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
5.查看界面 http://192.168.10.173:5601 运行成功
相关文章推荐
- 14-win10下ElasticSearch.6.1.0与head、Kibana、X-Pack、SQL、IK、PINYIN插件的配置安装
- 20-linux下ElasticSearch.6.2.2集群安装与head、Kibana、X-Pack..插件的配置安装
- win10下ElasticSearch5.5.1 head sql ik kibana x-pack安装
- windows-elasticsearch5.1.1及head, ik, pinyin插件安装
- elasticsearch5.5.X 的head插件安装(没成功……按kibana和x-pack去了)
- Windows下ElasticSearch(5.5.2)及head,ik,pinyin插件的安装
- RHEL7.3(Redhat) 安装配置 ElasticSearch5.5.1、ElasticHead、kibana5.5.1、X-Pack
- 【elasticsearch】elasticsearch 2.x 环境搭建以及常用插件(head,hq,ik)安装
- 在Linux安装elasticsearch的head插件
- Elasticsearch6.2、head插件、x-pack安全模块(security机制)安装
- Elasticsearch 监控插件安装(elasticsearch-head与Kibana)
- linux(centos 7)下安装elasticsearch - head插件(端口占用,防火墙关闭)
- 安装kibana,X-pack和elasticsearch插件的全过程
- elasticsearch head和ik插件安装
- elasticsearch5.0集群+kibana5.0+head插件插件的安装
- Elasticsearch-ES 5.x (Head,Kibana,X-Pack) 集群的部署、配置、测试
- elasticsearch插件安装之--linux下安装及head插件
- ElasticSearch安装及HEAD插件配置
- ElasticSearch 5.5.0 head插件的配置安装
- 基于本地开发windows环境安装Elasticsearch6.0版本、head插件、ik以及pinyin插件全教程