30 January 2013

Static IP on Linux

Setting static IP and resolv.conf to prevent resolv.conf being reset on reboot.

/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:24:1F:23:65:C1
NM_CONTROLLED=yes
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.3.183
NETMASK=255.255.255.0
GATEWAY=192.168.3.1

/etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4

04 January 2013

Yii Debug

error_reporting(E_ALL);
ini_set('display_errors', '1');

Recursive Download using FTP

Recursively download files, while not creating any host directory, and skip downloads that would download to existing files.
wget -r -nH -c --ftp-user=USER --ftp-password=PASS ftp://domainname.com