elasticSearch学习安装

时间:2022-01-24 09:56:26
资料:
1.Elasticsearch学习,请先看这一篇!
https://blog.csdn.net/laoyang360/article/details/52244917
2. linux下elasticsearch 安装、配置及示例
https://blog.csdn.net/sinat_28224453/article/details/51134978
3.Linux下Elasticsearch-2.4.1的安装与简单配置(单节点)
https://blog.csdn.net/yx0628/article/details/53769224
4.全文搜索引擎 Elasticsearch 入门教程
http://www.ruanyifeng.com/blog/2017/08/elasticsearch.html
5.ELK_Elastic Search和kibana版本对应关系
https://blog.csdn.net/feifantiyan/article/details/53098896 默认端口:
ES:9200
Kibana:5601
Elastic安装:
windows:
简单
linux:
#单机模式和分布式模式
单机单节点:
1.
下载es版本为 2.4.1 版本,按资料3流程走,没问题,
2.//因需求6.1.1升级版本
报错: //内存之类太少,需要设置 参考:#https://blog.csdn.net/weini1111/article/details/60468068
//https://blog.csdn.net/u012371450/article/details/51776505
//https://www.jianshu.com/p/89f8099a6d09
max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
max number of threads [1024] for user [lishang] likely too low, increase to at least [2048]
system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk //修改limits.conf文件需要重新登录用户
配置文件: //配置文件实际只有3条
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
network.host: 0.0.0.0 kibana安装:
linux: python库的安装:
requests: //一个爬虫库,比urllib2简单
pip install requests
dateutil: //在dateutil中,吸引我的东西有2个,1个是parser,1个是rrule。
pip install python-dateutil 学习:
1.ES数据架构的主要概念(与关系数据库Mysql对比)
资料1中 1.6
2.
根据规划,Elastic 6.x 版只允许每个 Index 包含一个 Type,7.x 版将会彻底移除 Type。 查询语句: //参考: https://blog.csdn.net/pilihaotian/article/details/52452014
状态:
curl http://127.0.0.1:9200/_cat/health?v
列出所有索引:
curl 'localhost:9200/_cat/indices?v'
查询 //不指定返回10条 curl 'http://127.0.0.1:9200/coinmarket_coinnews_index_v1/coinmarket_coinnews_alias_v1/_search?q=*&pretty&size=50' curl -H "Content-Type: application/json" 'http://127.0.0.1:9200/coinmarket_coinnews_alias_v1/_search?pretty' -d '{
"query": { "match": { "source" : "coinpost" } }, "from":0, "size":50}' curl -H "Content-Type: application/json" 'http://127.0.0.1:9200/coinmarket_coinnews_alias_v1/_search?pretty' -d '{
"query": {
"match_all": {}
},
"from":0,
"size":25
}' 删除
curl -XDELETE 'localhost:9200/coinmarket_coinnews_index_v1?pretty' 问题:
1.ELK是什么?
ELK=elasticsearch+Logstash+kibana
elasticsearch:后台分布式存储以及全文检索
logstash: 日志加工、“搬运工”
kibana:数据可视化展示。
ELK架构为数据分布式存储、可视化查询和日志解析创建了一个功能强大的管理链。 三者相互配合,取长补短,共同完成分布式大数据处理工作。 response.xpath('//div[@class="_1xnd"]').css('._4-u2 ._4-u8').xpath('p/text()')