ElasticSearch安装记录

http://blog.csdn.net/laigood12345/article/category/1113868




1.下载安装包https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.2.zip


2.解压

root@bt:/opt/elasticsearch-0.19.2#unzip elasticsearch-0.19.2.zip

3.运行

root@bt:/opt/elasticsearch-0.19.2# bin/elasticsearch  //后台运行

root@bt:/opt/elasticsearch-0.19.2# bin/elasticsearch -f //前台运行

4.环境变量

ES_JAVA_OPTS

ES_HEAP_SIZE

ES_MIN_MEM(defaults to 256m)

ES_MAX_MEM(defaults to 1gb)

5.命令行参数

$bin/elasticsearch -f -Xmx2g -Xms2g -Des.index.storage.type=memory

-X and -D

When set,both override anything set using either JAVA_OPTS or ES_JAVA_OPTS

6.Running As a Service

下载elasticsearch-servicewrapper https://github.com/elasticsearch/elasticsearch-servicewrapper


解压到elasticsearch/bin目录下

root@bt:/opt/elasticsearch-0.19.2# bin/service/elasticsearch console  //控制台启动

root@bt:/opt/elasticsearch-0.19.2# bin/service/elasticsearchstart  //后台启动

root@bt:/opt/elasticsearch-0.19.2# bin/service/elasticsearchstop  //停止服务

root@bt:/opt/elasticsearch-0.19.2# bin/service/elasticsearchinstall  //Install elasticsearchto run on system startup (init.d / service).

root@bt:/opt/elasticsearch-0.19.2# bin/service/elasticsearchremove  //Removes elasticsearchfrom system startup (init.d / service).

7.重要配置

修改limits.conf,设置最大打开文件数和memlock限制

vim/etc/security/limits.conf

*   soft   nofile  unlimited

*   hard   nofile  unlimited

*   -  memlock unlimited

ulimit -lunlimited

ulimit -n100000

 

设置ES能够分配的JVM内存大小,建议MIN和MAX设置一样大,避免频繁的分配内存(默认单位MB),根据服务器内存的大小,一般分配60%左右。

root@bt:/opt/elasticsearch-0.19.2#vim bin/service/elasticsearch.conf

set.default.ES_MIN_MEM=256

set.default.ES_MAX_MEM=1024

 

锁定内存

root@bt:/opt/elasticsearch-0.19.2#vim config/elasticsearch.yml

 bootstrap.mlockall: true

 

8.安装elasticsearch-head

elasticsearch/bin/plugin-install mobz/elasticsearch-head

open http://localhost:9200/_plugin/head/

 

9.安装bigdesk

bin/plugin -installlukas-vlcek/bigdesk

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值