Skip to content

Instantly share code, notes, and snippets.

@dhrrgn
Last active January 2, 2016 12:29
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhrrgn/8304051 to your computer and use it in GitHub Desktop.
Save dhrrgn/8304051 to your computer and use it in GitHub Desktop.
ElasticSearch Install
cluster.name: "my-es"
index.number_of_shards: 5
index.number_of_replicas: 1
cloud:
aws:
region: us-east-1
access_key: <key here>
secret_key: <secret here>
discovery:
type: ec2
gateway:
type: local
sudo apt-get update
sudo apt-get install unzip
sudo apt-get install openjdk-7-jre
# Main ES Install
cd ~
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.9.zip
sudo unzip elasticsearch-0.90.9.zip -d /usr/local/elasticsearch
cd /usr/local/elasticsearch/elasticsearch-0.90.9/
# AWS Plugin
sudo bin/plugin -install elasticsearch/elasticsearch-cloud-aws/1.16.0
# Write config (including AWS info) to config/elasticsearch.yml
# Install Service Wrapper
cd ~
wget https://github.com/elasticsearch/elasticsearch-servicewrapper/zipball/master
sudo unzip master
sudo mv elasticsearch-elasticsearch-servicewrapper-*/service/ /usr/local/elasticsearch/elasticsearch-0.90.9/bin
cd /usr/local/elasticsearch/elasticsearch-0.90.9/
# In bin/service/elasticsearch.conf
# Set the following:
# set.default.ES_HOME=/usr/local/elasticsearch/elasticsearch-0.19.0
sudo bin/service/elasticsearch64 install
sudo service elasticsearch start
@fideloper
Copy link

Notes:

If you have a firewall somewhere (e.g. EC2 Sec. Group) you need to open up 9200 and 9300 for any IP w/access.. 9300 is the communication port for the cluster, 9200 is the API port for your app. 9300 is the communication port for the cluster, 9200 is the API port for your app.

This configuration assumes you have 1 replica node. If you don’t, your cluster will be status yellow (unassigned replica).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment