ElasticSearch 7.17.5部署
ElasticSearch 部署
官方文档:https://www.elastic.co/guide/en/elasticsearch/reference/7.17/rpm.html https://blog.csdn.net/qq_43597256/article/details/126873923
下载安装包:
cd /app
tar xf elasticsearch-7.17.5-linux-x86_64.tar.gz
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.17.5-linux-x86_64.tar.gz
安装java
yum -y install java-21
配置jvm
vim /app/elasticsearch-7.17.5/config/jvm.options
-Xms1g
-Xmx1g
配置es
[root@shpvltbpmap002 config]# cat /app/elasticsearch-7.17.5/config/elasticsearch.yml |grep -v ^#
cluster.name: carizon--baiteda-test-application
node.name: baiteda-test-node-1
http.port: 9200
cluster.initial_master_nodes: ["baiteda-test-node-1"]
创建启动用户
useradd es
Elasticsearch启动脚本
vim /usr/lib/systemd/system/elasticsearch.service
[Unit]
Description=Elasticsearch Service
After=network.target
[Service]
Type=forking
User=es
ExecStart=/app/elasticsearch-7.17.5/bin/elasticsearch -d
[Install]
WantedBy=multi-user.target
选项说明
------ -----------
-e<KeyValuePair>配置设置
-v,--version打印Elasticsearch版本信息并退出
-d,--daemonize在后台启动Elasticsearch
-h,--help显示帮助
-p,--pidfile<Path>在开始时在指定路径中创建一个pid文件
-q,--安静关闭在控制台中记录的标准输出/错误流
-s,--mol显示最小输出
-v,--verose显示详细输出
设置用户名密码 https://blog.csdn.net/xfp1007907124/article/details/126994137