curl -X GET -H "Cache-Control: no-cache" -A "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36"
curl -X GET -H "Cache-Control: no-cache" -A "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36"
Remove failed disks from the array
mdadm --manage /dev/md0 --remove /dev/sdb1
Add new disk
Create the exact same partitioning as on /dev/sda.
sfdisk -d /dev/sda | sfdisk /dev/sdb
Add disk to mdx arrays
mdadm --manage /dev/md0 --add /dev/sdb1
Let it sync, then add bootloader to disks
# grub grub> find /grub/stage1 (hd0,0) (hd1,0) grub> device (hd0) /dev/sda grub> root (hd0,0) grub> setup (hd0) grub> device (hd0) /dev/sdb grub> root (hd0,0) grub> setup (hd0)
Links:
Most people recommend setting up the hostname on a Linux box so that:
1) running ‘hostname‘ returns the short name (i.e. myhost)
2) running ‘hostname -f‘ returns the FQDN (i.e. myhost.prod.example.com)
3) running ‘hostname -d‘ returns the domain name (i.e prod.example.com)
After experimenting a bit and also finding this helpful Server Fault post, here’s what we did to achieve this (we did it via Chef recipes, but it amounts to the same thing):
myhost
(also run ‘hostname myhost‘ at the command line)
10.0.1.10 myhost.prod.example.com myhost myhost.prod
search prod.example.com
grep "Invalid user " /var/log/auth.log | cut -d' ' -f10 | awk '{a[$0]++}END{for(i in a)print i,a[i]}' | sort -k 2 -n -r | head -n 100
grep "Invalid user " /var/log/auth.log | cut -d' ' -f8 | awk '{a[$0]++}END{for(i in a)print i,a[i]}' | sort -k 2 -n -r | head -n 100
wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip
Allowing Incoming Traffic on Specific Ports
sudo iptables -A INPUT -p tcp --dport ssh -j ACCEPT
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10| head -n 4
Source: http://blog.colovirt.com/2009/01/07/linux-generating-strong-passwords-using-randomurandom/