Last active
December 28, 2024 03:19
-
-
Save linuxmalaysia/2d356c1548f1cd6fa5a49eed87ba1cd9 to your computer and use it in GitHub Desktop.
Download Elastic Assets for airgap installation
This file contains 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
#!/bin/bash | |
### Script mudah untuk download asset daripada elastic downloads bagi tujuan | |
### Internal repo kepada Elastic Fleet. | |
### use with own risks | |
### buat directory ini bawah html /usr/share/nginx/html | |
### Harisfazillah Bin Jamel 28/12/2024 | |
### Ubuntu / Debian - apt install nginx | |
### Alma Linux / Rocky Linux - dnf install nginx | |
### Created with Google Gemini | |
# Check for distribution and install Nginx | |
if [[ -f /etc/os-release ]]; then | |
# Assuming Ubuntu/Debian based distribution | |
source /etc/os-release | |
if [[ "$ID" == "ubuntu" ]]; then | |
sudo apt update | |
sudo apt install -y nginx | |
elif [[ "$ID" == "debian" ]]; then | |
sudo apt update | |
sudo apt install -y nginx | |
fi | |
elif [[ -f /etc/redhat-release ]] || [[ -f /etc/centos-release ]] || [[ -f /etc/rocky-release ]] || [[ -f /etc/almalinux-release ]]; then | |
# Assuming RedHat/CentOS/Rocky/AlmaLinux based distribution | |
sudo dnf install -y nginx | |
fi | |
DOWNLPATH="/usr/share/nginx/html" | |
VERSI="8.7.0" | |
cd $DOWNLPATH | |
mkdir -p downloads/apm-server | |
chmod 755 downloads/apm-server | |
cd downloads/apm-server | |
curl -O https://artifacts.elastic.co/downloads/apm-server/apm-server-$VERSI-linux-x86_64.tar.gz | |
curl -O https://artifacts.elastic.co/downloads/apm-server/apm-server-$VERSI-linux-x86_64.tar.gz.sha512 | |
curl -O https://artifacts.elastic.co/downloads/apm-server/apm-server-$VERSI-linux-x86_64.tar.gz.asc | |
## | |
cd $DOWNLPATH | |
mkdir -p downloads/beats/auditbeat | |
chmod 755 downloads/beats/auditbeat | |
cd downloads/beats/auditbeat | |
curl -O https://artifacts.elastic.co/downloads/beats/auditbeat/auditbeat-$VERSI-linux-x86_64.tar.gz | |
curl -O https://artifacts.elastic.co/downloads/beats/auditbeat/auditbeat-$VERSI-linux-x86_64.tar.gz.sha512 | |
curl -O https://artifacts.elastic.co/downloads/beats/auditbeat/auditbeat-$VERSI-linux-x86_64.tar.gz.asc | |
### | |
cd $DOWNLPATH | |
mkdir -p downloads/beats/elastic-agent | |
chmod 755 downloads/beats/elastic-agent | |
cd downloads/beats/elastic-agent | |
curl -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-$VERSI-linux-x86_64.tar.gz | |
curl -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-$VERSI-linux-x86_64.tar.gz.sha512 | |
curl -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-$VERSI-linux-x86_64.tar.gz.asc | |
### | |
cd $DOWNLPATH | |
mkdir -p downloads/beats/filebeat | |
chmod 755 downloads/beats/filebeat | |
cd downloads/beats/filebeat | |
curl -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-$VERSI-linux-x86_64.tar.gz | |
curl -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-$VERSI-linux-x86_64.tar.gz.sha512 | |
curl -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-$VERSI-linux-x86_64.tar.gz.asc | |
### | |
cd $DOWNLPATH | |
mkdir -p downloads/beats/heartbeat | |
chmod 755 downloads/beats/heartbeat | |
cd downloads/beats/heartbeat | |
curl -O https://artifacts.elastic.co/downloads/beats/heartbeat/heartbeat-$VERSI-linux-x86_64.tar.gz | |
curl -O https://artifacts.elastic.co/downloads/beats/heartbeat/heartbeat-$VERSI-linux-x86_64.tar.gz.sha512 | |
curl -O https://artifacts.elastic.co/downloads/beats/heartbeat/heartbeat-$VERSI-linux-x86_64.tar.gz.asc | |
#### | |
cd $DOWNLPATH | |
mkdir -p downloads/beats/metricbeat | |
chmod 755 downloads/beats/metricbeat | |
cd downloads/beats/metricbeat | |
curl -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-$VERSI-linux-x86_64.tar.gz | |
curl -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-$VERSI-linux-x86_64.tar.gz.sha512 | |
curl -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-$VERSI-linux-x86_64.tar.gz.asc | |
##### | |
cd $DOWNLPATH | |
mkdir -p downloads/beats/osquerybeat | |
chmod 755 downloads/beats/osquerybeat | |
cd downloads/beats/osquerybeat | |
curl -O https://artifacts.elastic.co/downloads/beats/osquerybeat/osquerybeat-$VERSI-linux-x86_64.tar.gz | |
curl -O https://artifacts.elastic.co/downloads/beats/osquerybeat/osquerybeat-$VERSI-linux-x86_64.tar.gz.sha512 | |
curl -O https://artifacts.elastic.co/downloads/beats/osquerybeat/osquerybeat-$VERSI-linux-x86_64.tar.gz.asc | |
#### | |
cd $DOWNLPATH | |
mkdir -p downloads/beats/packetbeat | |
chmod 755 downloads/beats/packetbeat | |
cd downloads/beats/packetbeat | |
curl -O https://artifacts.elastic.co/downloads/beats/packetbeat/packetbeat-$VERSI-linux-x86_64.tar.gz | |
curl -O https://artifacts.elastic.co/downloads/beats/packetbeat/packetbeat-$VERSI-linux-x86_64.tar.gz.sha512 | |
curl -O https://artifacts.elastic.co/downloads/beats/packetbeat/packetbeat-$VERSI-linux-x86_64.tar.gz.asc | |
##### | |
cd $DOWNLPATH | |
mkdir -p downloads/cloudbeat | |
chmod 755 downloads/cloudbeat | |
cd downloads/cloudbeat | |
curl -O https://artifacts.elastic.co/downloads/cloudbeat/cloudbeat-$VERSI-linux-x86_64.tar.gz | |
curl -O https://artifacts.elastic.co/downloads/cloudbeat/cloudbeat-$VERSI-linux-x86_64.tar.gz.sha512 | |
curl -O https://artifacts.elastic.co/downloads/cloudbeat/cloudbeat-$VERSI-linux-x86_64.tar.gz.asc | |
##### | |
cd $DOWNLPATH | |
mkdir -p downloads/endpoint-dev | |
chmod 755 downloads/endpoint-dev | |
cd downloads/endpoint-dev | |
curl -O https://artifacts.elastic.co/downloads/endpoint-dev/endpoint-security-$VERSI-linux-x86_64.tar.gz | |
curl -O https://artifacts.elastic.co/downloads/endpoint-dev/endpoint-security-$VERSI-linux-x86_64.tar.gz.sha512 | |
curl -O https://artifacts.elastic.co/downloads/endpoint-dev/endpoint-security-$VERSI-linux-x86_64.tar.gz.asc | |
#### | |
cd $DOWNLPATH | |
mkdir -p downloads/fleet-server | |
chmod 755 downloads/fleet-server | |
cd downloads/fleet-server | |
curl -O https://artifacts.elastic.co/downloads/fleet-server/fleet-server-$VERSI-linux-x86_64.tar.gz | |
curl -O https://artifacts.elastic.co/downloads/fleet-server/fleet-server-$VERSI-linux-x86_64.tar.gz.sha512 | |
curl -O https://artifacts.elastic.co/downloads/fleet-server/fleet-server-$VERSI-linux-x86_64.tar.gz.asc | |
####### | |
cd $DOWNLPATH | |
mkdir -p downloads/prodfiler | |
chmod 755 downloads/prodfiler | |
cd downloads/prodfiler | |
curl -O https://artifacts.elastic.co/downloads/prodfiler/pf-host-agent-$VERSI-linux-x86_64.tar.gz | |
curl -O https://artifacts.elastic.co/downloads/prodfiler/pf-host-agent-$VERSI-linux-x86_64.tar.gz.sha512 | |
curl -O https://artifacts.elastic.co/downloads/prodfiler/pf-host-agent-$VERSI-linux-x86_64.tar.gz.asc | |
curl -O https://artifacts.elastic.co/downloads/prodfiler/pf-elastic-collector-$VERSI-linux-x86_64.tar.gz | |
curl -O https://artifacts.elastic.co/downloads/prodfiler/pf-elastic-collector-$VERSI-linux-x86_64.tar.gz.sha512 | |
curl -O https://artifacts.elastic.co/downloads/prodfiler/pf-elastic-collector-$VERSI-linux-x86_64.tar.gz.asc | |
curl -O https://artifacts.elastic.co/downloads/prodfiler/pf-elastic-symbolizer-$VERSI-linux-x86_64.tar.gz | |
curl -O https://artifacts.elastic.co/downloads/prodfiler/pf-elastic-symbolizer-$VERSI-linux-x86_64.tar.gz.sha512 | |
curl -O https://artifacts.elastic.co/downloads/prodfiler/pf-elastic-symbolizer-$VERSI-linux-x86_64.tar.gz.asc | |
### | |
cd $DOWNLPATH | |
mkdir -p downloads/beats/elastic-agent | |
chmod 755 downloads/beats/elastic-agent | |
cd downloads/beats/elastic-agent | |
curl -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-$VERSI-windows-x86_64.zip | |
curl -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-$VERSI-windows-x86_64.zip.sha512 | |
curl -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-$VERSI-windows-x86_64.zip.asc | |
### | |
cd $DOWNLPATH | |
find $DOWNLPATH/downloads -type f -exec chmod 644 {} \; | |
find $DOWNLPATH/downloads -type d -exec chmod 755 {} \; | |
# contoh link untuk fleet server settint | |
## http://192.168.0.2/downloads | |
### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Still having errors