设备 应用部署 路径
1 | 192.168.1.54 | elasticsearch自带jdk、elasticsearch-7.10.2、opendistro相关插件、kibana | /data/apps
2 | 192.168.1.55 | elasticsearch自带jdk、elasticsearch-7.10.2、opendistro相关插件 | /data/apps
3 | 192.168.1.56 | elasticsearch自带jdk、elasticsearch-7.10.2、opendistro相关插件 | /data/apps
4 | 192.168.1.57 | elasticsearch自带jdk、elasticsearch-7.10.2、opendistro相关插件 | /data/apps
安装环境
centos 7.6
软件及插件
1.软件
elasticsearch-710.2-linux-x86_64.tar.gz
kibana-7.10.2-linux-x86_64.tar.gz
2.插件
opendistro-security-1.13.1.0.zip #安全插件,用于审计和鉴权
elasticsearch-analysis-ik-7.10.2.zip #索引分词器
elasticsearch-sql-7.10.2.0.zip #sql 查询插件 (也可以私用opendistro_sql,两个插件不兼容,只能用其一)
安装步骤
添加es管理用户
groupadd elasticsearch && useradd -d /home/elasticsearch -m elasticsearch -g elasticsearch
创建应用目录
mkdir -p /data/apps
修改打开文件句柄
echo "* soft nofile 1000000" >> /etc/security/limits.conf
echo "* hard nofile 1000000" >> /etc/security/limits.conf
echo "* soft nproc 1000000" >> /etc/security/limits.conf
echo "* hard nproc 1000000" >> /etc/security/limits.conf
echo "* soft memlock unlimited" >> /etc/security/limits.conf
echo "* hard memlock unlimited" >> /etc/security/limits.conf
sed -i 's/4096/1000000/' /etc/security/limits.d/20-nproc.conf
内核参数设置
cat >> /etc/sysctl.conf << EOF
net.ipv4.conf.all.send_redirects=0
net.ipv4.conf.default.send_redirects=0
net.ipv4.conf.all.accept_redirects=0
net.ipv4.conf.default.accept_redirects=0
net.ipv4.conf.all.secure_redirects=0
net.ipv4.conf.default.secure_redirects=0
net.ipv4.conf.all.rp_filter=1
net.ipv4.conf.default.rp_filter=1
net.ipv6.conf.all.accept_ra=0
net.ipv6.conf.default.accept_ra=0
net.ipv6.conf.all.accept_redirects=0
net.ipv6.conf.default.accept_redirects=0
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_fin_timeout=10
net.ipv4.tcp_max_syn_backlog = 32768
net.ipv4.tcp_max_tw_buckets = 180000
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.tcp_wmem = 4096 16384 4194304
net.core.wmem_default = 8388608
net.core.rmem_default = 8388608
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.core.netdev_max_backlog = 500000
fs.nr_open = 2500000
vm.zone_reclaim_mode = 0
vm.max_map_count = 655360
vm.swappiness=0
EOF
#执行生效
sysctl -p
1.esasticsearch 的下载路径
Past Releases of Elastic Stack Software | Elastic
2kibana的下载地址
Past Releases of Elastic Stack Software | Elastic
3.huawei 国内镜像源网站
在其中一个节点上下载
下载elasticsearch 和 kibana
wget -c -N https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/opendistro-security/opendistro-security-1.13.1.0.zip
wget -N https://d3g5vo6xdbdb9a.cloudfront.net/downloads/kibana-plugins/opendistro-security/opendistroSecurityKibana-1.13.0.1.zip
wget -N https://artifacts.elastic.co/downloads/ela