Raman spectra have been measured on iron-based quaternary CeO$_{1-x}$F$_x$FeAs and LaO$_{1-x}$F$_x$FeAs with varying fluorine doping at room temperatures. A group analysis has been made to clarify the optical modes. Based on the first principle calculations, the observed phonon modes can be assigned accordingly. In LaO$_{1-x}$F$_x$FeAs, the E$_g$ and A$_{1g}$ modes related to the vibrations of La, are suppressed with increasing F doping. However F doping only has a small effect on the E$_g$ and A$_{1g}$ modes of Fe and As. The Raman modes of La and As are absent in rare-earth substituted CeO$_{1-x}$F$_x$FeAs, and the E$_g$ mode of oxygen, corresponding to the in-plane vibration of oxygen, moves to around 450 cm$^{-1}$ and shows a very sharp peak. Electronic scattering background is low and electron-phonon coupling is not evident for the observed phonon modes. Three features are found above 500 cm$^{-1}$, which may be associated with multi-phonon process. Nevertheless it is also possible that they are related to magnetic fluctuations or interband transitions of d orbitals considering their energies.