In this paper, we study how to deploy base stations (BSs) in green cellular networks, where BSs can be switched off to save energy when traffic load is low. Unlike previous studies which deploy BSs only based on the peak traffic load, our BS deployment scheme is based on the whole traffic variation process. In particular, we consider a linear cellular network where BSs are regularly deployed and users are uniformly distributed. Given the traffic variation process and the performance constraint, we obtain the energy optimal BS density by evaluating the network energy consumption in an analytical way. Simulation results show that compared with the BS deployment scheme based on peak traffic load, the energy consumption of our scheme can be reduced by more than 20%, and the performance improvement depends on the detailed traffic variation process.