Skip to content

Instantly share code, notes, and snippets.

@gourneau
Last active December 12, 2017 21:06
Show Gist options
  • Save gourneau/66e0bd90c92ad829590b to your computer and use it in GitHub Desktop.
Save gourneau/66e0bd90c92ad829590b to your computer and use it in GitHub Desktop.
Elastic Search 1.4.2 with Oracle Java 8
### Install Oracle Java 8, this means you agree to their binary license!!
cd ~
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
sudo aptitude -y install oracle-java8-installer
### Download and Install ElasticSearch
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.2.deb
sudo dpkg -i elasticsearch-1.4.2.deb
#enable on bootup
sudo update-rc.d elasticsearch defaults 95 10
### Start ElasticSearch
sudo /etc/init.d/elasticsearch start
### Make sure service is running
curl http://localhost:9200
### Should return something like this:
#{
# "status" : 200,
# "name" : "Storm",
# "version" : {
# "number" : "1.3.1",
# "build_hash" : "2de6dc5268c32fb49b205233c138d93aaf772015",
# "build_timestamp" : "2014-07-28T14:45:15Z",
# "build_snapshot" : false,
# "lucene_version" : "4.9"
# },
# "tagline" : "You Know, for Search"
#}
#You will want to tune your memory as well http://stackoverflow.com/a/18152957/56069
@druzmieres
Copy link

In the command "sudo update-rc.d elasticsearch defaults 95 10" is there a reason for choosing those numbers? I want to run Elasticsearch along with Cerebro (github.com/lmenezes/cerebro) as services on the same machine and I want both to start on bootup... Should I use the same numbers for Cerebro? I've been searching, but don't get the meaning.

Thanks.

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