Elasticsearch6.3版本开始支持sql,所以赶紧弄来玩玩,本文介绍RPM安装方式。
RPM安装可以从网上下载进行安装也可以通过RPM仓库进行安装,他可以在任何基于RPM的系统上进行安装,包括OpenSuSE, SLES, Centos, Red Hat, 和 Oracle Enterprise。
注意:RPM安装方式不支持旧版本的操作系统,如SLES 11 ,CentOS 5,请用zip,tar.gz进行安装。
Elasticsearch需要Java8以上版本。
1.安装
1.1从RPM仓库安装
创建文件elasticsearch.repo(RedHat 系统在/etc/yum.repos.d/路径下,OpenSuSE系统在/etc/zypp/repos.d/路径下)
[elasticsearch-6.x]
name=Elasticsearch repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
用以下命令安装Elasticsearch:
sudo yum install elasticsearch centos系统跟老版本Redhat系统
sudo dnf install elasticsearch FedoraRedhat系统跟新版本Redhat系统
sudo zypper install elasticsearch OpenSUSE系统
centos系统跟老版本Redhat系统
sudo dnf install elasticsearch FedoraRedhat系统跟新版本Redhat系统
sudo zypper install elasticsearch OpenSUSE系统
1.2手动下载安装:
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.0.rpm
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.0.rpm.sha512
shasum -a 512 -c elasticsearch-6.3.0.rpm.sha512
sudo rpm --install elasticsearch-6.3.0.rpm
sudo rpm --install elasticsearch-6.3.0.rpm
校验成功会返回:elasticsearch-6.3.0.rpm: OK
RPM将配置文件、日志和数据目录放置在基于RPM的系统的适当位置
home目录 /usr/share/elasticsearch
bin目录 /usr/share/elasticsearch/bin
conf目录 /etc/elasticsearch /etc/sysconfig/elasticsearch
data目录 /var/