Mettre à jour 'elastic/elastic_install.sh'

This commit is contained in:
Iwan Clément
2018-03-13 11:19:56 +00:00
parent 113bdb7abd
commit 052391046e

View File

@@ -1,11 +1,14 @@
#!/bin/bash
DESTDIR="/etc/yum.repos.d"
DESTFILE="elasticsearch.repo"
DESTFILE="$DESTDIR/$DESTFILE"
#wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
#echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-6.x.list
#apt -y update && apt -y install elasticsearch
if [ -f /etc/redhat-release ]; then
DESTDIR="/etc/yum.repos.d"
DESTFILE="elasticsearch.repo"
DESTFILE="$DESTDIR/$DESTFILE"
rpm -y --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
echo "[elasticsearch-6.x]">"$DESTFILE"
echo "name=Elasticsearch repository for 6.x packages">>"$DESTFILE"
@@ -17,3 +20,4 @@ echo "autorefresh=1">>"$DESTFILE"
echo "type=rpm-md">>"$DESTFILE"
yum install -y elasticsearch
fi