combind both scripts
This commit is contained in:
parent
a3a292f134
commit
5ec8d97dcf
2 changed files with 15 additions and 1 deletions
|
@ -10,7 +10,6 @@ Bash script to install Elastic Stack on Debian and Ubuntu.
|
||||||
## Set permission
|
## Set permission
|
||||||
|
|
||||||
```
|
```
|
||||||
chmod +x elastic-pre.sh
|
|
||||||
chmod +x easyELKnginx.sh
|
chmod +x easyELKnginx.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,20 @@ if [ "$USER_ID" > 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
################### INSTALL PREREQUISITIES #####################
|
||||||
|
install_prerequisities(){
|
||||||
|
printf "\033[32m Installing packages from prerequisities\033[0m\n"
|
||||||
|
echo "-----------------------------------------------------"
|
||||||
|
apt -y update
|
||||||
|
apt -y install default-jre curl jq
|
||||||
|
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
|
||||||
|
apt -y install apt-transport-https
|
||||||
|
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list
|
||||||
|
apt -y update
|
||||||
|
apt -y install elasticsearch
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#Update system packages
|
#Update system packages
|
||||||
update_system_packages() {
|
update_system_packages() {
|
||||||
printf "\033[32m Updating packages and install dependencies\033[0m\n"
|
printf "\033[32m Updating packages and install dependencies\033[0m\n"
|
||||||
|
@ -223,6 +237,7 @@ fi
|
||||||
}
|
}
|
||||||
|
|
||||||
check_user
|
check_user
|
||||||
|
install_prerequisities
|
||||||
update_system_packages
|
update_system_packages
|
||||||
check_nginx
|
check_nginx
|
||||||
check_java
|
check_java
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue