zoukankan      html  css  js  c++  java
  • 如何在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/

  • 相关阅读:
    7、css基本选择器、层叠样式
    6、表格标签及表单标签
    5、head内常用标签
    4、body内常用符号
    3、HTML简介
    2、HTTP协议
    Mbedtls和Opesnssl 解码x509Certificate
    Django 学习5--DetailView
    Django 学习四--bootstrap
    Django 学习3--CreateView
  • 原文地址:https://www.cnblogs.com/a5idc/p/13677373.html
Copyright © 2011-2022 走看看