Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save SingularReza/cec5fdb8987426e37c4760abf9ed70c3 to your computer and use it in GitHub Desktop.

Select an option

Save SingularReza/cec5fdb8987426e37c4760abf9ed70c3 to your computer and use it in GitHub Desktop.
Step by step Install elasticsearch on wsl2 + ubuntu
// elasticsearch version 7
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-7.5.2-linux-x86_64.tar.gz
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-7.5.2-linux-x86_64.tar.gz.sha512
shasum -a 512 -c elasticsearch-oss-7.5.2-linux-x86_64.tar.gz.sha512
tar -xzf elasticsearch-oss-7.5.2-linux-x86_64.tar.gz
cd elasticsearch-oss-7.5.2/
echo 'export ES_HOME="$HOME/elasticsearch-7.5.2/"' >> ~/.bashrc
echo 'export PATH="$ES_HOME/bin:$PATH"' >> ~/.bashrc
exec $SHELL
// elasticsearch version 6
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.8.20.tar.gz
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.8.20.tar.gz.sha512
shasum -a 512 -c elasticsearch-6.8.20.tar.gz.sha512
tar -xzf elasticsearch-6.8.20.tar.gz
cd elasticsearch-6.8.20/
echo 'export ES_HOME="$HOME/elasticsearch-6.8.20/"' >> ~/.bashrc
echo 'export PATH="$ES_HOME/bin:$PATH"' >> ~/.bashrc
exec $SHELL
// Just in case missing JAVA_HOME
// if not installed, do install first
sudo apt install openjdk-11-jdk
echo 'export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"' >> ~/.bashrc
Run with command:
elasticsearch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment