One thing I’ve done for a long time right after installing debian or ubuntu is issuing
# apt-get install build-essential
It’s great because it pulls down the most common stuff needed for ‘everyday’ compiling and meddling with compiling sources and so on.
In CentOS I can’t find any similar package group, but according to centos.org one may achieve pretty much the same with
# install gcc gcc-c++ kernel-devel