The multi-rigid-bodies model for the single barrel gun has been developed and the structure vibration of the gun has been analyzed though Lagrangian equations reduced by the software on microcomputer. It is shown that the deck stiffness is significant in the effect of the gun vibration, and then that design of a suitable equilibrium equipment and design of the elastic connection axle to increasing the flexibility in pitching movement can effectively decrease the vibration amplitudes of the tube end. The maximum amplitude, for example, could decay to ten percent of that when the measures mentioned above are adopted. It also indicates that entirely removing the vibration is impossible except relevant vibration absorbing measures are adopted. The method and results are also significant in checking the motions of the mechanisms designed in the guns.