Last active
December 4, 2020 22:33
-
-
Save SiddharthaChowdhury/1cf508cf1a76706f0fb29bbc1ab7ca47 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change directory -> to your login directory | |
cd ~ | |
# ---------------------------------- J A V A dependency installation | |
# Installing Java 8 | |
# Add Oracle Java PPA to apt | |
sudo add-apt-repository -y ppa:webupd8team/java | |
# Update repo | |
sudo apt-get update | |
# Install Java 8 | |
sudo apt-get -y install oracle-java8-installer | |
# Check if installed correctly (should return the version number) | |
java -version | |
## This should return -------------------- | |
#java version "1.8.0_121" | |
#Java(TM) SE Runtime Environment (build 1.8.0_121-b13) | |
#Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode) | |
# ---------------------------------- E L A S T I C S E A R C H installation | |
# Download from ES site (Current version: 5.2) | |
# https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html | |
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.2.0.deb | |
# Compare the SHA produced by sha1sum or shasum with the published SHA | |
sha1sum elasticsearch-5.2.0.deb | |
# Install the downloaded ES | |
sudo dpkg -i elasticsearch-5.2.0.deb | |
# Start elastic search | |
sudo /etc/init.d/elasticsearch start | |
## Positive/Successful response should be like | |
# * Starting Elasticsearch Server [ OK ] | |
# Check if elastic search is running | |
curl http://localhost:9200 | |
## This should return something like: | |
# { | |
# "name" : "xxxxxxx", | |
# "cluster_name" : "elasticsearch", | |
# "cluster_uuid" : "xxxxxxxxxxxxxxxxxxxxxxx", | |
# "version" : { | |
# "number" : "5.2.0", | |
# "build_hash" : "xxxxxxx", | |
# "build_date" : "2017-01-24T19:52:35.800Z", | |
# "build_snapshot" : false, | |
# "lucene_version" : "6.4.0" | |
# }, | |
# "tagline" : "You Know, for Search" | |
#} | |
#-------------------------------------- O P T I N A L | |
#(Optional) Start elasticsearch automatically on syatem startup | |
sudo update-rc.d elasticsearch defaults 95 10 | |
## This should return something similar to this | |
# Adding system startup for /etc/init.d/elasticsearch ... | |
# /etc/rc0.d/K10elasticsearch -> ../init.d/elasticsearch | |
# /etc/rc1.d/K10elasticsearch -> ../init.d/elasticsearch | |
# /etc/rc6.d/K10elasticsearch -> ../init.d/elasticsearch | |
# /etc/rc2.d/S95elasticsearch -> ../init.d/elasticsearch | |
# /etc/rc3.d/S95elasticsearch -> ../init.d/elasticsearch | |
# /etc/rc4.d/S95elasticsearch -> ../init.d/elasticsearch | |
# /etc/rc5.d/S95elasticsearch -> ../init.d/elasticsearch | |
######### ============== D O N E =============== ######### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment