Forked from hewersonfreitas/post-install-ubuntu-lts.sh
Last active
August 4, 2020 22:44
-
-
Save lucasapoena/b6202c5c824443cfe9edcd7bb7a98816 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
#!/bin/bash | |
################################################################# | |
## Script de configuração geral - Linux | |
## By Hewerson Freitas (https://github.com/hewersonfreitas) | |
################################################################ | |
## Update and Upgrade Distro | |
sudo apt update && sudo apt upgrade -y && | |
## Install Addons Codecs | |
sudo apt install ubuntu-restricted-extras -y && | |
## Setting Buttons to Left Side | |
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize' && | |
gsettings set org.gnome.desktop.wm.preferences button-layout 'close,minimize,maximize:' && | |
## Install Chromium|Chrome Browser | |
sudo apt install chromium-browser -y && | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && | |
sudo apt-get install ./google-chrome-stable_current*.deb -y && | |
## Install NFS Server | |
sudo apt install nfs-kernel-server -y && | |
## Install GIT | |
sudo apt install git git-core -y && | |
## Install Discord via Snap | |
sudo snap install discord && | |
## Install FileZilla | |
sudo apt install filezilla -y && | |
## Install MySQL Server, Workbench and disable service init.d, to using containers Docker | |
sudo apt install mysql-server -y && | |
sudo apt install mysql-workbench -y && | |
sudo systemctl disable mysql && | |
sudo service mysql stop | |
## Add Requirements before add repositorys | |
sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg-agent \ | |
software-properties-common -y && | |
## Add Repository VS Code & Docker & Insomnia | |
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add - && | |
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" && | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" && | |
echo "deb https://dl.bintray.com/getinsomnia/Insomnia /" \ | |
| sudo tee -a /etc/apt/sources.list.d/insomnia.list && | |
wget --quiet -O - https://insomnia.rest/keys/debian-public.key.asc \ | |
| sudo apt-key add - && | |
## Update List Repository | |
sudo apt-get update && | |
## Install Insomnia & VS Code & Docker & PHP Storm | |
sudo apt-get install insomnia -y && | |
sudo apt install code -y && | |
sudo snap install phpstorm --classic && | |
sudo apt-get install docker-ce docker-ce-cli containerd.io -y && | |
## Add Permissions and Groups Docker and www-data | |
sudo groupadd docker && \ | |
sudo usermod -aG docker $USER && \ | |
sudo usermod -aG www-data $USER && \ | |
sudo adduser $USER www-data && \ | |
mkdir $HOME/html && \ | |
sudo chown -R $USER:www-data $HOME/html && \ | |
sudo chmod -R g+rwX $HOME/html | |
## Share folder /html in server NFS to Docker Volumes | |
echo "$HOME/html *(rw,sync,no_subtree_check,no_root_squash)" | sudo tee -a /etc/exports && | |
sudo exportfs -a && sudo systemctl restart nfs-kernel-server && | |
## Install Docker Compose | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \ | |
sudo chmod +x /usr/local/bin/docker-compose && | |
## Clean All Apt Cache | |
sudo apt clean -y && \ | |
sudo apt autoclean -y && \ | |
sudo apt autoremove -y | |
## Restart session | |
gnome-session-quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment