The planning of multi-access edge computing (MEC) systems does not only consist in distributing MEC servers among the base stations (BSs) but also in designing the network to interconnect BSs, MEC resources and the wide area network (WAN) gateway. Due to their high bandwidth, fiber links are the best option for those connections in 5G environments. In contrast to previous works, which only solve the server placement problem, in this paper, an integer linear programming (ILP) formulation is proposed for solving both problems while reducing the installation cost (servers and fibers). The fiber deployment cost is especially important in sparsely populated areas as the distance between BSs are much longer than in urban environments. The model was tested using real BSs locations and population data showing that the formulation considerably reduces the installation cost.