Linux用户和组的LAMP服务器 [英] Linux users and groups for a LAMP server
问题描述
什么是在linux的用户和组方面建立一个LAMP服务器的最佳做法是什么?如果有托管在同一台服务器上有多个站点,它是最好有它拥有所有网站的源文件(上传)这是在同一组作为阿帕奇单个用户 - 或为每个网站不同的用户(使每个网站都有自己的crontab)?或别的东西完全?
What is the best practice for setting up a LAMP server in terms of linux users and groups? If there are multiple sites hosted on the same server, is it best to have a single user that owns all site source files (and uploads) that is in the same group as apache - or to have a different user for each site (so that each site has its own crontab)? Or something else entirely?
由于某些原因,这个问题似乎永远在我遇到的PHP / MySQL / Linux的书籍加以解决。
For some reason, this question never seems to be addressed in PHP/MySQL/Linux books that I've encountered.
推荐答案
如果这是大型网站的一小部分,你可能会发现,使用类似Xen的分裂你的服务器划分为多个虚拟机比单纯由用户分离一个更好的选择。这样可以改善站点的分离,并使其更容易,如果在将来,人们开始变得更重上比其他资源使用一个站点移动到它自己的硬件
If this is a small number of large sites, you may find that splitting your server into multiple VMs using something like Xen is a better option than simply segregating by user. This will improve the isolation of your sites, and make it easier to move a site to its own hardware if, in future, one starts to become much heavier on resource usage than the others.
这篇关于Linux用户和组的LAMP服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!