Elasticsearch学习记录(一)

1. 安装Elasticsearch,从官网下载, 

也可使用 wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.4.tar.gz

2. 解压缩 tar -zxvf elasticsearch-6.2.4.tar.gz

3. 移动到opt下:mv elasticsearch-6.2.4 /opt/elasticsearch

4. elasticsearch不能使用root用户启动,需新创建新用户,

    root#groupadd elastic     

    root#useradd elastic   

    root#passwd elastic

授权 chown -R elastic /opt/elasticsearch

5. 修改配置文件:

vim /opt/elasticsearch/config/elasticsearch.yml
    cluster.name: elasticsear-test
    node.name: node-1
    network.host: 0.0.0.0
    http.port: 9200

6. 启动elasticsearch:/opt/elasticsearch/bin/elasticsearch

如果出错:max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

    切换到root用户:vim /etc/security/limits.conf, 添加 

        * soft nofile 65536
        * hard nofile 131072
        * soft nproc 2048
        * hard nproc 4096

添加之后需要重新切换一下用户

如果出错:max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

    切换到root用户:

        cat /etc/sysctl.conf |grep -v "vm.max_map_count"
        cat /etc/sysctl.conf |grep -v "vm.max_map_count" > /tmp/systemd-sysctl.conf
        echo "vm.max_map_count=262144" >> /tmp/systemd-sysctl.conf
        mv /tmp/systemd-sysctl.conf /etc/sysctl.conf

    7. 防火墙添加例外:

    firewall-cmd --add-port=9200/tcp --permanent --zone=public
    firewall-cmd --reload

    

elasticsearch 学习笔记包括以下内容: 一、Elasticsearch概述: - Elasticsearch是一种开源的分布式搜索和分析引擎,可以用于快速搜索、分析和存储大量的结构化和非结构化数据。 - Elasticsearch与Solr相比有一些区别,包括用户、开发和贡献者社区的规模和成熟度等方面。 二、Elasticsearch安装: 1. 下载Elasticsearch,可以从官方网站或华为云镜像下载。 2. 安装Elasticsearch。 三、安装head插件: - head插件是一个可视化的管理界面,可以方便地管理和监控Elasticsearch集群。 四、安装Kibana: 1. Kibana是一个开源的数据可视化工具,用于展示和分析Elasticsearch中的数据。 2. 下载Kibana并安装。 3. 启动Kibana并进行访问测试。 4. 可选的汉化操作。 五、ES核心概念理解: - 学习ES的核心概念,包括索引、文档、映射、查询等。 以上是elasticsearch学习笔记的主要内容,希望对你有帮助。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* *3* [Elasticsearch 学习笔记(上)](https://blog.csdn.net/m0_52691962/article/details/127064350)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 100%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值