源码安装:https://blog.csdn.net/_/article/details/
Java_JDK版本:11.0.8
ElasticSearch版本:7.8.1
ElasticSearch下载地址:https://www.elastic.co/cn/downloads/elasticsearch
1、创建文件夹:mkdir /usr/local/elasticsearch
cd /usr/local/elasticsearch
2、将rpm包下载到“ /usr/local/elasticsearch”
3、安装:rpm -ivh elasticsearch-7.8.1-x86_64.rpm
安装目录:/usr/share/elasticsearch
4、配置:vi /etc/elasticsearch/elasticsearch.yml
node.name: node-1 #节点名称 path.data: /var/lib/elasticsearch #数据目录,可以自行修改 path.logs: /var/log/elasticsearch #日志目录,可以自行修改 network.host: 192.168.70.128 #主机地址 http.port: 9200 #端口号 cluster.initial_master_nodes: ["node-1"]
5、给用户elasticsearch(安装时自动创建的用户)分配data目录和log目录权限:
chown elasticsearch:elasticsearch -R /var/log/elasticsearch
chown elasticsearch:elasticsearch -R /var/lib/elasticsearch
6、操作命令
systemctl start elasticsearch #启动
systemctl stop elasticsearch #停止
systemctl enable elasticsearch #开机自启动
7、安装中文分词器:ik
https://blog.csdn.net/_/article/details/
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/219313.html原文链接:https://javaforall.net
