centos单节点elasticsearch安装

1.安装elasticsearch之前首先需要jdk8 的安装环境,前面文章已经介绍过。请自行查阅

2.下载elasticsearch对象版本。

3.将加载好的对应版本上传至服务器指定目录。

4.解压对应版本到指定目录

tar -zxvf elasticsearch-6.4.3.tar.gz 

5.创建用户组

groupadd xxx

6.新增系统用户

adduser es

7.设置新增系统用户密码

passwd ****

8.设置用户对es文件目录的授权

chown -R xxx:es /home/elasticsearch-6.4.3

9.修改文件权限

chmod -R 770 /home/elasticsearch-6.4.3

10.切换到xxx用户

su xxx

11.编辑es配置文件,并对data、logs文件授权

[root@es config]# mkdir -p /home/es/data
[root@es config]# mkdir -p /homg/es/logs
[root@es config]# chown -R xxx.es /home/es/data
[root@es config]# chown -R xxx.es /home/es/logs

12.后台启动

./elasticsearch -d 后台运行

 13.在chrom安装es插件实现监控

  在谷歌商店搜索:elasticsearch-head

安装接入如下图所示:

启动过程中可能出现错误:

ERROR: [2] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

解决方案:

文件最后增加:
vim /etc/security/limits.conf
es hard nofile 65536
es soft nofile 65536

 

posted @ 2019-08-23 12:06  启程华夏  阅读(99)  评论(0编辑  收藏  举报