The recent advances in 3-D imaging of porous structures have generated a tremendous interest in the simulation of complex single and two-phase flows. Lattice-Boltzmann (LB) schemes present a powerful tool to solve the flow field directly from the binarized 3-D images. However, as viscosity often plays an important role, the LB scheme should correctly treat viscosity effects. This is the case using a LB scheme with two relaxation times (TRT) unlike the broadly used, the single-relaxation rate, BGK, where the velocity of the modeled fluid does not vary as the inverse of the viscosity applying the bounce-back (no-slip) boundary rule. The aim of this work is to apply the LB-TRT approach to different types of porous media (straight channels, 2-D model porous media, sandstone) to solve for the flow field and to evaluate the approach in terms of parameter dependence, error and convergence time on the basis of permeability. We show that the variation of permeability with the free relaxation parameter Λ of the TRT scheme depends on the heterogeneity of the sample and on the numerical resolution. The convergence time depends on the applied viscosity and the parameter standing for the speed of sound, thus the computation time can be reduced by choosing appropriate values of those parameters. Two approaches to calculate permeability (Darcy's law and viscous energy dissipation) are proposed and investigated. We recommend to use Darcy's law, as dependence on Λ is less important. Periodic (in the presence of a driving body force) and pressure boundary conditions are evaluated in terms of the results.