首页 > 编程知识 正文

elasticsearch介绍,elasticsearch原理

时间:2023-05-03 15:30:33 阅读:127229 作者:564

Elasticsearch官方网站下载地址https://www.elastic.co/cn/downloads/elastic search

这里以CentOS7系统elasticsearch-7.14.0为例

单击版本号下载Linux-elasticsearch-7.14.0

安装Elasticsearch需要java环境

对于非根用户,elasticsearch-7.14.0不能由根用户运行

将安装elastic search-7.14.0-Linux-x86 _ 64.tar.gz压缩包上传到安装目录/usr/local/elastic并解压缩

启动tar-zxvfelasticsearch-7.14.0-Linux-x86 _ 64.tar.gzelasticsearch进入解压缩目录

运行CD/usr/local/elastic/elastic search-7.14.0启动命令

./elasticsearchelasticsearch为http://127.0.0.1:9200/

如下所示,启动成功

{ ' name ' : ' localhost.local domain ',' cluster _ name ' : ' elastic search ',' cluster _ uuuid ' 336524nx 6 ' build_flavor' : 'default ',' build _ type ' : ' tar ' ' build _ hash ' : ' DD 5a 0a2acaa 2045 ff 9624 f 3729 FCE ' build _ date ' : ' 2021-07-29t 20336049360007 ' build _ snapshot ' : false,' Lucene _ version ' 3: ' 8.9 ' minimum _ wire _ compatibility _ version ' ' minimum _ index _ compatibility _ version ' : '6.0.0- beta1' '

配置指定的ip访问

network.host :192.168.200.200所有ip访问

network.host:0.0更改启动异常network.host可能会导致启动失败

[2021-08-20t01336054336043, 959 ] [ info ] [ o.e.n.node ] [ localhost.local domain ] initialized [ 2021-08-08 ] 965 ] [ info ] [ o.e.n.nono starting . [ 2021-08-20t 01336054336043, 99 ) [ info ] [ o.e.x.s.c.f.persistent cache ] [ localhost.local domain ] persistent cacheindexloaded [ 2021-08 ] [ localhost.local domain ] publish _ address { 172.17.0.133609300 }, bound _ addresses { [ :3360 ] 33609300 } [ 2021-08-20t 01336054336045,012 ] [ info ] [ o.e.b.bootstrap checks boundorpublishingtoanon-loopback地址, enforcingbootstrapchecks [ 2021-08-20t 01336054336045,046 ] [ error ] [ o.e.b.bootstrap ] [ localhost.local domaimion bootstrapchecksfailed.youmustaddressthepointsdescribedinthefollowing [4] linesbeforestartingelasticsearch.bootstrap check : maxfiledescriptors [ 4096 ] forelasticsearchprocessistoolow, increasetoatleast [ 65535 ] bootstrapcheckfailure [2] of [4] : maxnumberofthreads [ 3795 ] foruser [ elastic ] istolow bootstrapcheckfailure [3] of [4] : maxvirtualmemoryareasvm.max _ map _ count [ 65530 ] Inc increasetoatleast [ 26214440 ] : thedefaultdiscoverysettingsareunsuitableforproductionusion atleast one of [ discovery.seed _ hosts,discovery.seed _ hosts cluster.initial _ master _ nodes ] must be configure 070 ) [ info ] [ o.e.n.node ] [ localhost.local domain ] stopping 13 ) [ info ] [ o.e.n.node ] [ localhost.local domain ] stopped [ 2021-08-20t 01336054336045,13 ] [ info ] [ o.e 关闭. [ 2021-08-20t 01336054336045, 144 ) [ info ] [ o.e.n.node ] [ localhost.local domain ] closed [ 2021-08-20t 01336054336045,151 ] [ info ] [ o.o nativecontrollerprocesshasstopped-nonewnativeprocessescanbestarted异常一maxfiledescriptors [ 4096 ] forelasticsearchprocessistoo

* soft nofile 65535 * hard nofile 65535异常二maxnumberofthreads [ 3795 ] foruser [ elastic ] istoolow,increase to at least [4096]为/

* soft nproc 4096* hard nproc 4096异常三maxvirtualmemoryareasvm.max _ map _ count [ 65530 ] istoolow,increase to at least [262144]

vm.max_map_count=262144异常四thedefaultdiscoverysettingsareunsuitableforproductionuse; atleast one of [ discovery.seed _ hosts,discovery.seed_providers,cluster.initial _ master _ nodes ] must be configerd

cluster.initial _ master _ nodes : [ ' node-1 ' ]更改这些重新启动Linux并启动Elasticsearch后,可以访问其他ip

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。