We consider the problem of maximizing the reliability of a series-parallel system given cost and weight constraints on the system. The number of components in each subsystem and the choice of components are the decision variables. In this paper, we propose an integer linear programming approach that gives an approximate feasible solution, close to the optimal solution, together with an upper bound on the optimal reliability. We show that integer linear programming is an interesting approach for solving this reliability problem: the mathematical programming model is relatively simple; its implementation is immediate by using a mathematical programming language and an integer linear programming software, and the computational experiments show that the performance of this approach is excellent based on comparison with previous results.