Linux系统下安装elasticsearch5.7.1
安装elasticsearch
1、创建分组和用户
groupadd elasticsearch && useradd elasticsearch -g elasticsearch -p elasticsearch(密码自己设置)
2、解压
tar -zxvf elasticsearch-7.5.1-linux-x86_64.tar.gz
3、移动文件夹
mv elasticsearch-7.5.1 /home/elasticsearch/
4、文件夹授权
chmod 777 -R /home/elasticsearch/elasticsearch-7.5.1
5、切换用户
su elasticsearch
6、修改配置
6.1 cd /home/ elasticsearch /elasticsearch-7.5.1/config
vi elasticsearch.yml 对应修改为:
path.data: /home/ elasticsearch /datasecurity/elasticsearch-7.5.1/data path.logs: /home/ elasticsearch /datasecurity/elasticsearch-7.5.1/logs network.host: 0.0.0.0 node.name: node-1 cluster.initial_master_nodes: ["node-1"]
6.2 cd /home/elasticsearch/elasticsearch-7.5.1/bin
vi elasticsearch.yml 在靠前位置添加下面配置
export JAVA_HOME=/home/ffcs/datasecurity/elasticsearch-7.5.1/jdk export PATH=$JAVA_HOME/bin:$PATH
7、启动,要在非root用户下才能启动
./elasticsearch &
安装elasticsearch,常见的报错
报错1
ulimit -a 命令查看当前系统的最大打开文件描述符数量
使用ulimit -n 数量,可以临时修改这个值
ulimit -n 65535
报错2
max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
这个是ES使用的虚拟内存,官方文档给出了解决方案:调大虚拟内存即可。
sudo sysctl -w vm.max_map_count=262144
报错3
[1]: 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
修改elasticsearch.yml文件
取消注释保留一个节点
cluster.initial_master_nodes: ["node-1"]
这个的话,这里的node-1是上面一个默认的记得打开就可以了
相关文章
- Linux安装软件整理
- 在kali linux之下安装wps之后 报错字体缺失
- Linux SSH登录慢案例分析
- Linux系统安装Apache 2.4.6
- linux安装jdk、tomcat、maven、mysql
- Linux系统安装NoSQL(MongoDB和Redis)步骤及问题解决办法
- 如何简化 Oracle Linux 上 Oracle Database 的安装
- linux fedora安装simplescreenrecorder
- kickstart批量安装Linux系统
- [Rust] 在 Linux 和 Mac 安装 Rust
- centos 6.3 安装svn服务端 window客户端 Linux客户端应用
- conda安装r Linux系统中 linux中安装r
- 02 从头开始atac项目 ubuntu20 install r4.2 Linux系统环境配置 服务器版本的rstudio r install in linux /ubuntu/centos
- Linux温馨提示1--安装U板块和Windwos划分
- 安装wps for linux无法启动
- Linux下安装、配置、启动Apache
- Linux CentOS7 安装FTP服务器
- Linux单系统安装
- Linux之SQL Server数据库安装
- 【Linux】系统中安装Go环境
- ngix入门 Linux系统Ubuntu ngix安装