In this paper, we present an analytical solution to the axisymmetric elasticity problem for an inhomogeneous solid cylinder subjected to external force loadings, which vary within the axial coordinate. The material properties of the cylinder are assumed to be arbitrary functions of the radial coordinate. By making use of the direct integration method, the problem is reduced to coupled integral equations for the shearing stress and the total stress (given by the superposition of the normal ones). By making use of the resolvent-kernel solution, the latter equations were uncoupled and then solved in a closed analytical form. On this basis, the effect of variable material moduli in the stress distribution has been examined with special attention given to the negative Poisson's ratio.