Created
April 3, 2017 20:19
-
-
Save jatanpatel92/7deac645310713ddb43b251f900af108 to your computer and use it in GitHub Desktop.
Installing Elastic Stack on Debian System which uses systemd
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
| #!/bin/bash | |
| # The following script installs Elastic stack on Ubuntu/Debian systems | |
| # install java | |
| sudo add-apt-repository -y ppa:webupd8team/java | |
| sudo apt-get update | |
| sudo apt-get -y install oracle-java8-installer | |
| # install Elastic Stack | |
| # import elastic PGP key | |
| wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - | |
| sudo apt-get install apt-transport-https | |
| echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list | |
| # Installing and Setting elasticsearch, kibana and logstash as system services | |
| sudo apt-get update && sudo apt-get install elasticsearch | |
| sudo /bin/systemctl daemon-reload | |
| sudo /bin/systemctl enable elasticsearch.service | |
| sudo apt-get update && sudo apt-get install kibana | |
| sudo /bin/systemctl daemon-reload | |
| sudo /bin/systemctl enable kibana.service | |
| sudo apt-get update && sudo apt-get install logstash | |
| sudo /bin/systemctl daemon-reload | |
| sudo /bin/systemctl enable logstash.service | |
| # install X-pack for each component | |
| cd /usr/share/elasticsearch | |
| sudo bin/elasticsearch-plugin install x-pack | |
| cd ../kibana | |
| sudo bin/kibana-plugin install x-pack | |
| cd ../logstash | |
| sudo bin/logstash-plugin install x-pack | |
| # Start services | |
| sudo systemctl start elasticsearch.service | |
| sudo systemctl start kibana.service | |
| sudo systemctl start logstash.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment