Elasticsearch是面向文档(document oriented)的,这意味着它可以存储整个对象或文档(document)。
它不仅仅是存储,还会索引(index)**每个文档的内容使之可以被搜索,你可以对文档(而非成行成列的数据)进行索引、搜索、排序、过滤。这种理解数据的方式与以往完全不同,这也是Elasticsearch能够执行复杂的全文搜索的原因之一。
[依赖]:JDK && NODEJS# download: https://www.elastic.co/cn/downloads/elasticsearch[安装]:wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.2.0-linux-x86_64.tar.gz:tar -zxvf elasticsearch-7.2.0-linux-x86_64.tar.gz -C /usr:cd elasticsearch-7.2.0[创建用户]// Elasticsearch 可以执行脚本文件, 为了安全性, 默认不允许通过 root 用户启动服务:groupadd es && useradd es -g es -p esroot # 增加 es 组, 并提添加es用户到该组:chown -R es:es elasticsearch-7.2.0/ # 给用户组设置目录权限:su es # 切换用户[run]: ./bin/elasticsearch -d// https://www.extlight.com/2017/09/27/Elasticsearch-%E5%9F%BA%E7%A1%80%E5%85%A5%E9%97%A8/// https://www.cnblogs.com/dreamroute/p/8484457.html// http://www.ruanyifeng.com/blog/2017/08/elasticsearch.html
[远程访问,需要修改其配置文件]-> vim config/elasticsearch.yml- network.host: 0.0.0.0[ERROR]ERROR: [4] bootstrap checks failed[1]: max file descriptors [4096] for elasticsearch process is too low,increase to at least [65535]# 原因:无法创建本地文件问题, 用户最大可创建文件数太小# vim /etc/security/limits.conf* soft nofile 65536* hard nofile 131072* soft nproc 2048* hard nproc 4096# * 代表Linux所有用户名称, 保存、退出、重新登录才可生效# ulimit -n 65536[2]: max number of threads [3802] for user [es] is too low, increase to at least [4096]# 原因:无法创建本地线程问题,用户最大可创建线程数太小# vim /etc/security/limits.d/90-nproc.conf-> vim /etc/security/limits.conf* soft nproc 4096[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]# 原因:最大虚拟内存太小# vim /etc/sysctl.conf- vm.max_map_count=262144- sysctl -p[4]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured-> vim config/elasticsearch.ymlcluster.initial_master_nodes: ["node-1"]
