Nonorthogonal multiple access (NOMA), which can improve the spectrum efficiency and system throughput compared with conventional orthogonal multiple access (OMA), has been regarded as a promising technique for the fifth-generation (5G) mobile communication network. In this paper, we consider a NOMA-based relaying networks over Nakagami-m fading channels, where the base station communicates with multiple mobile users simultaneously through the help of an amplify-and-forward (AF) relay. First, we study the system outage behavior, and closed-form expressions for the exact outage probability and simple bounds of the outage probability are obtained, respectively. The analytical results are further evaluated in the high-signal-to-noise-ratio (SNR) regime to explicitly characterize the diversity order of the network. Next, the ergodic sum rate achieved by the network is investigated, and expressions for the lower and upper bounds of the ergodic sum rate are derived. Finally, numerical examples are conducted to confirm the validity of our analysis and show a comparison of NOMA against conventional OMA networks. NOMA is reported to outperform conventional OMA and provide better spectral efficiency and user fairness.