Last active
April 18, 2021 20:07
-
-
Save nickdavies791/e7222d66eaa71b0ede8647dfdadda12f to your computer and use it in GitHub Desktop.
Linux Install Script - Web Dev
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
# Directory Aliases | |
alias code="cd $HOME/Code" | |
# Laravel Aliases | |
alias art="php artisan" | |
alias migrate="php artisan migrate" | |
alias rollback="php artisan migrate:rollback --step=1" | |
alias seed="php artisan db:seed" | |
# NPM Aliases | |
alias watch="npm run watch" | |
alias dev="npm run dev" | |
alias nfresh="rm -rf node_modules/ && npm install" | |
# Composer Aliases | |
alias cda="composer dump-autoload -o" | |
alias cfresh="rm -rf vendor/ && composer -i" | |
# Vagrant | |
alias vgs="vagrant global-status" | |
alias vu="vagrant up" | |
alias vh="vagrant halt" | |
alias vssh="vagrant ssh" | |
alias vrl="vagrant reload" | |
alias vrebuild="vagrant destroy --force && vagrant up" | |
# Git Aliases | |
alias gst="git status" | |
alias gb="git branch" | |
alias gl="git log --branches --oneline --decorate --color" | |
alias glt="git log --branches --oneline --decorate --color --author=\"Nick Davies\" --since=today.midnight" | |
alias gly="git log --branches --oneline --decorate --color --author=\"Nick Davies\" --since=yesterday.midnight --until=today.midnight" | |
alias glat="git log --branches --decorate --color --author=\"Nick Davies\" --since=today.midnight" | |
alias glay="git log --branches --decorate --color --author=\"Nick Davies\" --since=yesterday.midnight --until=today.midnight" | |
alias gla="git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) - (%(color:green)%(committerdate:relative)%(color:reset))'" | |
alias nuke="git clean -df && git reset --hard" | |
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 | |
## Update and Upgrade | |
sudo apt update -y | |
sudo apt upgrade -y | |
## Move into Downloads folder before downloading files | |
cd ~/Downloads | |
## Install curl | |
sudo apt install curl -y | |
## Install PHP 7.4 | |
sudo apt install php7.4-cli -y | |
## Install PHP dependencies | |
sudo apt install php7.4-mbstring php7.4-gd php7.4-xml php7.4-zip php7.4-json php7.4-bcmath php7.4-ctype php7.4-tokenizer -y | |
## Install Composer | |
curl -sS https://getcomposer.org/installer -o composer-setup.php | |
HASH=`curl -sS https://composer.github.io/installer.sig` | |
echo $HASH | |
php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer | |
rm composer-setup.php | |
## Install VirtualBox 6.1.18 | |
curl -O https://download.virtualbox.org/virtualbox/6.1.18/virtualbox-6.1_6.1.18-142142~Ubuntu~eoan_amd64.deb | |
sudo apt install ./virtualbox-6.1_6.1.18-142142~Ubuntu~eoan_amd64.deb | |
rm virtualbox-6.1_6.1.18-142142~Ubuntu~eoan_amd64.deb | |
## Install Vagrant | |
curl -O https://releases.hashicorp.com/vagrant/2.2.14/vagrant_2.2.14_x86_64.deb | |
sudo apt install ./vagrant_2.2.14_x86_64.deb -y | |
rm vagrant_2.2.14_x86_64.deb | |
## Install NFS Dependencies | |
sudo apt install nfs-common nfs-kernel-server -y | |
## Install Ansible | |
sudo apt install ansible -y | |
## Install vim | |
sudo apt install vim -y | |
## Install Git | |
sudo apt install git -y | |
git config --global user.name "XXXX XXXXXX" | |
git config --global user.email "xxxxx@xxxx.xxx" | |
git config --global core.editor "vim" | |
## Install NVM, Node, NPM | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash | |
nvm install v14.15.5 | |
## Install libpng-dev | |
sudo apt install libpng-dev -y | |
## Install DBeaver Community Edition | |
wget https://dbeaver.io/files/dbeaver-ce_latest_amd64.deb | |
sudo apt install ./dbeaver-ce_latest_amd64.deb | |
rm dbeaver-ce_latest_amd64.deb | |
## Install Google Chrome | |
curl -O https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
sudo apt install ./google-chrome-stable_current_amd64.deb -y | |
rm google-chrome-stable_current_amd64.deb | |
## Install PHPStorm | |
wget https://download.jetbrains.com/webide/PhpStorm-2020.3.3.tar.gz | |
sudo tar xvf PhpStorm-2020.3.3.tar.gz --directory /opt/ | |
## Install Notepadqq | |
sudo apt install notepadqq -y | |
## Install Slack | |
curl -O https://downloads.slack-edge.com/linux_releases/slack-desktop-4.12.2-amd64.deb | |
sudo apt install ./slack-desktop-4.12.2-amd64.deb | |
rm slack-desktop-4.12.2-amd64.deb | |
## Remove unrequired packages | |
sudo apt autoremove -y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment