We have been developing a photocathode rf gun. The rf gun with multi cell can produce a high energy electron beam, so it may be used for numerous applications such as medicine and industry. At the Laser Undulator Compact X-ray source facility, called LUCX, we have developed a compact X-ray source based on inverse Compton scattering . An S-band 3.5 cell rf electron gun which is 20 cm long can produce a high quality electron beam with energy of 8.7 MeV. According to the simulation, the emittance of 3.5 cell rf gun is as low as that of 1.6 cell rf gun. The electromagnetic design has been performed by the code SUPERFISH, and the particle tracing by PARMELA. The new rf gun is already installed and produced a high quality electron beam with energy of 8.7 MeV. As a consequence of the substantial efforts of developing rf cavity, we decide to make a compact RF accelerating structure with more cell for achieving a smaller system. The measurement results of using the 3.5 cell rf gun, the design of 12 cell booster cavity, and current status of 12 cell cavity manufacturing will be presented at the conference.