To install Elasticsearch on your Ubuntu 24.04 system, follow these steps:
Step 1 : First, ensure your package list and installed packages are up to date:
sudo apt update
Step 2 : Install apt-transport-https
sudo apt install apt-transport-https
Step 3 : Install Elasticsearch GPG Key
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg
Step 4 : Add the Elasticsearch repository
echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list
Step 5 : Update package index again
sudo apt update
Step 6 : Install Elasticsearch
sudo apt install elasticsearch
Step 7 : Open /etc/elasticsearch/elasticsearch.yml
sudo nano /etc/elasticsearch/elasticsearch.yml
And edit the line xpack.security.enabled
xpack.security.enabled: true
Step 8 : Start Elasticsearch
sudo systemctl start elasticsearch
Step 9 : Enable Elasticsearch to start on boot
sudo systemctl enable elasticsearch
Step 10 : Reset the password for the elastic user
sudo /usr/share/elasticsearch/bin/elasticsearch-setup-passwords interactive
Step 11 : Verify installation by accessing Elasticsearch via curl
curl -k -u elastic:password https://localhost:9200
Congratulations! You have successfully installed and configured Elasticsearch on your Ubuntu 24.04 system.
Recommended
![How to Install Ubuntu Server 24.04](https://api.devtutorial.io/uploads/2024-03-14/65f2cec9d5274.small.jpg)
Mar 14, 2024
![How to Update Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-14/65f31ce6731ae.small.jpg)
Mar 14, 2024
![How to Enable SSH on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-14/65f31d5688179.small.jpg)
Mar 14, 2024
![How to Enable Root Login Via SSH on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-14/65f320d568b02.small.jpg)
Mar 14, 2024
![How to Enable SSH Password Login on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-14/65f32212a3bc2.small.jpg)
Mar 14, 2024
![How to Set or Change Hostname on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-14/65f326eec5f87.small.jpg)
Mar 14, 2024
![How to Create a Swap File on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-14/65f3446100147.small.jpg)
Mar 14, 2024
![How to Configure SSL for Apache on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-15/65f3f4f551f02.small.jpg)
Mar 15, 2024
![How to Install MariaDB on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-15/65f3fe7135af6.small.jpg)
Mar 15, 2024
![How to Install Nginx on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-15/65f43dd2ca46b.small.jpg)
Mar 15, 2024
![How to Configure SSL for Nginx on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-15/65f4593fd29ba.small.jpg)
Mar 15, 2024
![How to Install PHP 8.3 for Nginx on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-16/65f512ad4086e.small.jpg)
Mar 16, 2024
![How to Install Node.js on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-17/65f6511a5e1f4.small.jpg)
Mar 17, 2024
![How To Install NVM on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-17/65f6991d4ddf3.small.jpg)
Mar 17, 2024
![How to Install Yarn on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-17/65f656027d55f.small.jpg)
Mar 17, 2024
![How to Install PM2 in Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-17/65f69c3ad6554.small.jpg)
Mar 17, 2024
![How to Setup SFTP Server on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-17/65f659ae697c2.small.jpg)
Mar 17, 2024
![How to Install vsftpd FTP Server on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-17/65f6b59eba85f.small.jpg)
Mar 17, 2024
![How to Install PHP 7.2 on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-05-02/663324c9362c3.small.jpg)
May 02, 2024
![How to Install PHP 7.4 on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-05-02/66332705418bc.small.jpg)
May 02, 2024
![How to Install PHP 8.0 on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-05-02/66333783e162e.small.jpg)
May 02, 2024
![How to Install PHP 8.2 on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-05-02/663338cb7a340.small.jpg)
May 02, 2024
![How to Install PHP 8.3 on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-05-02/66333ab801108.small.jpg)
May 02, 2024
![How To Install Docker on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-17/65f68e73bf9e7.small.jpg)
Mar 17, 2024
![How to Install and Use Podman on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-17/65f6902ed188c.small.jpg)
Mar 17, 2024
![How to Install and Use rsync on ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-19/65f98c8c0ff4e.small.jpg)
Mar 19, 2024
![How to Install Git on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-19/65f98fd1767f9.small.jpg)
Mar 19, 2024
![How to Install Neofetch on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-20/65faeae13e914.small.jpg)
Mar 20, 2024
![How To Install Elasticsearch on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-19/65f996a915c72.small.jpg)
Mar 19, 2024
![How to Install Usermin on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-19/65f9ba0206f3a.small.jpg)
Mar 19, 2024
![How to Install Webmin on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-20/65faa57ac6801.small.jpg)
Mar 20, 2024
![How To Install Memcached on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-20/65fa789b4789a.small.jpg)
Mar 20, 2024
![How to Install RabbitMQ on Ubuntu 24.04](https://api.devtutorial.io/uploads/2024-03-20/65fa60115de41.small.jpg)
Mar 20, 2024