OS - CentOS 7
IP - 172.17.20.100
Host - linuxtopic.com
Elasticsearch default port - 9200
Step 1:
Update system
yum update
Install Java & curl
yum install java curl
Check Java Version
java -version
Step 2:
Downloading and Installing Elasticsearch
Method 1 : Download & Install RPM Manually
cd /opt/
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.1.1.rpm
rpm -ivh elasticsearch-6.1.1.rpm
Method 2 : Install using YUM Repo
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
Create repository file
echo “[elasticsearch-6.x]
name=Elasticsearch repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md” > /etc/yum.repos.d/elasticsearch.repo
Verify
cat /etc/yum.repos.d/elasticsearch.repo
Install Elasticsearch
yum install elasticsearch
Enable Elasticsearch service
systemctl daemon-reload
systemctl enable elasticsearch.service
Directory layout of RPM
Configure network host
sed -i 's/#network.host: 192.168.0.1/network.host: 172.17.20.100/g' /etc/elasticsearch/elasticsearch.yml
start elasticsearch
systemctl restart elasticsearch.serviceCheck Elasticsearch Status
curl -XGET 'http://172.17.20.100:9200'
Check Health of Cluster
curl -XGET 'http://172.17.20.100:9200/_cluster/health?pretty=true'
Get Indica details
curl -XGET '172.17.20.100:9200/_cat/indices?v'
create an index named "linuxtopic" and then list all the indexes again:
curl -XPUT '172.17.20.100:9200/linuxtopic?pretty'
curl '172.17.20.100:9200/_cat/indices?v'
Delete an index named "linuxtopic"
curl -XDELETE '172.17.20.100:9200/linuxtopic?pretty'

Graceful modern news reporting NewsManner delivers accurate timely updates and insightful stories across global politics business technology and culture helping readers stay informed daily with clarity care balance trust and a calm dependable editorial approach.
ReplyDeleteUncovering insightful global narratives NewsUnseen shares hidden stories and verified updates across politics business technology and culture helping readers stay informed daily with originality depth trust and a refreshing journalistic approach.
ReplyDeleteAll in one news stream NewsMux delivers global updates and breaking headlines together allowing readers to understand daily trends with efficiency balance and a single trusted editorial voice.
ReplyDelete