Skip to content

Instantly share code, notes, and snippets.

@netsensei
Created May 16, 2022 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save netsensei/0e3a773a0f1b9e0294e2d07a26de7c1e to your computer and use it in GitHub Desktop.
Save netsensei/0e3a773a0f1b9e0294e2d07a26de7c1e to your computer and use it in GitHub Desktop.
Installation and initial setup of Elasticsearch on Fedora

Installation and initial setup of Elasticsearch on Fedora

Installation of ES 6.8

$ sudo dnf install java-latest-openjdk
$ sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
$ cat <<EOF | sudo tee /etc/yum.repos.d/elasticsearch.repo
[elasticsearch-6.x]
name=Elasticsearch repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/oss-6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
EOF
$ sudo dnf install elasticsearch-oss
$ sudo systemctl start elasticsearch
$ sudo systemctl enable elasticsearch

Installation of ES7

$ 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

Configuring ES

# General options
$ sudo vim /etc/elasticsearch/elasticsearch.yml 
# Startup (memory, etc.)
$ sudo vim /etc/elasticsearch/jvm.options

Changing java versions

$ sudo dnf install java-11-openjdk 
$ sudo dnf install java-1.8.0-openjdk 
$ sudo alternatives --config java 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment