ubuntu搭建Elasticsearch过程与问题

本文档详细记录了在Ubuntu上安装Elasticsearch 8.0.0的过程,包括下载、解压、配置文件修改,以及在安装过程中遇到的root权限问题、文件权限错误、内存限制错误和HTTPS通道错误的解决方法。
摘要由CSDN通过智能技术生成

目录

一.下载Elasticsearh

二.解压 创建需要的文件目录

三.修改配置文件

四.遇到的问题

1.root账号启动问题

2.创建文件不授权切换到非root用户test的时候报错

3.启动最后还是报错

4.浏览器请求http://localhost:9200 报错:received plaintext http traffic on an https channel, closing connection Netty4HttpChannel


一.下载Elasticsearh

Download Elasticsearch | Elastic

自己下载的 8.0.0 https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.0.0-linux-x86_64.tar.gz

 wget https://artifacts.elastic.co/downloads/logstash/logstash-8.0.0-linux-x86_64.tar.gz

二.解压 创建需要的文件目录

tar -zxvf elasticsearch-8.0.0-linux-x86_64.tar.gz 
mkdir /data/elasticsearch/data /data/elasticsearch/logs

chmod 777 /data/elasticsearch

三.修改配置文件

jvm.options 具体要不要添加不知道,看网上说要加就加,用的虚拟机所有用的1g,其他根据实际情况修改


################################################################
-Xms1g
-Xmx1g

################################################################

elasticsearch.yml 下面的地址用的是第二点创建的地址,修改xpack.security.enabled: false,修改enabled: false 否则访问的时候时候报错,文章最后会列出来遇到的报错

# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /data/elasticsearch/data
#
# Path to log files:
#
path.logs: /data/elasticsearch/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值