We study an initial boundary value problem for the Navier-Stokes equations of compressible viscous heat-conductive fluids in a 2-D periodic domain or the unit square domain. We establish a blow-up criterion for the local strong solutions in terms of the gradient of the velocity only, which coincides with the famous Beale-Kato-Majda criterion for ideal incompressible flows.