Installing and configuring Elasticsearch
Elasticsearch is a search engine. In this book, you will use it as a NoSQL database. You will move data both to and from Elasticsearch to other locations. To download Elasticsearch, take the following steps:
- Use
curl
to download the files, as shown:curl https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.6.0-darwin-x86_64.tar.gz --output elasticsearch.tar.gz
- Extract the files using the following command:
tar xvzf elasticsearch.tar.gz
- You can edit the
config/elasticsearch.yml
file to name your node and cluster. Later in this book, you will set up an Elasticsearch cluster with multiple nodes. For now, I have changed the following properties:cluster.name: DataEngineeringWithPython node.name: OnlyNode
- Now, you can start Elasticsearch. To start Elasticsearch, run the following:
bin/elasticsearch
- Once Elasticsearch has started, you can see the results at
http://localhost:9200
. You should see the following output...