  The X-ray background (XRB) is produced by a large number of faint sources
distributed over a wide range of redshifts. The XRB carries information on the
spatial distribution and evolution of these sources. The goals of the paper
are: 1. to determine the redshift distribution of the soft X-ray background
photons produced by all types of extragalactic sources, in order to relate
fluctuations of the background to the large scale structures, 2. to determine
the redshift distribution of the soft XRB produced by AGN in order to calculate
the evolution of the AGN X-ray luminosity density. A set of major X-ray surveys
is used to determine the redshift distributions of the X-ray sources selected
at various flux levels. Simple analytic fits to the data allow us to determine
the smooth relationship between the redshift distribution and the source flux.
The redshift distribution of the integral XRB flux is obtained by averaging the
fits over the source counts. It is shown that the distribution of extragalactic
XRB photons in the 0.5-2 keV band is adequately represented by the function:
dn/dlog z = 5.24 z^1.52 exp(-z/0.63). The huge voids postulated to explain the
cold spots in the CMB maps create dips in the total XRB flux. However, the
expected magnitude of the effect is comparable to the fluctuation amplitude of
the XRB generated by the individual sources contributing to the background. The
cosmic evolution of the AGN X-ray luminosity density up to redshift of ~5 is
calculated in an elegant and straightforward way. Systematic uncertainties of
the present method are assessed and shown to be small. At redshift greater than
one the present results could be compared directly with some recent estimates
obtained in a standard way and the agreement between both methods is very good.
