Showing posts with the label elasticsearch

Completely uninstall elasticsearch in Linux

sudo apt-get remove elasticsearch sudo apt-get --purge autoremove elasticsearch sudo dpkg --remove elasticsearch sudo dpkg --purge elasticsearch sudo dpkg --purge --force-all elasticsearch sudo rm -rf /var/lib/elasticsearch/ sudo rm -rf /etc/elasticsearch If still facing any issues then you have to delete source file too. cd /etc/apt/sources.list.d/ sudo rm -rf elastic-*   Install Elasticsearch in ubuntu 20, 18, 16

Install Elastic search 5.x in ubuntu 20, 18, 16

Look for OpenJDK in APT sudo apt search openjdk Install OpenJDK 8 sudo apt-get install openjdk-8-jdk Add the proper GPG key for ElasticSearch wget -qO - | sudo apt-key add - Make sure to install/update transport sudo apt-get install apt-transport-https Save the repo definition echo "deb stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list Update APT and install ElasticSearch from APT sudo apt-get update && sudo apt-get install elasticsearch Reload the daemon sudo /bin/systemctl daemon-reload Allow ElasticSearch to start on boot sudo /bin/systemctl enable elasticsearch.service Lets fire up ElasticSearch... sudo systemctl start elasticsearch.service Lets see if we have some logs sudo ls -la /var/log/elasticsearch/ Have a look at the logs and make sure that ElasticSearch has properly initiated sudo cat /var/log/elasticsearch/elasticsearch.