Elasticsearch是一个很是赞的实时分布式搜索和分析引擎。它能够帮助你用史无前例的速度去处理大规模数据。它能够用于全文搜索,结构化搜索以及分析等。更重要的是入门简单,api也比较清晰。根据官方的介绍,目前Wikipedia,Github和StackOverflow等都使用Elasticsearch进行搜索和分析。html
Elasticsearch是创建在全文搜索引擎Apache Lucene基础上的,能够说Lucene是当今最早进,最高效的全功能开源搜索引擎框架,可是Lucene只是一个框架,要充分利用它的功能,你须要很高学习成本,由于Lucene确实很是复杂。而Elasticsearch使用Lucene做为内部引擎,在其基础上封装了功能强大的RESTful API,让你不须要了解背后复杂的逻辑,便可完成搜索……shell
我当前安装的是最新版:elasticsearch-5.0.0.tar.gzapi
能够经过下载最新版:https://www.elastic.co/downloads/elasticsearch框架
$ useradd es $ passwd es #设置密码为123456
使用es账号,ssh登陆Centos后,执行以下命令:ssh
[es@master ~]$ tar -zxvf elasticsearch-5.0.0.tar.gz [es@master ~]$ mv elasticsearch-5.0.0 elasticsearch [es@master ~]$ ~/elasticsearch/bin/elasticsearch
便可。curl
5.验证安装elasticsearch
使用Xshell或iTerm2(这两个都是终端链接工具)复制一个窗口,执行以下命令:分布式
[es@master ~]$ curl http://localhost:9200 { "name" : "UxJOfFE", "cluster_name" : "elasticsearch", "cluster_uuid" : "u1m11oKORdOV25Me_oiK7g", "version" : { "number" : "5.0.0", "build_hash" : "253032b", "build_date" : "2016-10-26T04:37:51.531Z", "build_snapshot" : false, "lucene_version" : "6.2.0" }, "tagline" : "You Know, for Search" } [es@master ~]$
说明安装成功了。是否是很简单啊,这知识刚刚开始,若是想让es良好的运行提供做为生产环境的服务,还须要有漫长的调优过程哦。工具
6.1学习
max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
这是因为 vm.max_map_count 过小引发的,可使用
sysctl -w vm.max_map_count=262144
来临时调整这个数值。并用如下命令查看是否修改为功。
sysctl -a | grep "vm.max_map_count"
能够在sysctl.conf增长 vm.max_map_count=262144,而后使用
sysctl -p /etc/sysctl.conf
作永久调整。
6.2
max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
在Linux的系统中对于进程(Process)会有一些限制,你可使用 ulimit -Sn 和 ulimit -Hn 查看软硬限制。使用 root 账号调整便可,具体的调整方法能够看这篇文章:《使用ulimit 命令能够分别查看软限制和硬限制》
http://keenwon.com/1359.html
http://blog.csdn.net/u012371450/article/details/51776505