ElasticSearch安装到centos7
1.下载安装包
官方下载链接 进入官网之后选择所要下载的平台和版本并获取其相应的包链接
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.0.0-linux-x86_64.tar.gz
2.解压
tar -xzvf elasticsearch-8.0.0-linux-x86_64.tar.gz -C /usr/local/
3.修改配置
cd /usr/local/elasticsearch-8.0.0-linux-x86_64/config
vim elasticsearch.yml
3.1 指定日志文件路径
path.logs: /ssd1/elasticsearch-8.0.0/logs
3.2 指定数据目录
path.data: /home/es-data
3.3 修改访问ip地址限制
??注意:默认为127.0.0.1也就是只能本地访问。
network.host: 0.0.0.0
4. 运行
4.1 先新增非root用户
4.2 以非root用户身份登陆系统
su - 非root用户名
4.3 进入到ElasticSearch 安装目录下的bin目录
cd /usr/local/elasticsearch-8.0.0-linux-x86_64/bin
4.4 输入运行命令启动服务
./elasticsearch
初次启动时会遇到的问题汇总
问题1
max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
解决方法
问题2
ERROR: [2] bootstrap checks failed. You must address the points described in the following [2] lines before starting Elasticsearch. bootstrap check failure [1] of [2]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535] bootstrap check failure [2] of [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解决方法
相关链接
此项教程所借鉴的教程
|