下载
https://www.elastic.co/cn/downloads/elasticsearch
上传压缩文件到/home目录
- 解压到【/usr/local】
[root@VM-0-13-centos elasticsearch-7.12.0]# tar -zxvf elasticsearch-7.12.0-linux-x86_64.tar.gz -C /usr/local
目录介绍
* bin:可执行文件在里面,运行es的命令就在这个里面,包含了一些脚本文件等
* config:配置文件目录
* JDK:java环境
* lib:依赖的jar,类库
* logs:日志文件
* modules:es相关的模块
* plugins:可以自己开发的插件
* data:这个目录需要自己创建,作为索引目录,mkdir data
修改配置文件elasticsearch.yml
[root@VM-0-13-centos config]# vim elasticsearch.yml
– BindTransportException[Failed to bind to 121.5.191.56:[9300-9400]]; nested: BindException[Cannot ass
针对这个错误网上各种解决办法,都是误导人的。常见的错误解决方法是把network.host 改成0.0.0.0或者127.0.0.1等,还有就是改成localhost 虽然能跑起来,但是外网还是不能访问的。
正确的解决办法是改成阿里云服务器的内网ip;记录备忘
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: my-application
#