A first-principle approach to the calculation of dc conductivities of the porous medium and composite is developed. In this paper, the case of the porous medium with periodic structure is discussed in detail. The effective conductivities for many two dimensional porous systems are calculated by polynomial approximation, Fourier expansion using elimination procedure and iterative approach of Fourier expansion Critical exponents for the dc conductivity of Sierpinski carpets are also calculated by an improved iterative approach. All the theoretical results agree fairly with recent experimental measurements.