鲲鹏+麒麟适配elasticsearch

系统版本
Linux ecs-cd75 4.19.90-17.5.ky10.aarch64 #1 SMP Fri Aug 7 13:35:33 CST 2020 aarch64 aarch64 aarch64 GNU/Linux

源码包下下载

wget https://mirrors.huaweicloud.com/elasticsearch/7.8.0/elasticsearch-7.8.0-linux-aarch64.tar.gz
 

解压
tar -zxvf elasticsearch-7.8.0-linux-aarch64.tar.gz  -C /opt/idss

创建用户和目录
groupadd elastic
useradd -g elastic -s /bin/bash -d /home/elastic -m elastic
mkdir -p /opt/log/elastic/
mkdir -p /opt/data/elastic/

修改配置文件
vim /opt/idss/elasticsearch-7.8.0/config/elasticsearch.yml(视环境自定义参数
鲲鹏+麒麟适配elasticsearch_第1张图片
vim /opt/idss/elasticsearch-7.8.0/config/jvm.options(内存小,所以只给了2G,视环境自身定义
鲲鹏+麒麟适配elasticsearch_第2张图片

授权属组
chown -R elastic:elastic /opt/idss/elasticsearch-7.8.0/
chown -R elastic:elastic /opt/log/elastic/
chown -R elastic:elastic /opt/data/elastic/

配置启动文件
vim /usr/lib/systemd/system/elasticsearch.service

[Unit]
Description=elasticsearch service

[Service]
User=elastic
Group=elastic

Type=forking
ExecStart=/opt/idss/elasticsearch-7.8.0/bin/elasticsearch -p /opt/data/elastic/elasticsearch.pid --quiet
ExecStop=/elasticsearch/stop.sh
Restart=always
RestartSec=5
StartLimitInterval=0
LimitNOFILE=65536
LimitNPROC=4096
Environment=JAVA_HOME=/usr/java/jdk1.8.0_311-aarch64/
Environment=ES_HOME=/opt/idss/elasticsearch-7.8.0/
Environment=ES_PATH_CONF=/opt/idss/elasticsearch-7.8.0/config
Environment=PID_DIR=/opt/data/elastic

[Install]
WantedBy=multi-user.target         
鲲鹏+麒麟适配elasticsearch_第3张图片


加载及启动
systemctl daemon-reload

systemctl restart elasticsearch

systemctl status  elasticsearch

鲲鹏+麒麟适配elasticsearch_第4张图片

测试
鲲鹏+麒麟适配elasticsearch_第5张图片

你可能感兴趣的:(linux,运维)