1818IP-服务器技术教程,云服务器评测推荐,服务器系统排错处理,环境搭建,攻击防护等

当前位置:首页 - Linux系统 - centos - 正文

君子好学,自强不息!

centos7安装Elasticsearch7

2023-02-25 | centos | 1818ip | 6250°c
A+ A-

  1.下载Elasticsearch7

   直接去官网下载.可慢了.下载了一个小时才下完.

  2.下载完了解压压缩包

tar -zxvf xxxx

  3.移动目录

mv elasticsearch-7.2.0   /usr/local/

  3.新建一个用户,es不让你用root.

useradd  es
passwd es
chown -R  es elasticsearch-7.2.0
4.修改配置文件
vim config/elasticsearch.yml
#修改为自己的ip
network.host: x.x.x.x
#把这个注释先放开
cluster.initial_master_nodes: ["node-1", "node-2"]

 5.启动

./elasticsearch

6.错误解决,如果出现以下错误.

[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[3]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

 

vim /etc/security/limits.conf
*               soft    nofile          65536
*               hard    nofile          65536
*               soft    nproc           4096
*               hard    nproc           4096
 
vi /etc/sysctl.conf
vm.max_map_count=262144
sysctl -p
至此可以启动了.


本文来源:1818IP

本文地址:https://www.1818ip.com/post/32821.html

免责声明:本文由用户上传,如有侵权请联系删除!

发表评论

必填

选填

选填

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。