A sample fiber Bragg grating(SFBG) with Gaussian apodization profile is designed and optimized for the narrowband wavelength filter,and the relevant conclusions provide a guide for the further filter fabrication.With the grating length limited,a narrowband(5 GHz) grating filter used in the radio over fiber(ROF) system is fabricated,which has insertion loss of 3.463 dB,sideband suppression of 24.21dB,3 dB bandwidth of 40 pm,and 20 dB bandwidth of 106.3 pm.