前提搭建好python和nodejs
Python安装https://blog.csdn.net/rj2012001/article/details/121813956?spm=1001.2014.3001.5501
Node.js(简介版)https://blog.csdn.net/rj2012001/article/details/121810194?spm=1001.2014.3001.5501
1.在usr/lcoal建立elasticsearch文件夹
#mkdir -p /usr/local/elasticsearch
2.下载elasticsearch
ElasticSearch历史版本https://www.elastic.co/cn/downloads/past-releases/
进入/usr/local/elasticsearch目录下面,下载elasticsearch7.6.2(也可以选择其他版本)
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.6.2-linux-x86_64.tar.gz
或者下载后使用xftp7上传
Window下载https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.6.2-linux-x86_64.tar.gz3.解压,删除
//解压 tar zxvf elasticsearch-7.6.2-linux-x86_64.tar.gz //删除 rm -f elasticsearch-7.6.2-linux-x86_64.tar.gz
4.配置运行的内存(虚拟机就无所谓了)
#cd /usr/local/elasticsearch/elasticsearch-7.6.2/config 找到 jvm.options 对他进配置 ## JVM configuration ################################################################ ## importANT: JVM heap size ################################################################ ## ## You should always set the min and max JVM heap ## size to the same value. For example, to set ## the heap to 4 GB, set: ## ## -Xms4g ## -Xmx4g ## ## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html ## for more information ## ################################################################ # Xms represents the initial size of total heap space # Xmx represents the maximum size of total heap space 默认 -Xms1g -Xmx1g 修改 -Xms256m -Xmx256m 对于云服务器来说
5.elasticsearch默认是不许root账户启动
5.1有普通用户,比如:username
chown -R username:username /usr/local/elasticsearch/elasticsearch-7.6.2
5.2没有普通用户
#useradd '名字' #passwd '密码' #su '名字' chown -R '名字':'名字' /usr/local/elasticsearch/elasticsearch-7.6.2
6.0启动
./elasticsearch
开启外部访问,添加9200端口
https://blog.csdn.net/rj2012001/article/details/121674945?spm=1001.2014.3001.5501https://blog.csdn.net/rj2012001/article/details/121674945?spm=1001.2014.3001.5501



