How to install Elasticsearch on Linux Server


Elasticsearch is one of the components of ELK, which is commonly used for log analytics, full-text search, security intelligence, and business analytics.Elasticsearch requires JAVA 8. It is highly recommended that you should use Oracle JDK, which is higher than JDK version 1.8.0_131.

For simplicity, you can use RPM file to install Elasticsearch. In my case, I will prefer to install it from “TAR” file in order to define another installation directory. All index and binary file will be kept under “/appdata” directory. However, if you prefer to install from RPM or DEB base package, you do not need to follow those steps. Just download binaries from this link and perform the installation.

To Perform default Installation Steps:

RPM:
#rpm -ivh <logstash_package_name>
DEB:
#dpkg -i <logstash_package_name>

 

Manual Installation Steps

Step 1: Install JDK

Download JDK from this link and extract binaries under /usr/local/java. Then create symbolic links with “ln -s” command.

#mkdir  /usr/loca/java
#cp <jdk.tar.gz> /usr/loca/java
#cd /usr/loca/java
#tar  -xzvf  <jdk.tar.gz>
#unlink  java
#ln  -s  /usr/local/java/jdk1.8.0_171/bin/java /usr/bin/java
#java  -version

Step 2: Download and extract tar file

#curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.2.tar.gz
#cp  elasticsearch-6.4.2.tar.gz /appdata
#tar -xvf elasticsearch-6.4.2.tar.gz

Step 3: Create Service file and start service

I have installed binaries under /appdata mount point. You should check your configuration. If you have installed to another directory you should edit this script and change /appdata to yours.

#vi  /usr/lib/systemd/system/elasticsearch.service

[Unit]
Description=Elasticsearch
Wants=network-online.target
After=network-online.target
[Service]
Environment=ES_HOME=/appdata/elasticsearch
Environment=CONF_DIR=/appdata/elasticsearch/config
Environment=DATA_DIR=/appdata/elasticsearch/data
Environment=LOG_DIR=/appdata/elasticsearch/logs
Environment=PID_DIR=/var/run/elasticsearch
EnvironmentFile=-/appdata/elasticsearch/config
WorkingDirectory=/appdata/elasticsearch
User=appuser
Group=appgroup
ExecStart=/appdata/elasticsearch/bin/elasticsearch \
-p ${PID_DIR}/elasticsearch.pid \
--quiet

# StandardOutput is configured to redirect to journalctl since
# some error messages may be logged in standard output before
# elasticsearch logging system is initialized. Elasticsearch
# stores its logs in /var/log/elasticsearch and does not use
# journalctl by default. If you also want to enable journalctl
# logging, you can simply remove the "quiet" option from ExecStart.
StandardOutput=journal
StandardError=inherit
# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536
# Specifies the maximum number of bytes of memory that may be locked into RAM
# Set to "infinity" if you use the 'bootstrap.memory_lock: true' option
# in elasticsearch.yml and 'MAX_LOCKED_MEMORY=unlimited' in /etc/sysconfig/elasticsearch
LimitMEMLOCK=infinity
# Disable timeout logic and wait until process is stopped
TimeoutStopSec=0
# SIGTERM signal is used to stop the Java process
KillSignal=SIGTERM
# Java process is never killed
SendSIGKILL=no
# When a JVM receives a SIGTERM signal it exits with code 143
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target
# Built for distribution-5.4.0 (distribution)

Step 4: Change  Elasticsearch YML file

I only edited these configuration sets. Please check configuration file and edit, as you need.

Data Path: /appdata/elasticsearch/data

Log Path: /appdata/elasticsearch/logs

Listen Network: localhost

Port: 9200

# cat /appdata/elasticsearch/config/elasticsearch.yml |grep  -v  '#'
path.data: <strong>/appdata/elasticsearch/data</strong>
path.logs: /appdata/elasticsearch/logs
network.host: 127.0.0.1
http.port: 9200 

Step 5: Start Elasticsearch

#systemctl enable elasticsearch
#systemctl start elasticsearch

 

I'm a IT Infrastructure and Operations Architect with extensive experience and administration skills and works for Turk Telekom. I provide hardware and software support for the IT Infrastructure and Operations tasks.

205 Total Posts
Follow Me

68 Comments

  1. Operation Intercept imposed strict, punitive searches of traffic along on the U. viagra in india does viagra expire

  2. This is filled with fluid and nerves, and is called the cochlea. http://saleviabuy.com does viagra make you bigger

  3. Treatment for sciatica focuses on relieving pressure and inflammation. saleviabuy.com viagra online canada

  4. I have been the birth control pill Aleese since college. http://genqpviag.com safe generic viagra online

  5. Catatonic disorder due to GMC is not a well-studied phenomenon, and its prevalence has not been clearly established. generic viagra or cialis generic viagra without a doctor prescription

  6. Influenza is a contagious disease that attacks the respiratory tract, including the nose, throat and lungs. http://genqpviag.com cheap generic viagra review

  7. Your doctor can also review the drugs you are taking. online generic viagra prescription buying viagra online from canada

  8. Its anti-inflammatory activity is poor. https://siviagmen.com approved generic viagra

  9. Her father trailed at in a motorboat, so she could radio him for help if she had an attack. http://genqpviag.com where can you buy real generic viagra

  10. More Info Find out about the hidden eye health dangers of UV TheraTears has patented nutrients that match your natural tears. generic viagra no prescription best viagra online

  11. Read more Tinnitus Relaxation techniques, regular exercise and improving your sleep can help. http://genqpviag.com free shipping generic viagra

  12. The immune system does not recognize the affected cells as normal parts of the body, causing a T-cell-mediated immune response. https://siviagmen.com generic viagra online

  13. Peripheral cyanosis: if present without central cyanosis, is a sign of decreased peripheral perfusion or impaired gas diffusion, and not necessarily hypoxia. https://genqpviag.com viagra generic lowest price

  14. Steven Horng shows Google Glass that he and other doctors will use to read patient records. is generic viagra as good as real viagra - genqpviag.com - cheap generic viagra co uk french index

  15. I highly recommend American Medical Supply for anyone who is an at home caregiver and needs equipment. http://siviagmen.com online prescription viagra

  16. If pulling is stopped before scarring to the scalp then your hair will grow back normally. https://genqpviag.com is there a generic form of viagra

  17. Reply Can anyone tell me what this is? where can i buy generic viagra when generic viagra

  18. If you barely brush your skin against the plant, a rash of red pimples, even blisters, can break out. http://llviabest.com no prescription viagra online

  19. Tea tree oil is very strong, so apply only a drop or use some carrier oil like olive oil to dilute it. cialis viagra levitra generic viagra patent expiration generic

  20. Africa's drug habit 2. http://genqpviag.com back generic guarantee money viagra

  21. I ordered both o them online yesterday after reading your advice. http://siviagmen.com get viagra prescribed online

  22. Yesterday I broke a L-Lysine tablet in half before taking it, to give my system a head start on it. http://siviagmen.com online viagra

  23. My father knew about it and took me to the hospital for medical attention. https://llviabest.com prescription for viagra online

  24. The pathogens that cause STDs may be BACTERIA, viruses, or parasites. https://siviagmen.com viagra samples online

  25. canadian pharmacy generic viagra http://fmedrx.com/ buy viagra online cheap india generic viagra

  26. cheap viagra pills online http://usggrxmed.com/ best generic viagra forum buying viagra online with paypal

  27. viagra met voorschrift https://purevigra.com chuck norris viagra ad

  28. genuine viagra wowviaprice.com drug similiar to viagra

  29. viagra substitute over counter buy cheap viagra online viagra coupons and discounts

  30. gnc product like viagra https://buybuyviamen.com buy generic viagra and cialis

  31. droga principal del viagra viagra generika was ist das daily cialis plus viagra

  32. Buy viagra over the counter australia hopeviagrin.com canadian pharmacy viagra uk

  33. Viagra pills price in south africa miraclevigra.com female viagra where to buy

  34. Can you buy viagra mexico https://lightvigra.com buy real viagra uk

  35. Sildenafil price australia mygoviagar.com viagra cream price

  36. Sildenafil 50 mg tablet https://hopeviagrin.com/ cheap female viagra online

  37. Female viagra capsules in india mygoviagar.com buy female viagra uk

  38. Best viagra hopeviagrin.com buy generic viagra online with mastercard

  39. Viagra free delivery https://mygoviagar.com/ can you buy generic viagra

  40. Female viagra medication https://lightvigra.com where can i get viagra online

  41. Female viagra pill price https://miraclevigra.com/ over the counter viagra pills

  42. Generic sildenafil paypal https://mygoviagar.com/ generic viagra fast delivery

  43. Viagra on line https://mygoviagar.com/ how to buy genuine viagra online

  44. buy sildenafil viagra where to buy female viagra in us where to get cheap viagra

  45. Sildenafil 10 mg daily https://lightvigra.com viagra in women

  46. Cheap viagra generic https://lightvigra.com can you safely buy viagra online

  47. How much is generic viagra in mexico lightvigra.com non generic viagra

  48. Generic viagra cost lightvigra.com female viagra online australia

  49. Viagra 60 mg https://hopeviagrin.com sildenafil 20 mg online no prescription

  50. Cheap generic viagra online usa mygoviagar.com price comparison viagra

  51. Viagra cream australia hopeviagrin.com canadian viagra paypal

  52. Viagra online canada pharmacy https://mygoviagar.com/ cost of viagra 2017

  53. Viagra 50 https://lightvigra.com generic viagra where to buy

  54. Female viagra medicine price in india https://mygoviagar.com/ cost viagra

  55. Sildenafil 25 mg daily https://hopeviagrin.com sildenafil 50 mg price

  56. Prescription viagra cost lightvigra.com viagra pills online australia

  57. 360 viagra https://lightvigra.com/ viagra prescription nz

  58. Generic viagra us pharmacy https://hopeviagrin.com buy viagra online europe

  59. Viagra pills over the counter canada hopeviagrin.com viagra generic price canada

  60. Pharmacy rx viagra https://hopeviagrin.com sildenafil 88

  61. Sildenafil 75 mg https://mygoviagar.com sildenafil 25 mg buy

  62. Viagra price uk mygoviagar.com discount viagra prices

  63. Where to buy viagra https://mygoviagar.com viagra tablets online in india

  64. Female viagra australia for sale mygoviagar.com viagra canada otc

  65. viagra tablets online viagra pill where to buy generic viagra paypal canada

  66. edad para el consumo de viagra viagra do uruguai viagra sales rep movie

  67. best sildenafil in india viagra online american express viagra for women australia

  68. order sildenafil viagra 25 mg tablet price viagra chewable

Leave a Reply