#!/bin/bas
PackageDir=/usr/local/src
#key_file="/home/ec2-user/LG2.pem"
#chmod 600 /home/ec2-user/LG2.pem

install_kibana(){
cd $PackageDir
if [ ! -f "kibana-7.6.2-x86_64.rpm" ]; then
        wget http://54.179.201.103:8001/kibana-7.6.2-x86_64.rpm
else
        color red  'package:kibana-7.6.2-x86_64.rpm -y already exist!'
fi
yum localinstall kibana-7.6.2-x86_64.rpm -y
rm -f /etc/kibana/kibana.yml
cd /etc/kibana
wget http://54.179.201.103:8001/kibana.yml
systemctl enable kibana
systemctl enable kibana

}

install_kibana
