Last active
April 23, 2021 18:02
-
-
Save jorgehs91/02b95e4ea6db7f5ca0fa055b3ff91c9f to your computer and use it in GitHub Desktop.
Revisions
-
Jorge Henrique revised this gist
Apr 23, 2021 . 2 changed files with 71 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,71 @@ #! /usr/bin/python3 import os apps = ['wget','curl','git','google-chrome','zsh','snapd','htop','docker-ce','docker-ce-cli','containerd.io','build-essential'] snapsClassic = ['code','phpstorm','datagrip','gitkraken','slack'] snaps = ['spotify','inkscape'] # Linux apt install print('\nInstalling native Apps') for app in apps: print('\nInstalling ' + app) os.system('sudo apt -y install ' + app) if app == 'zsh': os.system('sudo usermod -s $(which zsh) $(whoami)') if app == 'snapd': os.system('sudo ln -s /var/lib/snapd/snap /snap') os.system('sudo ln -s /usr/libexec/snapd /usr/lib/') # Snap Classic print('\nInstalling Snap Classic Apps') for snap in snapsClassic: print('\nInstalling ' + snap) os.system('sudo snap install ' + snap + ' --classic') # Snap print('\nInstalling Snap Apps') for snap in snaps: print('\nInstalling ' + snap) os.system('sudo snap install ' + snap) # Docker print('\nInstalling Docker') os.system('sudo apt update') os.system('sudo apt -y install apt-get install apt-transport-https ca-certificates curl gnupg lsb-release') os.system('curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg') os.system('echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null') os.system('sudo apt update') os.system('sudo apt-get install docker-ce docker-ce-cli containerd.io') os.system('sudo systemctl start docker') os.system('sudo groupadd docker') os.system('sudo usermod -aG docker $USER') os.system('newgrp docker') os.system('sudo curl -L "https://github.com/docker/compose/releases/download/1.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose') os.system('sudo chmod +x /usr/local/bin/docker-compose') # After installation, restart terminal and: # os.system('sudo sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"') # Environment setup os.system('sudo apt install composer') os.system('sudo apt install apache2') os.system('sudo apt -y install software-properties-common') os.system('sudo add-apt-repository ppa:ondrej/php') os.system('sudo apt install libapache2-mod-php7.4') os.system('sudo apt update') os.system('sudo apt -y install php7.4-{mysql,bcmath,ctype,curl,dom,gd,hash,iconv,intl,mbstring,openssl,pdo_mysql,simplexml,soap,xsl,zip,sockets}') os.system('sudo a2enmod rewrite') os.system('sudo echo "xdebug.client_host=localhost" >> /etc/php/7.4/mods-available/xdebug.ini') os.system('sudo echo "xdebug.mode=debug" >> /etc/php/7.4/mods-available/xdebug.ini') os.system('sudo echo "xdebug.start_with_request=yes" >> /etc/php/7.4/mods-available/xdebug.ini') os.system('sudo echo "xdebug.max_nesting_level=1024" >> /etc/php/7.4/mods-available/xdebug.ini') os.system('sudo apt install -y npm nodejs') os.system('sudo npm install -g yarn') -
Jorge Henrique created this gist
Apr 8, 2021 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,45 @@ #! /usr/bin/python3 import os apps = ['wget','curl','git','google-chrome','zsh','snapd','htop'] snapsClassic = ['code','phpstorm','datagrip','gitkraken','slack'] snaps = ['spotify','inkscape'] # Linux dfn install print('\nInstalling native Apps') for app in apps: print('\nInstalling ' + app) os.system('sudo dnf -y install ' + app) if app == 'zsh': os.system('sudo usermod -s $(which zsh) $(whoami)') if app == 'snapd': os.system('sudo ln -s /var/lib/snapd/snap /snap') os.system('sudo ln -s /usr/libexec/snapd /usr/lib/') # Snap Classic print('\nInstalling Snap Classic Apps') for snap in snapsClassic: print('\nInstalling ' + snap) os.system('sudo snap install ' + snap + ' --classic') # Snap print('\nInstalling Snap Apps') for snap in snaps: print('\nInstalling ' + snap) os.system('sudo snap install ' + snap) # Docker print('\nInstalling Docker') os.system('sudo dnf -y install dnf-plugins-core') os.system('sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo') os.system('sudo dnf -y install docker-ce docker-ce-cli containerd.io') os.system('sudo systemctl start docker') os.system('sudo groupadd docker') os.system('sudo usermod -aG docker $USER') os.system('newgrp docker') os.system('sudo curl -L "https://github.com/docker/compose/releases/download/1.29.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose') os.system('sudo chmod +x /usr/local/bin/docker-compose')