easy steps to install elasticsearch 6 with images in centos 7

easy steps to install elasticsearch 6 with images in centos 7

elasticsearch 6,  elasticsearch 6.x installation configuration on centos 7, elasticsearch 6.0, elasticsearch 6.1, elasticsearch configuration, elasticsearch installation, elasticsearch cluster health, check elasticsearch 6 cluster, check elasticsearch status, create elasticsearch index, delete elasticsearch index, check elasticsearch indicces


OS     -    CentOS 7
IP     -    172.17.20.100
Host  -   linuxtopic.com
Elasticsearch default port    -    9200

Step 1:

Update system
yum update
update system, yum update, elasticsearch 6,  elasticsearch 6.x installation configuration on centos 7, elasticsearch 6.0, elasticsearch 6.1, elasticsearch configuration, elasticsearch installation,

Install Java & curl
yum install java curl
java, install java, install curl, curl command, elasticsearch 6,  elasticsearch 6.x installation configuration on centos 7, elasticsearch 6.0, elasticsearch 6.1, elasticsearch configuration, elasticsearch installation,
   
Check Java Version
java -version
check java verison, how to check java verison, java, openjdk

               
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
install elasticsearch, elasticsearch 6,  elasticsearch 6.x installation configuration on centos 7, elasticsearch 6.0, elasticsearch 6.1, elasticsearch configuration, elasticsearch installation,

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
elasticsearch 6,  elasticsearch 6.x installation configuration on centos 7, elasticsearch 6.0, elasticsearch 6.1, elasticsearch configuration, elasticsearch installation,


Verify
cat /etc/yum.repos.d/elasticsearch.repo
elasticsearch 6,  elasticsearch 6.x installation configuration on centos 7, elasticsearch 6.0, elasticsearch 6.1, elasticsearch configuration, elasticsearch installation,

Install Elasticsearch
yum install elasticsearch
elasticsearch 6,  elasticsearch 6.x installation configuration on centos 7, elasticsearch 6.0, elasticsearch 6.1, elasticsearch configuration, elasticsearch installation,

Enable  Elasticsearch service
systemctl daemon-reload

systemctl enable elasticsearch.service

Directory layout of RPM

The RPM places config files, logs, and the data directory in the appropriate locations for an RPM-based system:

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.service
Check Elasticsearch Status
curl -XGET 'http://172.17.20.100:9200'
elasticsearch status, check elasticsearch, elasticsearch 6,  elasticsearch 6.x installation configuration on centos 7, elasticsearch 6.0, elasticsearch 6.1, elasticsearch configuration, elasticsearch installation,

Check Health of Cluster
curl -XGET 'http://172.17.20.100:9200/_cluster/health?pretty=true'
check elasticsearch health, elasticsearch 6,  elasticsearch 6.x installation configuration on centos 7, elasticsearch 6.0, elasticsearch 6.1, elasticsearch configuration, elasticsearch installation,

Get Indica details
curl -XGET '172.17.20.100:9200/_cat/indices?v'
elasticsearch indices, elasticsearch 6,  elasticsearch 6.x installation configuration on centos 7, elasticsearch 6.0, elasticsearch 6.1, elasticsearch configuration, elasticsearch installation,

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'
create elasticsearch index, create index, elasticsearch 6,  elasticsearch 6.x installation configuration on centos 7, elasticsearch 6.0, elasticsearch 6.1, elasticsearch configuration, elasticsearch installation,


Delete an index named "linuxtopic"
curl -XDELETE '172.17.20.100:9200/linuxtopic?pretty'
    delete elasticsearch index, elasticsearch 6,  elasticsearch 6.x installation configuration on centos 7, elasticsearch 6.0, elasticsearch 6.1, elasticsearch configuration, elasticsearch installation,


Part 1 - Elasticsearch Installation


Previous
Next Post »