Forked from madaarya/install_elasticsearch_ubuntu_wsl2.sh
Created
January 29, 2023 11:58
-
-
Save SingularReza/cec5fdb8987426e37c4760abf9ed70c3 to your computer and use it in GitHub Desktop.
Step by step Install elasticsearch on wsl2 + ubuntu
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
| // 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