• 如何在Linux上安装ElasticSearch


    如何在Centos上安装ElasticSearch
    步骤1:更新CentOS 7 Linux
    sudo yum -y update
    sudo reboot
    步骤2:在CentOS上安装Java
    sudo yum -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel
    设置JAVA路径
    cat <<EOF | sudo tee /etc/profile.d/java8.sh
    export JAVA_HOME=/usr/lib/jvm/jre-openjdk
    export PATH=$PATH:$JAVA_HOME/bin
    export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
    EOF
    source /etc/profile.d/java8.sh
    步骤3:添加ElasticSearch Yum存储库
    cat <<EOF | sudo tee /etc/yum.repos.d/elasticsearch.repo
    [elasticsearch-7.x]
    name=Elasticsearch repository for 7.x packages
    baseurl=https://artifacts.elastic.co/packages/oss-7.x/yum
    gpgcheck=1
    gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
    enabled=1
    autorefresh=1
    type=rpm-md
    EOF
    步骤4:在CentOS上安装ElasticSearch
    sudo yum -y install elasticsearch-oss
    步骤5:在Centos上启用ElasticSearch
    sudo systemctl enable --now elasticsearch
    步骤6:检查ElasticSearch是否正在运行
    curl http://127.0.0.1:9200
    2、如何在Ubuntu上安装ElasticSearch
    步骤1:将Elastic source列表添加到sources.list.d
    curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add
    echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
    步骤2:更新Apt
    sudo apt update
    步骤3:安装Elasticsearch
    sudo apt install elasticsearch
    步骤4:在Ubuntu上启用Elasticsearch
    sudo systemctl enable --now elasticsearch
    步骤5:检查Elasticsearch是否在Ubuntu上运行
    curl http://127.0.0.1:9200。

    A5互联https://www.a5idc.net/

  • 相关阅读:
    redis的事务不是原子性
    Jenkins持续集成 入门实践
    Docker入门实践
    程序员该有的职业素养
    ubuntu sudoers配置错误
    日志分析工具 Log Parser
    压力测试记录
    Winscp使用sudo user登录
    Linux下通过NFS共享文件夹
    Jexus 5.4.6 on CentOS 6.6
  • 原文地址:https://www.cnblogs.com/a5idc/p/13677373.html
Copyright © 2020-2023  润新知