Last active
December 1, 2017 12:38
-
-
Save jeffersonsouza/55a5e137fe5a5fca769f5da6921bf3b2 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
echo 'Iniciando Setup' | |
################################################################################ | |
# SETUP DO PROXY | |
################################################################################ | |
# Usuário de proxy | |
while true; do | |
echo "Qual o seu usuário de proxy? " | |
read usuarioproxy | |
if [ -n "$usuarioproxy" ]; then | |
break; | |
else | |
echo "Por favor, informe o usuário do proxy"; | |
fi | |
done | |
# Senha de proxy | |
while true; do | |
echo "Qual sua senha de proxy? " | |
read senhaproxy | |
if [ -n "$senhaproxy" ]; then | |
break; | |
else | |
echo "Por favor, informe sua senha do proxy"; | |
fi | |
done | |
# IP de proxy | |
while true; do | |
echo "Qual o IP do proxy? " | |
read ipproxy | |
if [ -n "$ipproxy" ]; then | |
break; | |
else | |
echo "Por favor, informe o IP do proxy"; | |
fi | |
done | |
# Porta de proxy | |
while true; do | |
echo "Qual a porta do proxy? " | |
read portaproxy | |
if [ -n "$portaproxy" ]; then | |
break; | |
else | |
echo "Por favor, informe a porta do proxy"; | |
fi | |
done | |
touch /etc/apt/apt.conf | |
echo "Acquire::http::proxy \"http://$usuarioproxy:$senhaproxy@$ipproxy:$portaproxy/\";" > /etc/apt/apt.conf | |
echo "Acquire::https::proxy \"https://$usuarioproxy:$senhaproxy@$ipproxy:$portaproxy/\";" >> /etc/apt/apt.conf | |
echo "Acquire::ftp::proxy \"ftp://$usuarioproxy:$senhaproxy@$ipproxy:$portaproxy/\";" >> /etc/apt/apt.conf | |
echo "PATH=\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games\"" > /etc/environment | |
echo "http_proxy=\"http://$usuarioproxy:$senhaproxy@$ipproxy:$portaproxy\"" >> /etc/environment | |
echo "https_proxy=\"http://$usuarioproxy:$senhaproxy@$ipproxy:$portaproxy\"" >> /etc/environment | |
echo "HTTP_PROXY=\"http://$usuarioproxy:$senhaproxy@$ipproxy:$portaproxy\"" >> /etc/environment | |
echo "HTTPS_PROXY=\"http://$usuarioproxy:$senhaproxy@$ipproxy:$portaproxy\"" >> /etc/environment | |
echo "ftp_proxy=\"http://$usuarioproxy:$senhaproxy@$ipproxy:$portaproxy\"" >> /etc/environment | |
echo "no_proxy=\"localhost *.localhost, *.dev, 172.17.0.1, 172.16.42.43\"" >> /etc/environment | |
echo "alias wget=\"wget --proxy-user=$usuarioproxy --proxy-passwd=$senhaproxy\"" >> /etc/environment | |
source /etc/environment | |
################################################################################ | |
# APT Update e Instalação dos pacotes básicos | |
################################################################################ | |
apt-get update | |
apt-get upgrade -y | |
apt-get install -y \ | |
linux-image-extra-virtual \ | |
apt-transport-https \ | |
ca-certificates \ | |
wget \ | |
curl \ | |
git \ | |
openjdk-8-jre \ | |
software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - | |
add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
apt-get update | |
apt-get install docker-ce -y | |
# docker-compose | |
curl -L https://github.com/docker/compose/releases/download/1.13.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose | |
gpasswd -a $USER docker | |
newgrp docker | |
# Instalação Netbeans | |
curl -O http://download.netbeans.org/netbeans/8.2/final/bundles/netbeans-8.2-php-linux-x64.sh | |
chmod +x netbeans-8.2-php-linux-x64.sh | |
sh netbeans-8.2-php-linux-x64.sh | |
rm -f netbeans-8.2-php-linux-x64.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment