/
Elasticsearch 7.9.3 Linux Installation

Elasticsearch 7.9.3 Linux Installation

System Requirements

  • Linux operating system with apt package manager
  • network connection with static ip address and (temporary) internet access
  • user-account with sudo rights

Installation Procedure

Files needed during the installation (plugins.zip, relevant files from the conf-directory, openjdk 11) can be found here: https://files.optimal-systems.org/index.php/s/Jtf9LwMLmFD4tWY
(Tested with Ubuntu 20.10: https://releases.ubuntu.com/20.10/ubuntu-20.10-live-server-amd64.iso)

  1. Download the needed files from the above link to the linux system and unzip.

    wget https://files.optimal-systems.org/index.php/s/Jtf9LwMLmFD4tWY/download -Ofiles.zip
    sudo apt install unzip
    unzip files.zip
  2. Add elasticsearch repository and install elasticsearch,

    sudo apt install apt-transport-https
    wget -qO esrepo https://artifacts.elastic.co/GPG-KEY-elasticsearch
    sudo apt-key add esrepo
    sudo add-apt-repository "deb https://artifacts.elastic.co/packages/7.x/apt stable main"
    sudo apt update
    sudo apt install elasticsearch=7.9.3
  3. Enable elasticsearch service

    sudo systemctl daemon-reload
    sudo systemctl enable elasticsearch.service
  4. Allow elasticsearch to lock all memory

    sudo mkdir -p /etc/systemd/system/elasticsearch.service.d/
    sudo nano /etc/systemd/system/elasticsearch.service.d/override.conf
    
    --> Enter the following lines:
    [Service]
    LimitMEMLOCK=infinity
    
    --> Save file (using STRG+X then Y)
    
    sudo systemctl daemon-reload
  5. Replace the installed JDK 11 with OpenJDK 11 in the elasticsearch folder

    sudo rm -rf /usr/share/elasticsearch/jdk
    cd Elasticsearch\ 7.9.3
    unzip jdk-11.0.10-ojdkbuild-linux-x64.zip
    sudo mv jdk-11.0.10-ojdkbuild-linux-x64 jdk
    sudo mv jdk /usr/share/elasticsearch/
  6. Unzip and copy the Intrafind plugins to the elasticsearch plugins folder

    unzip plugins.zip 
    sudo cp -r plugins/* /usr/share/elasticsearch/plugins/
    sudo chmod -R 755 /usr/share/elasticsearch
    sudo chown -R elasticsearch:elasticsearch /usr/share/elasticsearch
  7. Copy elasticsearch configuration 

    sudo cp conf/* /etc/elasticsearch/
  8. (optional) Change default java heap settings from 8 GB to desired value

    sudo nano /etc/elasticsearch/jvm.options
    • change values of lines -Xms and -Xmx to your desired value (values must be the same!).

  9. Configure settings in elastisearch.yml

    sudo nano /etc/elasticsearch/elasticsearch.yml
    • Check and/or change the following settings:
      • path.data: data directory
      • path.logs: log directory
      • cluster-name
      • node.name: must be unique over all nodes (if multiple exist)
      • cluster.initial_master_nodes: list of nodes for master quorum
      • discovery.seed_hosts: list of nodes to check for existing cluster

  10. Create data and logs directories

    sudo mkdir -p /opt/elasticsearch793/data
    sudo mkdir /opt/elasticsearch793/logs
    sudo chown -R elasticsearch:elasticsearch /opt/elasticsearch793
    1.  Replace the directory names with the paths configured in the previous step

  11. Start elasticsearch and check for errors

    sudo systemctl start elasticsearch.service
    
    #wait some seconds
    sudo systemctl status elasticsearch.service
    
    #once the "Active" status is "active (running)"
    sudo tail -f /opt/elasticsearch793/logs/es-red.log
    
    #once you see "license [<guid>] mode [basic] - valid" you can continue to the next step (use STRG+C to exit tail -f)
  12. If this is the only / first elasticsearch node, setup the built-in users passwords

    cd /usr/share/elasticsearch/bin
    sudo ./elasticsearch-setup-passwords auto -b > ~/built-in.usr
    less ~/built-in.usr 
  13. Note the password of the elastic user. It is needed for the service-manager setup.
    (For security reasons the built-in.usr file should be deleted after elasticsearch and the service-manager are installed and working ok.)

Related content

Elasticsearch 7.2.1 Linux Installation
Elasticsearch 7.2.1 Linux Installation
More like this
Elasticsearch 7.17.8 Linux Installation
Elasticsearch 7.17.8 Linux Installation
More like this
Elasticsearch 7.16.2 Linux Installation
Elasticsearch 7.16.2 Linux Installation
More like this
Elasticsearch 7.17.13 Linux Installation
Elasticsearch 7.17.13 Linux Installation
More like this
How to upgrade to yuuvis RAD 7.0
How to upgrade to yuuvis RAD 7.0
More like this
How to Upgrade to yuuvis RAD 8.0
How to Upgrade to yuuvis RAD 8.0
More like this