Ubuntu Cheat Sheet

Update all

apt-get update
apt-get upgrade
apt-get dist-upgrade
touch /etc/motd.tail
reboot now

Install MyPHPadmin

apt-get update
apt-get install php5-mcrypt
php5enmod mcrypt
apt-get install php5-curl
apt-get install phpmyadmin
service apache2 restart

if you mess up dpkg-reconfigure phpmyadmin )

add 4gb swapfile

fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
swapon -s
nano /etc/fstab
(add to bottom line)
/swapfile none swap sw 0 0

UncomplicatedFirewall (UFW)

 ufw status
 ufw allow ssh
 ufw allow http
 ufw allow https
 ufw logging on
 ufw logging medium
 ufw allow 53/udp
 ufw enable
 ufw disable


Disable mod_security in .htaccess (if you have some better firewall in place)

<IfModule mod_security.c>
 SecFilterEngine Off
 SecFilterScanPOST Off