DB & Web Servers in separate servers

How to install the DB and Web Servers in separate servers?
I’ld appreciate if anyone shares a document/link/steps.
Thanks…