Under $\textit {ergodic}$ per-user quality-of-service and per-remote antenna unit (RAU) transmit power constraints, we investigate the problem of maximizing energy efficiency (EE) of distributed massive MIMO systems, which is known to be non-convex. To solve this challenging problem efficiently, we first derive closed-form expressions for the spectral efficiency and the power control parameters (related to per-RAU transmit power constraint) with zero-forcing (ZF) and maximum ratio transmission (MRT) beamforming, and then develop a computationally feasible power allocation algorithm using the tools of fractional programming and sequential convex approximation. The derived closed-form expressions are functions of only slowly changing large-scale fading which enables us to solve the optimization problem over a longer time interval. The proposed power allocation algorithm is guaranteed to converge to the Karush–Kuhn–Tucker points of the original non-convex EE maximization problem. The simulation results demonstrate the accuracy of the derived expressions and the effectiveness of the proposed algorithm. Moreover, some insightful conclusions are arrived at from the EE comparisons between different beamforming schemes (ZF and MRT) and different antenna deployments (distributed and co-located).