- 准备3台机器
192.168.1.41
192.168.1.42
192.168.1.43
因为es集群有几个节点,所以我对应node1,node2,node3.这几个名称并不是主机名,而是es节点名称
2. 开始部署,基础配置 (三台都做)
systemctl stop firewalld
systemctl disable firewalld
setenforce 0
sed -i "s/^SELINUX=enforcing/SELINUX=disabled/g" /etc/sysconfig/selinux
sed -i "s/^SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
sed -i "s/^SELINUX=permissive/SELINUX=disabled/g" /etc/sysconfig/selinux
sed -i "s/^SELINUX=permissive/SELINUX=disabled/g" /etc/selinux/config
echo "* soft nofile 65536" >> /etc/security/limits.conf
echo "* hard nofile 65536" >> /etc/security/limits.conf
echo "* soft nproc 65536" >> /etc/security/limits.conf
echo "* hard nproc 65536" >> /etc/security/limits.conf
echo "* soft memlock unlimited" >> /etc/security/limits.conf
echo "* hard memlock unlimited" >> /etc/security/limits.conf
echo "vm.max_map_count = 655360" >> /etc/sysctl.conf
sysctl -p
3.开始部署es集群
官网下载
我用的是 elasticsearch-8.2.3-linux-x86_64.tar.gz
8.0版本后,默认增加安全配置,默认启动就行
创建用户
出于安全考虑,elasticsearch默认不允许以root账号运行。
g