美文网首页
2018-08-23

2018-08-23

作者: DurianCoder | 来源:发表于2018-08-23 16:00 被阅读0次

## 0x01、ElasticSearch安装与配置

##### 1、下载ElasticSearch

```

$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.2.zip

$ unzip elasticsearch-6.3.2.zip

```

##### 2、配置es:修改conf文件夹下的elasticsearch.yml

```

# 配置host使外网可访问,不然ip:port不能访问,只能通过localhost:port

network.host: 0.0.0.0

http.port: 9200

```

##### 3、报错踩坑

- es的安全机制不能使用root用户启动,需要切换到其他用户

- 配置了host后运行es报错

```

ERROR: [3] bootstrap checks failed

[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

[2]: max number of threads [3780] for user [jiang] is too low, increase to at least [4096]

[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

```

解决方案:

```

error [1][2]

$ sudo vi /etc/security/limits.conf

# 添加一下4条配置

*              soft    nofile          65536

*              hard    nofile          65536

*              soft    nproc          4096

*              hard    nproc          4096

error:[3]

$ vi /etc/sysctl.conf

# 添加一下配置

vm.max_map_count=262144

$ sysctl -p 生效

```

##### 4、启动es

```

$ ./bin/elasticsearch

$ curl localhost/ip:9200

```

## 0x02、Kibana安装

##### 1、下载kibana,kibana需要和es版本对应

```

$ https://artifacts.elastic.co/downloads/kibana/kibana-6.3.2-linux-x86_64.tar.gz

```

##### 2、解压kibana

```

# sha1sum 查看软件的hash和完整性

$ sha1sum kibana-6.3.2-linux-x86_64.tar.gz

$ tar -zxvf kibana-6.3.2-linux-x86_64.tar.gz

```

##### 3、配置kibana

```

# 连接es

elasticsearch.url: "http://192.168.1.240:9250"

```

##### 4、运行kibana

```

$ ./bin/kibana

# 浏览器访问  localhost:5601

```

##### 5、Kibana用户手册

[Kibana官网用户手册](https://www.elastic.co/guide/cn/kibana/current/index.html)

## 0x03、Elasticsearch head安装

1、下载elasticsearch head

```

去github下载zip

$ wget  https://github.com/mobz/elasticsearch-head/archive/master.zip

```

2、安装es head 依赖的nodejs 环境

[node.js教程](http://www.runoob.com/nodejs/nodejs-install-setup.html)

```

$ wget https://npm.taobao.org/mirrors/node/v10.8.0/node-v10.8.0-linux-x64.tar.xz

$ tar xf node-v10.8.0-linux-x64.tar.xz

```

3、配置nodejs环境变量

```

# 在/etc/profile添加以下两行

# config nodejs

NODE_HOME=/home/jiang/app/node-v10.8.0-linux-x64

PATH=$NODE_HOME/bin:$PATH

# 使配置文件生效

$ source /etc/profile

```

4、安装grunt

```

$ cd /elasticsearch-head-master

$ npm install -g grunt-cli

$ grunt -version

$ npm install

```

5、启动head

```

$ cd /elasticsearch-head-master

$ grunt server

浏览器访问: http://localhost:9100/

enjoy it...

```

相关文章

  • 设立具体的目标

    2018-08-23 戴师傅 2018-08-23 20:32 打开App (稻盛哲学学习会)打卡第120天 姓名...

  • 去掉烂模式,从自己做起

    幸福时刻(173)2018.8.23 利花花 关注 2018-08-23 11:20 · 字数 2049 · 阅读...

  • Day11 #100DaysofMLCoding#

    2018-08-23 24https://github.com/hse-aml/intro-to-dl以及如何用c...

  • 懂你 L4-U1-1-Dialogue

    流利说 D57 2018-08-23 四 一、复习 Level4-Unit1-Part1*Learning- Vo...

  • 2018-08-23

    《如何学习》四 41晓春 晓春的蜗居 2018-08-23 07:19 · 字数 412 · 阅读 0 · 日记本...

  • 设立具体的目标

    2018-08-23 (稻盛哲学学习会)打卡第101天 姓名:祝新华 部门:业务部 组别:待定 【知~学习】...

  • 设立具体的目标

    2018-08-23 (稻盛哲学学习会)打卡第140天 姓名:王燕君 部门:分水碶 组别:利他三组 【知~学习】 ...

  • Android集成友盟QQ分享闪退,IllegalStateEx

    问题: 集成友盟,分享到QQ,出现闪退。 手机:华为P10,操作系统:安卓 8.0 | 2018-08-23 22...

  • 2018-08-23

    2018-08-23 事件:今天单位同事一起聚餐。 感受:开心,感恩,感谢。 想法:这几年和大家在一起很开心,感恩...

  • 2018-08-23推广恩师课程

    2018-08-23推广恩师--小巫老师,小巫养育学堂的课程。非常感恩平台给到我的支持。感恩这份美好的相遇,越成长...

网友评论

      本文标题:2018-08-23

      本文链接:https://www.haomeiwen.com/subject/lqlmiftx.html