Nanometer measurement has become more and more important in the development of metrology, material science, microelectronics and biology. Heterodyne Fabry-Perot interferometer can be used in the nonlinear error calibration with an accuracy of nanometer and sub-nanometer order. We can get very high resolution by using heterodyne Fabry-Perot interferometer frequency locking technique in theory. However, the measure uncertainty and the stability of results are worse than the expectation's. In this paper, in order to solve the problems of air refrective index change and temperature excursion, we designed the vacuum system that adjusts the interference light path and built it based on NIM's heterodyne Fabry-Perot interferometer. The key in our design is to reduce the thermic balance time and to ensure reliable hermetization of movable components. The influnce of the change of air refractive index to the measured precision was studied, and the approximate formula of vacuum degree that the system requires was concluded. It has been proved in the experiment that the system works steadily. The system's ability of anti-jamming has been improved, and the demand of the measure surroundings has been lowered. Comparing with capacitance displacement measurement instrument, we conclude that the nonlinear degree of this system in the range of 0.35um, which is longer than half of the wavelength of the laser, is better than 3.9nm.