Last active
June 3, 2019 16:12
-
-
Save rdeavila/3ca89a2cb7a7a32ac01b6c20a223e2d3 to your computer and use it in GitHub Desktop.
swap, updates e dependências
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 | |
# Swap | |
sudo -u root -H fallocate -l 4G /swapfile | |
sudo -u root -H chmod 600 /swapfile | |
sudo -u root -H mkswap /swapfile | |
sudo -u root -H swapon /swapfile | |
sudo -u root -H echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab | |
sudo -u root -H echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf | |
sudo -u root -H echo 'vm.vfs_cache_pressure=50' | sudo tee -a /etc/sysctl.conf | |
sudo -u root -H sysctl -p | |
# Atualizações | |
sudo apt-get -qq update | |
DEBIAN_FRONTEND=noninteractive sudo apt-get -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install jq python-pip | |
sudo pip install awscli | |
# Limpeza | |
sudo apt-get -qq clean && sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment