Last active
August 29, 2015 14:03
-
-
Save felixfischer/8f27e053e8d551e4f417 to your computer and use it in GitHub Desktop.
DigitalOcean Droplet initialization
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
# execute this script by running the following command as root on your droplet | |
# bash -c "$(curl -fsSL https://gist.githubusercontent.com/felixfischer/8f27e053e8d551e4f417/raw/do-droplet-init.sh)" | |
echo -e "\n--> Fixing locale warnings\n" | |
locale-gen de_DE.UTF-8 | |
echo -e "\n--> Updating the system\n" | |
apt-get update | |
apt-get -y upgrade | |
echo -e "\n--> Installing Docker\n" | |
curl -s https://get.docker.io/ubuntu/ | sh | |
echo -e "\n--> Creating Swap File\n" | |
fallocate -l 4G /swapfile | |
ls -lh /swapfile # check that it is there | |
echo -e "\n--> Make /swapfile a Swap File\n" | |
mkswap /swapfile | |
echo -e "\n--> Activate Swap File\n" | |
swapon /swapfile | |
swapon -s # show active swap files to check that it worked | |
echo -e "\n--> Make Swap File permanent\n" | |
echo "/swapfile none swap sw 0 0" >> /etc/fstab | |
tail /etc/fstab -n 3 # show last 3 lines of /etc/fstab for verification | |
echo -e "\n--> Set DEBIAN_FRONTEND=noninteractive to avoid error messages" | |
echo "DEBIAN_FRONTEND=noninteractive" >> /etc/profile | |
tail /etc/profile -n 3 # show last 3 lines of /etc/profile for verification | |
echo -e "--> PLEASE REBOOT NOW" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment