Junyangz's docs
  • Introduction
  • Ops
    • Linux-tips
    • MySQL-5.7.20
    • Upgrading MySQL
    • Upgrade OpenSSH to 7.7p1 in CentOS 6
    • Linux PERSISTENT NAMING
    • Use Kafka with Flume - CRS2
    • Setup Chroot SFTP in CentOS
    • Setup software RAID-5 in CentOS
    • SSH-port-forwarding
    • Elasticsearch In Production
    • ELK-simple-tutorial
    • Ansible Playbooks for Apache Kafka in production
    • GitHub Actions depoly Hexo
    • Test HTTP3/QUIC docker
    • Docker tutorial
    • SFTP-auth-pubkey
    • Linux Process Substitution
  • Note
    • Interview
      • interview-prepare
      • 2020-campus-recruiting
    • Android Tips
    • MacOS tips
    • Secret knowledge
    • GPG-Note
    • ud185
    • ud185-2
    • Introducing Tensorflow Federated
    • Tensorflow Federated
    • Expert Python Programing
    • What happens when zh_CN
    • TILGC
    • VScode keyboard shortcuts
    • Abseil Python
    • Latex Note
    • Git Cheatsheet
    • Study Smarter Not Harder
    • Machine Learning Interviews
    • 深度学习中的优化
    • Beej's Guide to Network Programming Note
      • ch4
      • ch5
      • ch6
      • ch7
  • [Share]
    • What to do after what to do
    • Truman is everywhere
    • Way2outer
    • 未来十五年
  • Quote
Powered by GitBook
On this page
  • Install Elasticsearch with RPM manually
  • Configure Elasticsearch
  • Run Elasticsearch
  • Check status(cluster)
  • Reference

Was this helpful?

  1. Ops

Elasticsearch In Production

Install Elasticsearch with RPM manually

sudo rpm --install elasticsearch-6.6.0.rpm
sudo chkconfig --add elasticsearch

Configure Elasticsearch

/etc/elasticsearch/elasticsearch.yml

/etc/sysconfig/elasticsearch #SysV init

/etc/elasticsearch/jvm.options #Xmx <= 32G

sed -n '/^#/!p' /etc/elasticsearch/elasticsearch.yml
####
cluster.name: crs2-es
node.name: ${HOSTNAME}
path.data: /data3/elasticsearch/data
path.logs: /data3/elasticsearch/log

bootstrap.system_call_filter: false #set to false as SecComp fails on CentOS 6
bootstrap.memory_lock: true
network.host: [10.0.0.1, 127.0.0.1]
http.port: 9200
discovery.zen.ping.unicast.hosts: ["10.0.0.1", "10.0.0.2", "10.0.0.3"]
#########################################

sed -n '/^#/!p' /etc/sysconfig/elasticsearch
####
JAVA_HOME=/opt/apps/java/jdk1.8.0_171
ES_PATH_CONF=/etc/elasticsearch
ES_STARTUP_SLEEP_TIME=5
MAX_LOCKED_MEMORY=unlimited
#########################################

sed -n '/^#/!p'  /etc/elasticsearch/jvm.options |egrep Xm[sx]
####
-Xms24g
-Xmx24g
mkdir -p  /data3/elasticsearch/{data,log}
chmod -R 775 /data3/elasticsearch/
chown elasticsearch:elasticsearch /data3/elasticsearch/{data,log}

Run Elasticsearch

sudo -i service elasticsearch start

Check status(cluster)

curl -XGET 'localhost:9200/_cluster/state?pretty'

Reference

PreviousSSH-port-forwardingNextELK-simple-tutorial

Last updated 2 years ago

Was this helpful?

Elasticsearch Reference [6.6]
Elasticsearch In Production — Deployment Best Practices