Railway tracks are the direct supporting structures of the trains, which are vulnerable to produce large deformation under the temperature stress or subgrade settlement. The health status of track is critical, and the track should be routinely monitored to improve safety, lower the risk of excess deformation and provide reliable maintenance strategy. In this paper, the distributed optical fiber sensor was proposed to monitor the continuous deformation of the track. In order to validate the feasibility of the monitoring method, two deformation monitoring tests on one steel rail model in laboratory and on one real railway tack in outdoor were conducted respectively. In the model test, the working conditions of simply supported beam and continuous beam in the rail model under several concentrated loads were set to simulate different stress conditions of the real rail, respectively. In order to evaluate the monitoring accuracy, one distributed optical fiber sensor and one fiber Bragg grating (FBG) sensor were installed on the lower surface of the rail model, the strain measured by FBG sensor and the strain calculated from FEA were taken as measurement references. The model test results show that the strain measured by distributed optical fiber sensor has a good agreement with those measured by FBG sensor and FEA. In the outdoor test, the real track suffered from displacement and temperature loads. The distributed optical fiber sensor installed on the rail can monitor the corresponding strain and temperature with a good accuracy.