Friday, March 15, 2013

CentOs - Tips and tricks

This post will hold the tips and tricks cheat sheet for things related to CentOs. I will add things to this post as and when I face issues. Please comment here if you would like to add sth to the list or if sth is wrong. Thanks in advance.

I'm using CentOS release 6.3 (Final) version as a base for my VM. I usually get a basic OVA, deploy it to some ESXi host and add my stuff on top of it. That usually means I deploy my web applications, databases, maven repository, etc.
  • When deployed to some host and powered on, no IP address is configured?
         In this version, network service is not started at boot time. Since my OVA is preconfigured my eth0 config looks like this:

DEVICE="eth0"
BOOTPROTO="dhcp"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"

    Look at this link for using other options like static IP or to set up DNS servers: http://linhost.info/2011/12/centos-6-has-no-network-connectivity/

    After configuring eth0, just fire up the following command

service network restart
 
  This would contact dhcp server and get your IP. Then ifconfig should list the interfaces for you with updated IP.

1. This really isn't just related to CentOS but here's to general Linux tips.

To find folder/file recursively, "find $PWD -type d -name 'target"

No comments: