In this paper,a scheme is proposed for remote state preparation(RSP)with cavity quantum electrodynamics(QED).In our scheme,two observers share two-atom nonmaximally entangled state as quantum channels and can realize remote preparation of state of an atom.We also propose a generalization for remote preparation of N-atom entangled state by(N+1)-atom GHZ-like state(N≥2).By this scheme,one single-atom projective measurement is enough for the RSP of a qubit or N-atom entangled state,and the probability of Success for RSP is unity.Furthermore,we have considered the case where observers use W-like state as quantum channels to realize RSP of a qubit.We compare our scheme with existing ones.