bookmark_borderInstalling Elasticsearch on Debian 12

Hello,

In this week’s feature highlight, we look at How to Install Elasticsearch on Debian 12

Elasticsearch is a highly scalable open-source full-text search and analytics engine. It allows you to store, search, and analyze big volumes of data quickly and in near real-time. Elasticsearch is an open-source developed in Java and used by many big organizations around the world.

Install OpenJDK-11

First, update the packages index and install the OpenJDK-11 with the following commands.

apt update

OpenJDK packages are available under native apt repositories. You can simply use apt-cache search command to search the available java version for your Debian system.

apt-cache search openjdk

Output:

root@vps:~# apt-cache search openjdk
openjdk-17-dbg - Java runtime based on OpenJDK (debugging symbols)
openjdk-17-demo - Java runtime based on OpenJDK (demos and examples)
openjdk-17-doc - OpenJDK Development Kit (JDK) documentation
openjdk-17-jdk - OpenJDK Development Kit (JDK)
openjdk-17-jdk-headless - OpenJDK Development Kit (JDK) (headless)
openjdk-17-jre - OpenJDK Java runtime, using Hotspot JIT

Now install openjdk latest version,

apt-get install openjdk-17-jre

Output:

root@vps:~# apt-get install openjdk-17-jre
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  adwaita-icon-theme alsa-topology-conf alsa-ucm-conf at-spi2-common at-spi2-core ca-certificates-java dconf-gsettings-backend
  dconf-service fontconfig

After installation, check the version of JAVA.

java -version

Output:

root@vps:~# java -version
openjdk version "17.0.6" 2023-01-17
OpenJDK Runtime Environment (build 17.0.6+10-Debian-1)
OpenJDK 64-Bit Server VM (build 17.0.6+10-Debian-1, mixed mode, sharing)
root@vps:~#

Install Elasticsearch

Install GnuPG2 Package by running the following command.

apt-get install gnupg2 -y 

Import GPG key for Elasticsearch packages.

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

Output:

root@vps:~# wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK
root@vps:~# 

Next, add the Elasticsearch repository to the system by the following command.

sh -c 'echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" > /etc/apt/sources.list.d/elastic-7.x.list'

After adding the repository to your system. Update cache and then install Elasticsearch packages on your system.

apt update 

apt install elasticsearch

Output:

root@vps:~# apt install elasticsearch
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  elasticsearch

After installing the Elasticsearch package, Start and enable the elasticsearch service with the following command.

systemctl start elasticsearch.service

systemctl enable elasticsearch.service

Output:

root@vps:~# systemctl enable elasticsearch.service
Synchronizing state of elasticsearch.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable elasticsearch
Created symlink /etc/systemd/system/multi-user.target.wants/elasticsearch.service → /lib/systemd/system/elasticsearch.service.
root@vps:~# 

Configure Elasticsearch

Once the elasticsearch has been installed on your system, open the elasticsearch.yml configuration file.

nano /etc/elasticsearch/elasticsearch.yml 

Search for the line that contains network.host, uncomment it, and change the value to 0.0.0.0.

Set the network host to 0.0.0.0 to listen on all interfaces and make it available publicly,

network.host: 0.0.0.0

In case you want to configure this to be private/local to your machine. You will have to set the network.host to 127.0.0.1, so the content is not public.

Add discovery.type: single-node under the discovery section,

discovery.type: single-node

Save and exit the file once modified and restart the Elasticsearch service for the changes to take effect.

systemctl restart elasticsearch

Install and enable firewall using below command,

apt install ufw -y

ufw enable 

Output:

Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startup
root@vps:~# 

Now, allow the port and reload the firewall using the following command.

ufw allow 9200

ufw reload  

Output:

root@vps:~# ufw allow 9200
Rules updated
Rules updated (v6)
root@vps:~# ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startup
root@vps:~# 

Enter it into your browser’s to the server hostname or IP address followed by port #9200

http://<your_server_IP>:9200

Output:

{
  "name" : "vps.server.com",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "Njc30wnCRsOXSECsvnlmdA",
  "version" : {
    "number" : "7.17.10",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "fecd68e3150eda0c307ab9a9d7557f5d5fd71349",
    "build_date" : "2023-04-23T05:33:18.138275597Z",
    "build_snapshot" : false,
    "lucene_version" : "8.11.1",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

Done!

bookmark_borderJanuary 2023 CentOS Templates Updated for KVM

Greetings, As part of our commitment to provide you with the latest and most ready-to-use service, we’ve updated the following templates for CentOS 7, CentOS 8-Stream, and CentOS 9-Stream.

This template update process ensures that any new VPS deployed will come along with the latest available packages so you don’t have to spend time running a large initial update.

As always, any existing VPS can be updated at any time by the user, you may follow our guide for the steps required to update your VPS, Click here.

If you require any assistance at any time, please feel free to contact our support team via the client area and we’ll help you out.

Follow us on CrownCloud BlogTwitter, and Facebook for updates regarding current offers and other updates.

Stay tuned for more! – Team CrownCloud

bookmark_borderAlmaLinux Templates Updated for KVM Plans

Greetings,

As part of our commitment to providing you with the latest and most ready-to-use service, we’ve updated our AlmaLinux Templates for AlmaLinux 8 and AlmaLinux 9.

This template update process ensures that any new VPS deployed will come along with the latest available packages so you don’t have to spend time running a large initial update.

As always, any existing VPS can be updated at any time by the user, you may follow our guide for the steps required to update your VPS, Click here.

If you require any assistance at any time, please feel free to contact our support team via the client area and we’ll help you out.

Follow us on the CrownCloud BlogTwitter, and Facebook for updates regarding current offers and other updates.

Stay tuned for further updates!

Team CrownCloud

bookmark_borderJanuary 2023 Rocky Linux Templates Updated for KVM

Greetings,

As part of our commitment to providing you with the latest and most ready-to-use service, we’ve updated the Rocky Linux Templates for Rocky Linux 8 and Rocky Linux 9.

This template update process ensures that any new VPS deployed will come along with the latest available packages so you don’t have to spend time running a large initial update.

As always, any existing VPS can be updated at any time by the user, you may follow our gfuide for the steps required to update your VPS, Click here.

If you require any assistance at any time, please feel free to contact our support team via the client area and we’ll help you out.

Follow us on CrownCloud BlogTwitter, and Facebook for updates regarding current offers and other updates.

Stay tuned for further updates!

Team CrownCloud

bookmark_borderJanuary 2023 ISOs Updated for KVM-Based Plans.

As part of our commitment to ensuring the latest operating system images are available for your usage, we have updated the ISOs for the following operating system images,

  • AlmaLinux 8/9
  • Rocky Linux 8/9
  • CentOS 7, 8-Stream, 9-Stream
  • Ubuntu 20.04, 21.04, 21.10, 22.04, 22.10
  • Archlinux x86_64
  • Debian 10/11 amd64
  • Fedora 36/37 x86_64
  • FreeBSD 12 amd64
  • gParted
  • GRML full
  • Netboot.xyz
  • SystemRescue CD
  • VirtIO Drivers

As always, any existing VPS can be updated at any time by the user, you may follow our guide for the steps required to update your VPS, Click here.

If you require any assistance at any time, please feel free to contact our support team via the client area and we’ll help you out.

Follow us on CrownCloud BlogTwitter, and Facebook for updates regarding current offers and other updates.

Stay tuned for further updates!

Team CrownCloud

bookmark_borderJuly 2022 Debian Templates Updated for KVM

Greetings,

As part of our commitment to providing you with the latest and most ready-to-use service, we’ve updated the Debian Templates and synced them to all KVM nodes.

This template update process ensures that any new VPS deployed will come along with the latest available packages so you don’t have to spend time running a large initial update.

July 2022 Debian Templates

Templates for the following distributions/operating systems have been updated,

  • Debian 10
  • Debian 11

As always, any existing VPS can be updated at any time by the user, you may follow our guide for the steps required to update your VPS, Click here.

If you require any assistance at any time, please feel free to contact our support team via the client area and we’ll help you out.

Follow us on CrownCloud BlogTwitter, and Facebook for updates regarding current offers and other updates.

Stay tuned for further updates!

Team CrownCloud

bookmark_borderJuly 2022 AlmaLinux Templates Updated for KVM

Greetings,

As part of our commitment to providing you with the latest and most ready-to-use service, we’ve updated the AlmaLinux Templates and synced them to all KVM nodes.

This template update process ensures that any new VPS deployed will come along with the latest available packages so you don’t have to spend time running a large initial update.

July 2022 AlmaLinux Templates

Templates for the following distributions/operating systems have been updated,

  • AlmaLinux 8
  • AlmaLinux 9

As always, any existing VPS can be updated at any time by the user, you may follow our guide for the steps required to update your VPS, Click here.

If you require any assistance at any time, please feel free to contact our support team via the client area and we’ll help you out.

Follow us on CrownCloud BlogTwitter, and Facebook for updates regarding current offers and other updates.

Stay tuned for further updates!

Team CrownCloud

bookmark_borderJuly 2022 Rocky Linux Templates Updated for KVM

Greetings,

As part of our commitment to providing you with the latest and most ready-to-use service, we’ve updated the Rocky Linux Templates and synced them to all KVM nodes.

This template update process ensures that any new VPS deployed will come along with the latest available packages so you don’t have to spend time running a large initial update.

July 2022 Rocky Linux Templates

Templates for the following distributions/operating systems have been updated,

  • Rocky Linux 8
  • Rocky Linux 9

As always, any existing VPS can be updated at any time by the user, you may follow our guide for the steps required to update your VPS, Click here.

If you require any assistance at any time, please feel free to contact our support team via the client area and we’ll help you out.

Follow us on CrownCloud BlogTwitter, and Facebook for updates regarding current offers and other updates.

Stay tuned for further updates!

Team CrownCloud

bookmark_borderJuly 2022 CentOS Templates Updated for KVM

Greetings, As part of our commitment to provide you with the latest and most ready-to-use service, we’ve updated the following templates and synced them to all KVM nodes.

This template update process ensures that any new VPS deployed will come along with the latest available packages so you don’t have to spend time running a large initial update.

Templates for the following distributions/operating systems have been updated,

  • CentOS 7
  • CentOS Stream 8
  • CentOS Stream 9

As always, any existing VPS can be updated at any time by the user, you may follow our guide for the steps required to update your VPS, https://wiki.crowncloud.net/?update_centos_and_ubuntu_and_debian

If you require any assistance at any time, please feel free to contact our support team via the client area and we’ll help you out.

Stay tuned for more! – Team CrownCloud

bookmark_borderRocky Linux 9 ISO is now available for KVM Based Plans

Hey There!
We’re happy to announce that Rocky Linux 9 ISO is now available on our KVM-based plans in our control panel.

To know how to Mount and Install the new Operating System from our CrownPanel, checkout our wiki article here ,

Stay tuned for further updates!

Follow us on CrownCloud BlogTwitter, and Facebook for updates regarding current offers and other updates.