Skip to content

Instantly share code, notes, and snippets.

@fedir
Forked from sultansaadat/elasticsearch-install.sh
Last active August 29, 2015 14:25
Show Gist options
  • Save fedir/2b9fec9229baaa2292e3 to your computer and use it in GitHub Desktop.
Save fedir/2b9fec9229baaa2292e3 to your computer and use it in GitHub Desktop.
cd ~
# Install dependencies
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
# Install ElasticSearch from the official repository
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.7.0.deb
sudo dpkg -i elasticsearch-1.7.0.deb
# Install HEAD plugin for the interfacing
sudo /usr/share/elasticsearch/bin/plugin -install mobz/elasticsearch-head
# Configure Elasticsearch to automatically start during bootup
sudo update-rc.d elasticsearch defaults 95 10
sudo service elasticsearch start
# Test
curl http://localhost:9200
-A INPUT -s AD.M.IN.IP/32 -p tcp -m tcp --dport 9200:9400 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 9200:9400 -j DROP
#/etc/elasticsearch/elasticsearch.yml
node.name: "noeud-0"
cluster.name: "cluster-0"
discovery.zen.ping.multicast.enabled: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment