Skip to content

Instantly share code, notes, and snippets.

@svandragt
Created September 13, 2016 09:21
Show Gist options
  • Save svandragt/31df98b1e94ed653b3d8d4787c7fde08 to your computer and use it in GitHub Desktop.
Save svandragt/31df98b1e94ed653b3d8d4787c7fde08 to your computer and use it in GitHub Desktop.
Getting started on a new linux server
#!/bin/sh
sudo su
# fix hostname
nano /etc/hostname
hostname -F /etc/hostname
echo "#12.34.56.78 plato.example.com plato
#127.0.0.1 localhost.localdomain localhost" | cat - /etc/hosts > /tmp/hosts && mv /tmp/hosts /etc/hosts
nano /etc/hosts
# timezone
dpkg-reconfigure tzdata
# install aptitude and upgrade packages
apt-get install aptitude
aptitude update
aptitude upgrade
aptitude install fail2ban
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment