The Buddha said:

Virtuous people, the newly aspired Bodhisattvas, and the sentient beings in the end of the world:
If you want to attain Tathagata's complete enlightenment, you should focus on proper virtues and stay far away from myriad illusions.
First of all you must follow Tathagata's Samadhi, strictly uphold the precepts, peacefully reside among practitioners of Tao, and practice meditation in a quiet place.
(Complete Enlightenment Sutra)