Mettre à jour 'elastic/elastic_install.sh'
This commit is contained in:
@@ -1,19 +1,23 @@
|
|||||||
#!/bin/bash
|
#!/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 -
|
#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
|
#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
|
#apt -y update && apt -y install elasticsearch
|
||||||
|
|
||||||
rpm -y --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
|
if [ -f /etc/redhat-release ]; then
|
||||||
echo "[elasticsearch-6.x]">"$DESTFILE"
|
DESTDIR="/etc/yum.repos.d"
|
||||||
echo "name=Elasticsearch repository for 6.x packages">>"$DESTFILE"
|
DESTFILE="elasticsearch.repo"
|
||||||
echo "baseurl=https://artifacts.elastic.co/packages/6.x/yum">>"$DESTFILE"
|
DESTFILE="$DESTDIR/$DESTFILE"
|
||||||
echo "echo "gpgcheck=1">>"$DESTFILE"
|
|
||||||
echo "gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch">>"$DESTFILE"
|
|
||||||
echo "enabled=1">>"$DESTFILE"
|
|
||||||
echo "autorefresh=1">>"$DESTFILE"
|
|
||||||
echo "type=rpm-md">>"$DESTFILE"
|
|
||||||
|
|
||||||
yum install -y elasticsearch
|
|
||||||
|
rpm -y --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
|
||||||
|
echo "[elasticsearch-6.x]">"$DESTFILE"
|
||||||
|
echo "name=Elasticsearch repository for 6.x packages">>"$DESTFILE"
|
||||||
|
echo "baseurl=https://artifacts.elastic.co/packages/6.x/yum">>"$DESTFILE"
|
||||||
|
echo "echo "gpgcheck=1">>"$DESTFILE"
|
||||||
|
echo "gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch">>"$DESTFILE"
|
||||||
|
echo "enabled=1">>"$DESTFILE"
|
||||||
|
echo "autorefresh=1">>"$DESTFILE"
|
||||||
|
echo "type=rpm-md">>"$DESTFILE"
|
||||||
|
|
||||||
|
yum install -y elasticsearch
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user