Here is how to configure a static IP on CentOS 6 via command line.
- Determine which interface you want to configure--in this example, I will be using eth0
- Edit the interface you wish to configure (I'll use nano as vi requires some knowledge for beginner Linux users)
- Use the following settings and then use Control+O to Save and Control+X to Exit
- Next, let's configure the hostname and default gateway. We will use nano again to edit the file.
- Next, let's configure our DNS servers to resolve domain names (in this case, I will set mine to use Google's DNS servers)
- Restart the networking service for the changes to take effect