ElasticSearch Cluster, Logstash And Kibana (ELK5) installation on Linux CentOS 7 - ElasticSearch Installation - Page 3

Install elasticsearch 5

  1. Add key:
# rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
  1. Add elasticsearch.repo. Using text editor, add below lines to /etc/yum.repos.d/elasticsearch.repo:
name=Elasticsearch repository for 5.x packages
  1. Install elasticsearch:
# yum install elasticsearch -y
  1. Set elasticsearch to start automatically using systemd:
# systemctl daemon-reload && systemctl enable elasticsearch.service
  1. Set hostname to be resolved locally using /etc/hosts. Use DNS if you have one:
# cat /etc/hosts node1
  1. Bind hostname to elasticsearch, by uncommenting below line in /etc/elasticsearch/elasticsearch.yml. The node name can be anything to your liking, but must be similar to the one set in step 5:
network.host: node1
  1. Set bootstrap memory lock to be true in /etc/elasticsearch/elasticsearch.yml
bootstrap.memory_lock: true
  1. Set maximum number of memory bytes that may be locked into RAM in /usr/lib/systemd/system/elasticsearch.service, by uncommenting below line
  1. Reload systemctl
# systemctl daemon-reload
  1. Set java heap size for elasticsearch to use in /etc/sysconfig/elasticsearch(rule of thumb, use ½ of your physical memory. In this example 2GB for system with 4GB):
ES_JAVA_OPTS="-Xms2g -Xmx2g"
  1. The config file will look like below:
# grep -v ^# /etc/sysconfig/elasticsearch | grep -v ^$
ES_JAVA_OPTS="-Xms2g -Xmx2g"
  1. Set file limits for elasticsearch in /etc/security/limits.conf (this change needs reboot for the change to take effect):
elasticsearch - nofile 65535
elasticsearch - memlock unlimited
  1. The config file will look like below:
# grep -v ^# /etc/security/limits.conf | grep -v ^$ | tail -5
elasticsearch - nofile 65535
elasticsearch - memlock unlimited
  1. Reboot the machine
# reboot
  1. Stop & start elasticsearch:
# systemctl stop elasticsearch.service && systemctl start elasticsearch.service
  1. Test whether elasticsearch is running, output should be something like below:
# curl -XGET node1:9200/?pretty
"name" : "Cp8oag6",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "AT69_T_DTp-1qgIJlatQqA",
"version" : {
"number" : "5.0.0",
"build_hash" : "f27399d",
"build_date" : "2016-03-30T09:51:41.449Z",
"build_snapshot" : false,
"lucene_version" : "6.2.0"
"tagline" : "You Know, for Search"


Prepared by :
Hisham Aderis ([email protected])
Harisfazillah Jamel ([email protected])

Date : 2 Dec 2016
Last updated: 31 August 2017

Popular Posts


64bit Activity Adempire advocate Akta Apache ASAS Azam backup backuppc Bash Beowulf Big Data Broadband Budget Centos Cinta Cluster CMS cmsfornerd Company Complain computer Computer Operation Conference Contest Data Centre Operation DBmail Digg Digital Certification Discussion Group Django DNS Docker Domain Duit Online Economy Elastic Stack Elasticsearch ELK email email server English Evangelist Events Family Tree Fedora File System Firefox Foss FOSS.my FreeBSD FTX Gesaan Gluster Gmail Godaddy.com Google Google App GTUG Hacking Hadoop hafnie Harisfazillah Jamel horde HP-UX hwclock IBM ICT Service Delivery and Operation Indonesia Internet Internet Tools Itanium Jabatan IT Negara Jaring Java Javascript Jepun Jiwang Joke Joomla K3S K3Sup Kernel Kesihatan Kibana KOSTEM Kubernetes ldap Linux Linux Counter linuxmalaysia Logstash Love Mailman MailScanner Mailwatch Malay Malaysia MAMPU MDeC meetup Melaka Melayu Merdeka Microsoft Migration mirror sites Money Online Monitor MOSC 2010 MOSC2010 mosc2011 MOSC2013 MOSCMY MOSCMY2014 MOSCMY2015 Mozilla MPI MSC Malaysia MSC Malaysia OSCONF MSCOSCONF My Love MyGOSSCON MyMeeting Mypenguin99 mysql Nagios NagiosQL Negaraku Nginx nss_ldap ntp OBW2014 Open Office Open Source openldap Openoffice.org OpenStack Opera OS2 OS400 OSCC OSCC MAMPU osdc.my OSS OSS Policy OWASP Parallel Computing People Power Personal Petition PGP PHP Pligg Podman Politik Postfix Postgresql Programming Proxmox Python q1moscmy2015 Questionnaires Research Research tools RPM SASSIAN Sassian 85-89 Sassians 85-89 SCO Security Sekolah Sekolah Alam Shah Shell script Software License Solaris SongketMail SongketMailFilter sourceforge spam spamassassin Spoof Survey SVR4 System Tools Technorati Terjemahan Terminal TMnet Tor Training translation Treasury Malaysia Trend Micro Twitter Ubuntu Unix Virtualization VMS VOIP Wang Web Server Windows Zimbra

LinuxMalaysia Mastodon