We showed that magnetic fields are generated in the plasma which have the temperature inhomogeneities. The mechanism is the same as the Weibel instability because the velocity distribution functions are at non-equilibrium and anisotropic under the temperature gradients. The growth timescale is much shorter than the dynamical time of structure formation. The coherence length of magnetic fields at the saturated time is much shorter than kpc scale and then, at nonlinear phase, become longer by inverse-cascade process. We report the application of our results to clusters of galaxies, not including hydrodynamic effects.