-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript-IAC2.sh
More file actions
31 lines (26 loc) · 1.74 KB
/
script-IAC2.sh
File metadata and controls
31 lines (26 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
#####################################################################################################
## Projeto dio.me Linux-Fundamentals ##
## Nome: script-IAC2.sh ##
## ##
## Autor: Rafael Simões ##
## ##
## Data: 13/01/2024 ##
## ##
## Descrição: O script atualiza o servidor, realiza o downloado do apache2 e unzip, baixa main.zip ##
## no github, extrai o arquivo main.zip e o copia para dentro da pasta /var/www/html/. ##
## ##
## Uso: Execute como root/superusuário o script ./script-IAC2.sh ##
## ##
#####################################################################################################
echo "Atualizando o SERVIDOR..."
apt-get update
apt-get upgrade -y
apt-get install apache2 -y
apt-get install unzip -y
echo "Baixando e copiando os arquivos da aplicação..."
cd /tmp
wget https://github.com/denilsonbonatti/linux-site-dio/archive/refs/heads/main.zip
unzip main.zip
cd linux-site-dio-main
cp -R * /var/www/html/