Updating Elastic Search on Linux
Last modified:
1. Go to Elastic Search website to get the newest version
https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html
https://www.elastic.co/guide/en/kibana/current/deb.html
2. Check the repository definition inside the article:
3. Go to /etc/apt/sources.list.d (command cd /etc/apt/sources.list.d
) and check the repository definition of
Elastic You have by running ls
Delete the present file by running “rm {file name}” (example: rm elastic-8.x.list
).
4. After Your file is removed, run ls again to check if it is gone. The output should look like this:
5. After that, run this command from the from the article:
echo "deb <a href="https://artifacts.elastic.co/packages/8.x/apt">https://artifacts.elastic.co/packages/8.x/apt</a> stable main" |
sudo tee /etc/apt/sources.list.d/elastic-8.x.list
Make sure You have the whole line copied
6. After that, run ls again and check for the definition
7. After that is done, stop the Kibana service, and then stop the Elastic Search service with these commands:
sudo systemctl stop kibana.service
sudo systemctl stop elasticsearch.service
ALWAYS stop kibana first as to avoid creating unnecessary conflicts.
8. Run sudo apt-get update
to load in the updated repository
9. After that, run sudo apt upgrade elasticsearch
to update
Elastic Search
Say “y” to continuing
10. Do the same with Kibana by running sudo apt upgrade kibana
Say “y” to continuing
11. A prompt might pop up asking about a configuration file
Say “n” to that.
12. After that, You can start Your services again
13. Go to the address of Your elasticsearch
Press advanced
And continue to the address
login with the Elastic superuser account
After You login, check the displayed information to confirm that You have the up-to-date stable version of elastic installed
You will see your current Elastic Search version here
15. Go to Your Kibana address.
Login with the elastic superuser account
And press this icon on the top right corner to check the version
You will see the current Kibana version here
16. After that, stop Kibana by running sudo systemctl stop kibana.service
17. If both of the versions are matching, your update of Elastic Search is done!