When a package is available to install a software, please use it. Specifically in your case, talking of web and database server, there are plenty of them in any distribution :
- Apache (web)
- Nginx (web)
- Lighttp (web)
- Mysql (DB)
- Postgresql (DB)
- MariaDB (DB)
- ...
By using the packages provided by your distribution, you are sure to receive the updates (patches, security update, ...) and be able to apply them easily.
Also note that in the case of some commercial distributions, you may loose the right to have support if you install your own compiled packages.
Installation of a software from the sources, compiled by you, is only an option when you need absolutly this software and there is no other way to get it in package format.
Or if you want absolutely to run the very last version or even a pre-release version (beta software, ...). But on a production machine, try to stick to the packages.