Last active
May 14, 2019 17:15
-
-
Save pedro-stanaka/313753bed76def5a95255b0849d7b502 to your computer and use it in GitHub Desktop.
Very Opinionated Post Install Script Ubuntu 17.10
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 characters
#!/bin/bash | |
####### DISCLAIMER: ############################################################### | |
# Use this script at your own risk, I DO NOT HOLD RESPONSABILITIES FOR DAMAGES! # | |
# READ EVERYTHING BEFORE RUNNING! YOU'VE BEEN WARNED! # | |
################################################################################### | |
## Config ## | |
### Git | |
AUTHOR="My Name Here" | |
EMAIL="[email protected]" | |
###### SETUP ###### | |
## Kernel Params | |
### Memory Tweaks | |
sudo tee -a /etc/sysctl.d/99-sysctl.conf <<-EOF | |
vm.swappiness=5 | |
vm.vfs_cache_pressure=50 | |
EOF | |
### Storage Tunning | |
sudo tee -a /etc/sysctl.d/99-sysctl.conf <<-EOF | |
vm.dirty_background_bytes=16777216 | |
vm.dirty_bytes=50331648 | |
EOF | |
## Update and Upgrade OS | |
sudo apt-get update --fix-missing | |
sudo apt-get upgrade -y | |
sudo apt-get install -f -y | |
## Basic stuff | |
sudo apt-get install -y vim zsh git build-essential ubuntu-restricted-extras htop aptitude tmux | |
## Power optimization | |
sudo apt-get install powertop tlp thermald | |
### FASD | |
echo "Installing FASD... Command line utility" | |
git clone https://github.com/clvv/fasd.git /tmp/fasd && cd /tmp/fasd && sudo make install | |
echo "To get fasd working enter the following in one terminal window: eval \"\$(fasd --init auto)\"" | |
### BROWSER | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -O google-chrome.deb | |
sudo dpkg -i google-chrome.deb | |
sudo apt-get install -f -y && rm -f google-chrome.deb | |
### Sublime Text | |
sudo add-apt-repository ppa:webupd8team/sublime-text-3 -y | |
sudo apt-get update | |
sudo apt-get install sublime-text-installer | |
### VS Code | |
sudo wget -O - https://tagplus5.github.io/vscode-ppa/ubuntu/gpg.key | sudo apt-key add - && \ | |
sudo wget -O /etc/apt/sources.list.d/vscode.list https://tagplus5.github.io/vscode-ppa/ubuntu/vscode.list && \ | |
sudo apt update && | |
sudo apt install code code-insiders | |
## Configure GIT ## | |
git config --global user.name $AUTHOR | |
git config --global user.email $NAME | |
## SSH Config | |
ssh-keygen -t rsa -b 2048 -f $HOME/.ssh/id_rsa -N '' | |
echo "Take time to configure your newly created key on your Git server(s) and configure your dotfile repository" | |
echo "After configuring your dotfiles, run the 1_dev_post_install.sh script" |
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 characters
#!/bin/bash | |
####### DISCLAIMER: ############################################################### | |
# Use this script at your own risk, I DO NOT HOLD RESPONSABILITIES FOR DAMAGES! # | |
# READ EVERYTHING BEFORE RUNNING! YOU'VE BEEN WARNED! # | |
################################################################################### | |
## Config ## | |
### PostgreSQL | |
PG_VERSION="9.6" | |
PG_VOL_FOLDER="/data/YOUR_FOLDER" | |
########## SETUP TOOLS ########### | |
# ASDF | |
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.4.0 | |
echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.zshrc | |
echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.zshrc | |
# NodeJS | |
asdf plugin-add nodejs https://github.com/asdf-vm/asdf-nodejs.git | |
. ~/.asdf/plugins/nodejs/bin/import-release-team-keyring | |
# Rails | |
echo "Installing Ruby with Rails" | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB | |
\curl -sSL https://get.rvm.io | bash -s stable | |
rvm install ruby | |
gem install bundler | |
gem install nokogiri | |
gem install rails | |
gem install rubocop | |
# Docker | |
curl -fsSL get.docker.com -o get-docker.sh | |
sh get-docker.sh | |
sudo systemctl enable docker | |
sudo groupadd docker | |
sudo usermod -aG docker $USER | |
echo "Docker will be usable without sudo after login out" | |
sudo docker image pull postgres:$PG_VERSION | |
sudo docker container run -d -p 5432:5432 -v $PG_VOL_FOLDER:/var/lib/postgresql/data --name postgres | |
echo "PostgresSQL is now running on docker :5432. For any custom configurations inside PG, please execute sudo docker exec -it psql postgres postgres" | |
## TMUX | |
git clone --recursive https://github.com/tony/tmux-config.git ~/.tmux | |
ln -s ~/.tmux/.tmux.conf ~/.tmux.conf | |
cd ~/.tmux/vendor/tmux-mem-cpu-load && \ | |
mkdir build && \ | |
cd build && \ | |
cmake .. && \ | |
make && \ | |
sudo make install | |
## Java and JDK | |
sudo apt-add-repository ppa:webupd8team/java -y | |
sudo apt-get update | |
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections | |
sudo apt-get install -y oracle-java8-installer | |
sudo apt-get install oracle-java8-set-default | |
# Jetbrains Toolbox | |
echo "Installing Jetbrains Toolbox..." | |
wget https://download.jetbrains.com/toolbox/jetbrains-toolbox-1.6.2914.tar.gz -O jetbrains-toolbox.tar.gz | |
tar -xf jetbrains-toolbox.tar.gz && mkdir -p $HOME/Applications/bin \ | |
&& mv jetbrains-toolbox-1.6.2914/jetbrains-toolbox $HOME/Applications/bin | |
&& echo 'export PATH="$PATH:$HOME/Application/bin" | |
# VSCode Plugins | |
echo "Installing VSCode Extensions" | |
code --install-extensions robertohuertasm.vscode-icons #VSCode icons | |
code --install-extension esbenp.prettier-vscode #Prettier | |
code --install-extension msjsdiag.debugger-for-chrome #Chrome Debugger | |
code --install-extension Zignd.html-css-class-completion #Css Intelisense | |
##VSCode Ruby | |
gem install ruby-debug-ide -v 0.6.0 | |
gem install debase -v 0.2.2.beta11 | |
gem install rcodetools | |
code --install-extension rebornix.Ruby #Ruby |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment