Last active
September 14, 2017 09:45
-
-
Save EikeDehling/e07aac236bb13f1a005b35d2d69fc1b0 to your computer and use it in GitHub Desktop.
Shell script to install elastic 5.6 (as root) on debian
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
# Install elasticsearch | |
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add - | |
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 | |
apt-get update | |
apt-get install elasticsearch | |
# Configure memory settings | |
mkdir -p /etc/systemd/system/elasticsearch.service.d | |
echo -e "[Service]\nLimitMEMLOCK=infinity" > /etc/systemd/system/elasticsearch.service.d/elasticsearch.conf | |
# Configure elastic | |
sed -i '/#bootstrap.memory_lock: true/c\bootstrap.memory_lock: true' /etc/elasticsearch/elasticsearch.yml | |
sed -i '/#network.host: 192.168.0.1/c\network.host: 0.0.0.0' /etc/elasticsearch/elasticsearch.yml | |
# Start! | |
systemctl daemon-reload | |
systemctl enable elasticsearch.service | |
systemctl start elasticsearch.service | |
# Check it runs | |
curl http://localhost:9200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment