In order to realize fully distributed measurement for temperature and pressure in an oil well, a measurement method of distributed temperature and pressure based on scattering theory of optical fiber is established. The method makes the common optical fiber into the sensing fiber through package design. Since the scattered light in the sensor fiber is modulated by the temperature and pressure of the fluid surrounding the optical fiber sensor, the real-time on-line measurement of the temperature and pressure is accomplished through the demodulation of the parameters of Raman scattering and Brillouin scattering frequency shift within the optical fiber by the optical fiber demodulator. Experimental results indicate that the distributed optical fiber sensor for temperature and pressure measurement can realize that the temperature resolution is 0.1 ℃ and pressure resolution is 0.07 MPa. It can satisfy the requirements of fully distributed, real-time, on-line, higher reliability, higher precision and strong anti-jamming for the measurement of temperature and pressure in an oil well.