记录Linux下安装elasticSearch时遇到的一些错误
http://blog.sina.com.cn/s/blog_c90ce4e001032f7w.html

标签: elasticsearch | 分类: 程序错误集锦 |
本人安装ElasticSearch的步骤完全参照
官方文档
来进行,在此仅记录下安装过程遇到的一些错误以及解决的办法。
错误一 cannot allocate memory
解决方案:
不能用root
用户登录来执行,切换为普通用户,
错误三 切换为普通用户后,权限不够
错误四 max virtual memory areas vm.max_count [65530] likely too low,increase to at least [26244]

解决方案: https://zhuanlan.zhihu.com/p/22241634?refer=dataeye

错误五 max file descriptors [4096] for elasticsearch process likely too low,increase to at least[65536]
elasticsearch安装参数配置注意事项
在elasticsearch安装时,有几个重要的参数配置需要我们注意:
1.文件描述
在http://www.elasticsearch.org/guide/reference/setup/installation/这样描述:
|
关于第一句话就是我们的文件描述符配置设置为32k或者64k,具体配置为:
在linux系统:
|
编辑该文件,后面加上:
|
备注:xq为用户名,同时确保xq用户拥有次命令权限
用vi 编辑bin/elasticsearch文件后面加入
|
这样在 运行命令
|
就可以看得文件描述符的大小了
2.内存设置
elasticsearch内存设置为:
|
这样可以elasticsearch确保使用物理内存,不使用linux swap 。
在
|
编辑该文件,后面加上:
|
备注:xq为用户名,同时确保xq用户拥有次命令权限
或者直接编辑/etc/profile文件,在后面加上
|
3.作为一个服务运行
请参考:elasticsearch service安装