Elasticsearch Installation Guide
This guide provides all the key information and getting-started instructions after a successful Elasticsearch installation via DeploySage-CLI.
Service Management
Manage the Elasticsearch service using standard systemctl commands.
# Start the service
sudo systemctl start elasticsearch
# Stop the service
sudo systemctl stop elasticsearch
# Restart the service
sudo systemctl restart elasticsearch
# Check the service status
sudo systemctl status elasticsearch
# Enable the service to start on boot
sudo systemctl enable elasticsearch
Key Directories and Files
Understanding the file structure is essential for configuration and data management.
| Item | Value |
|---|---|
| Main Configuration File | /etc/elasticsearch/elasticsearch.yml |
| JVM Options | /etc/elasticsearch/jvm.options |
| Data Directory | /var/lib/elasticsearch |
| Log Directory | /var/log/elasticsearch |
Access and Security
Common API Calls
Your single-node cluster is configured with security enabled by default.
The password for the elastic user was generated during installation. If you need to reset it, use the following command:
Interact with your cluster using the REST API. You will need to provide credentials for most calls.
sudo /usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic
# Check cluster health (replace 'PASSWORD' with your actual password)
curl -u elastic:PASSWORD "http://localhost:9200/_cluster/health?pretty"
# List all nodes in the cluster
curl -u elastic:PASSWORD "http://localhost:9200/_cat/nodes?v"
# List all indices
curl -u elastic:PASSWORD "http://localhost:9200/_cat/indices?v"
| Item | Value |
|---|---|
| HTTP Port | 9200 |
| Transport Port | 9300 |
| Default User | elastic |