You should probably read this:

https://wiki.openstreetmap.org/wiki/Deploying_your_own_Slippy_Map