• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to install Elasticsearch on Ubuntu 22.04

  • 00:43 lsb_release -a
  • 01:05 curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elastic.gpg
  • 01:20 echo "deb [signed-by=/usr/share/keyrings/elastic.gpg] https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
  • 01:36 apt update
  • 02:12 apt install elasticsearch
  • 03:35 systemctl daemon-reload
  • 03:52 systemctl enable elasticsearch
  • 04:07 systemctl start  elasticsearch
  • 04:28 systemctl status  elasticsearch
  • 04:46 vim /etc/elasticsearch/elasticsearch.yml
  • 05:36 systemctl restart  elasticsearch
  • 05:51 systemctl status  elasticsearch
7671

To install Elastic Search on Ubuntu 22.04

Introduction:

Elastic Search is a platform for distributed search and analysis of data in real time. It is a popular choice due to its usability, powerful features, and scalability. It is a modern search and analytics engine which is based on Apache Lucene. Its built with Java, Elasticsearch is a NoSQL database.

Procedure

Step 1: Check the OS version by using the below command

root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:    22.04
Codename:    jammy

Step 2: Use curl command for transferring data with URLs, to import the Elasticsearch public GPG key into APT.

root@linuxhelp:~# curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elastic.gpg

Step 3: Add the Elastic source list to the sources.list.d directory, where apt will search for new sources.

root@linuxhelp:~# echo "deb [signed-by=/usr/share/keyrings/elastic.gpg] https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
deb [signed-by=/usr/share/keyrings/elastic.gpg] https://artifacts.elastic.co/packages/7.x/apt stable main

Step 4: Update package lists by using the following command

root@linuxhelp:~# apt update
Get:1 https://artifacts.elastic.co/packages/7.x/apt stable InRelease [13.6 kB]
Hit:2 http://in.archive.ubuntu.com/ubuntu jammy InRelease                       
Get:3 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:4 http://in.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Get:5 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages [118 kB]   
Get:6 https://artifacts.elastic.co/packages/7.x/apt stable/main i386 Packages [85.1 kB]                          
Get:7 http://in.archive.ubuntu.com/ubuntu jammy-backports InRelease [109 kB]                         
Get:8 http://in.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1,103 kB]
Get:9 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [896 kB]
Get:10 http://in.archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages [515 kB]
Get:11 http://in.archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [239 kB]     
Get:12 http://in.archive.ubuntu.com/ubuntu jammy-updates/main amd64 DEP-11 Metadata [101 kB]    
Get:13 http://in.archive.ubuntu.com/ubuntu jammy-updates/main amd64 c-n-f Metadata [16.0 kB]      
Get:14 http://in.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [1,036 kB]     
Fetched 11.2 MB in 12s (916 kB/s)                                                                                     
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
91 packages can be upgraded. Run 'apt list --upgradable' to see them.

Step 5: Install the Elasticsearch by using the following command

root@linuxhelp:~# apt install elasticsearch
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libflashrom1 libftdi1-2 libllvm13
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
  elasticsearch
0 upgraded, 1 newly installed, 0 to remove and 91 not upgraded.
Need to get 323 MB of archives.
After this operation, 540 MB of additional disk space will be used.
Get:1 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 elasticsearch amd64 7.17.14 [323 MB]
Fetched 323 MB in 41s (7,951 kB/s)                                                                                    
Selecting previously unselected package elasticsearch.
(Reading database ... 202143 files and directories currently installed.)
Preparing to unpack .../elasticsearch_7.17.14_amd64.deb ...
Creating elasticsearch group... OK
Creating elasticsearch user... OK
Unpacking elasticsearch (7.17.14) ...
Setting up elasticsearch (7.17.14) ...
### NOT starting on installation, please execute the following statements to configure elasticsearch service to start a
utomatically using systemd
 sudo systemctl daemon-reload
 sudo systemctl enable elasticsearch.service
### You can start elasticsearch service by executing
 sudo systemctl start elasticsearch.service
Created elasticsearch keystore in /etc/elasticsearch/elasticsearch.keystore

Step 6: After the installation reload the daemon services

root@linuxhelp:~# systemctl daemon-reload

Step 7: Now enable the service by using the following command

root@linuxhelp:~# systemctl enable elasticsearch
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.

Step 8: Start the service by using the following command

root@linuxhelp:~# systemctl start  elasticsearch

Step 9: Check the status of the service by using the following command

root@linuxhelp:~# systemctl status  elasticsearch
● elasticsearch.service - Elasticsearch
     Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2023-10-21 08:12:19 IST; 37s ago
       Docs: https://www.elastic.co
   Main PID: 6817 (java)
      Tasks: 77 (limit: 4556)
     Memory: 2.1G
        CPU: 1min 48.427s
     CGroup: /system.slice/elasticsearch.service
             ├─6817 /usr/share/elasticsearch/jdk/bin/java -Xshare:auto -Des.networkaddress.cache.ttl=60 -Des.networkad>
             └─6999 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller

Oct 21 08:11:37 linuxhelp systemd[1]: Starting Elasticsearch...
Oct 21 08:11:45 linuxhelp systemd-entrypoint[6817]: Oct 21, 2023 8:11:45 AM sun.util.locale.provider.LocaleProviderAda>
Oct 21 08:11:45 linuxhelp systemd-entrypoint[6817]: WARNING: COMPAT locale provider will be removed in a future release
Oct 21 08:12:19 linuxhelp systemd[1]: Started Elasticsearch.

Step 10: Configure the elasticsearch.yml file by using the following command

root@linuxhelp:~# vim /etc/elasticsearch/elasticsearch.yml

Step 11: After the changes restart the elasticsearch service by using the following command

root@linuxhelp:~# systemctl restart  elasticsearch

Step 12: Check the status of the Elasticsearch service by using the following command

root@linuxhelp:~# systemctl status  elasticsearch
● elasticsearch.service - Elasticsearch
     Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2023-10-21 08:14:38 IST; 12s ago
       Docs: https://www.elastic.co
   Main PID: 7134 (java)
      Tasks: 60 (limit: 4556)
     Memory: 2.2G
        CPU: 1min 20.875s
     CGroup: /system.slice/elasticsearch.service
             ├─7134 /usr/share/elasticsearch/jdk/bin/java -Xshare:auto -Des.networkaddress.cache.ttl=60 -Des.networkad>
             └─7321 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller

Oct 21 08:14:04 linuxhelp systemd[1]: Starting Elasticsearch...
Oct 21 08:14:11 linuxhelp systemd-entrypoint[7134]: Oct 21, 2023 8:14:11 AM sun.util.locale.provider.LocaleProviderAda>
Oct 21 08:14:11 linuxhelp systemd-entrypoint[7134]: WARNING: COMPAT locale provider will be removed in a future release
Oct 21 08:14:38 linuxhelp systemd[1]: Started Elasticsearch.

Now go to the browser and search with your ip along with the port number you will see the following page SNAP 1

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to install Elasticsearch on Ubuntu 22.04. Your feedback is much welcome.

Tags:
michael
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

How to check Elasticsearch status?

A

Sending an HTTP request to the Elasticsearch API endpoint (usually http://localhost:9200 )

Q

Which is the Elasticsearch default port?

A

The default port of the Elasticsearch is 9200

Q

Where are Elasticsearch logs?

A

Elasticsearch writes logs to /var/log/elasticsearch

Q

What is the port range for Elasticsearch?

A

By default, Elasticsearch will use port 9200 for requests and port 9300 for communication between nodes within the cluster

Q

How to restart the Elasticsearch service?

A

By using the following command
# systemctl restart elasticsearch

Related Tutorials in How to install Elasticsearch on Ubuntu 22.04

Related Tutorials in How to install Elasticsearch on Ubuntu 22.04

How to install Meld tool in Ubuntu
How to install Meld tool in Ubuntu
Feb 25, 2017
How to install Dconf-Editor on Ubuntu 18.04
How to install Dconf-Editor on Ubuntu 18.04
Jul 14, 2018
How to install and update OpenSSL on Ubuntu 16.04
How to install and update OpenSSL on Ubuntu 16.04
Mar 9, 2017
How to install GLib 2.0 on Ubuntu 17.04
How to install GLib 2.0 on Ubuntu 17.04
May 22, 2017
How to Install Android Emulator on Ubuntu 20.4.1
How to Install Android Emulator on Ubuntu 20.4.1
Jul 13, 2021
How To Install AnyDesk on Ubuntu 16.04
How To Install AnyDesk on Ubuntu 16.04
Apr 4, 2018
How to install Genymotion 2.12.1 on Ubuntu 18.04
How to install Genymotion 2.12.1 on Ubuntu 18.04
Jul 9, 2018
How to install Timeshift 18.4 on Ubuntu 18.04
How to install Timeshift 18.4 on Ubuntu 18.04
Jul 6, 2018

Related Forums in How to install Elasticsearch on Ubuntu 22.04

Related Forums in How to install Elasticsearch on Ubuntu 22.04

Linux
jayce class=
shasum command not found
May 5, 2017
Ubuntu
matthew class=
Failed to enable unit: Refusing to operate on linked unit file sshd.service
Apr 15, 2019
Linux
stephan class=
How to list all samba users
Jan 12, 2018
Ubuntu
mason class=
Passwd: You may not view or modify password information for root On Ubuntu 19.04
May 27, 2019
Kibana
victorsamuel class=
Kibana server is not ready yet
Feb 1, 2019
Ubuntu
isaac class=
/etc/apt/sources.list Permission denied
May 18, 2017
pv command
muhammad class=
pvcreate command not found error
May 9, 2017
Linux
henry class=
Starting NFS daemon: rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)
Apr 25, 2017

Related News in How to install Elasticsearch on Ubuntu 22.04

Related News in How to install Elasticsearch on Ubuntu 22.04

Anbox, the Android-to-Linux tool the developers have been waiting for
Anbox, the Android-to-Linux tool the developers have been waiting for
Apr 17, 2017
How To Install Mixxx on Ubuntu 16.04
How To Install Mixxx on Ubuntu 16.04
Oct 11, 2017
Linus Torvalds stops signing Linux kernel RC tarballs
Linus Torvalds stops signing Linux kernel RC tarballs
May 17, 2017
Ubuntu 17.04 released with greater expectations
Ubuntu 17.04 released with greater expectations
Apr 15, 2017
Capsule8 Launches Linux-Based Container Security Platform
Capsule8 Launches Linux-Based Container Security Platform
Feb 14, 2017
Ubuntu Core now available on i.MX6 based TS-4900 thanks to Technologic Systems Inc.
Ubuntu Core now available on i.MX6 based TS-4900 thanks to Technologic Systems Inc.
Mar 1, 2017
Symantec updates Management console product
Symantec updates Management console product
Nov 22, 2017
Latest Linux driver release feature seven AMD Vega
Latest Linux driver release feature seven AMD Vega
Mar 23, 2017
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Luke ?
workbench for debian

I am using workbench in CentOS whereas now I need to use Debian Operating system so could you please help to install and use in Debian?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.