I always get lost when it comes to configuring things like DNS, default gateway, IP settings and so on in Linux - more precise ESX and appliances.
Being tired of always have to google the answers, this post should cover how to do basic IP configuration changes in Linux.
The paths are taken from the VMware vMA 4.0 appliances, which is based on RedHat distribution. I figure most of the filenames are the same, but for some distros the paths might be different. They are in some cases my experience tells me.
Default gateway and hostname:
File:
/etc/sysconfig/network
Values:
HOSTNAME=FQDN
GATEWAY=10.0.0.1
DHCP, IP and netmask:
File:
/etc/sysconfig/network-scripts/ifcfg-eth0 (where eth0 corresponds to the interface you want to configure eth1, eth2 etc.)
Values:
BOOTPROTO=none (configures the device for static IP, set to =DHCP for...yes DHCP)
IPADDR=10.0.0.1
NETMASK=255.255.255.0
DNS and search order:
File:
/etc/resolv.conf
Values:
search domain.com (this corresponds to DNS suffix in the windows world)
nameserver 10.0.0.1
nameserver 10.0.0.2
nameserver values are picked on the order they are listed.
After you have made the changes restart networking on the host:
service network restart
One more thing i always forget hot to set: Keyboard layout
In many cases when deploying linux based appliances, the default keyboard is en-US, which can be bothersome when using a Danish keyboard. loadkeys should do the work:
loadkeys dk
A good command to know as well is the find command
find / -name resolv*
The first argument is the path to start in, and the -name defines what file you are looking for. The examples also shows that you can use wildcards when searching.
Thats all i remembered i forgot for now. Will update the post when i forget some more.
Thanks to http://www.linuxquestions.org/ - a really nice place for those of us who get lost when paths do not start with C:\ ...