In mobile communication systems, device-to-device (D2D) communication and nonorthogonal multiple access (NOMA) are effective ways to improve spectrum efficiency and system throughput. In the NOMA-based D2D system, social relationship among D2D users is introduced to form D2D clusters, and NOMA is used for many-to-one communication in each D2D cluster. This paper proposes a joint channel allocation and power control algorithm which decomposes the resource allocation problem into two subproblems: channel allocation and power control. Matching theory is utilized to allocate channels for D2D clusters and sequential convex programming is applied to transform the optimization target to a convex problem before solving it via genetic algorithm. Simulation results indicate the superiority of our algorithm in improving the system throughput on the basis of meeting users’ needs for files.