用于生产的 LAMP、XAMPP
我看到的每一篇 LAMP 或 XAMPP 文章或教程都写着“不适用于生产用途”,那么我在生产中使用什么?
Every LAMP or XAMPP writeup or tutorial I see says "Not for production use", so what do I use for production?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您使用安装的 apache、php 和 mysql,因为它们应该用于生产。 xampp 将所有这些东西集中在一个包中,基本上没有设置安全性.. root 密码为空.. 用户是众所周知的.. 但组件与您每次下载它们时将使用的组件相同..
you use apache, php and mysql installed as they should be for production. xampp is all those things in one package with basically no set up security .. root passwords are empty .. users are well known .. but the components are the same as the ones you would use if you downloaded them each ..
XAMPP 哲学 说:
因此它主要被指定为开发环境而不是生产环境。
The XAMPP philosophy says:
So it’s primarily designated as a development environment and not as a production environment.
如果有正确的安装选项,您可以将它们用作生产服务器的起点。 但还有一些漏洞需要填补,主要是安全方面的漏洞。 您提到的免责声明(明智地)是为了确保您对一开始的内容保持警惕和怀疑(并确保没有人可以声称他们在不让您知道的情况下向您提供了危险的东西,所以如果他们不好,请不要责怪他们事情发生了。)
这就像卖给你一辆没有安全带的汽车一样。
但是您学到的内容以及您开发的解决方案通常与“真实”服务器完全兼容。
Given the right installation options, you can use them as a starting point for a production server. But there are some holes to fill in, mainly wrt security. The disclaimers you refer to are (wisely) to make sure you are wary and suspicious of what you start with (and also make sure no one can claim they supplied you with something dangerous without letting you know, so don't blame them if Bad Things happen.)
It's like selling you a car without seatbelts.
But what you learn, and the solutions you develop, are generally fully compatible with a "real" server.
与 LAMP 相比,XAMPP 安装更容易。 如果您在开发服务器上,这没有什么区别,但如果您在生产服务器上,最好从基础开始而不是依赖第 3 方,您将在生产服务器上获得您想要的确切服务,无需额外的服务降低生产服务器的性能。
并尝试在开发和生产服务器上保持相同的设置,这将确保如果应用程序在开发服务器上运行也将在生产服务器上运行,而无需进行任何额外的设置。
XAMPP installation is easy as compared to LAMP. If you are on development server it makes no difference, but if you are on production server than it is good to do from basic instead of relying on 3rd party and you will get exact services you want on your production server, no extra services which can lower down your production server performance.
And try to keep same setup on development and production server, it will make sure that if application is running on development server will also run on production without doing any extra settings.
对于生产,您可以进行自己的配置,这取决于访问者数量、服务器上安装的 RAM、您正在使用的脚本。 FE 对于 WordPress,您只需要 5 个 PHP 扩展,但如果您使用 Woocommerce,您需要更多 PHP 内存,对于多个站点,您使用 VirtualHosts,如果您没有注册域名,还需要用户 UserDir 模块。
我所说的只是示例,您必须知道您的脚本要求,安装所有内容不是好主意。
For production you've make your own configuration, it depends on visitors count, RAM installed on your server, scripts you're using. F.E. You need only 5 PHP extensions for Wordpress, but if you're using Woocommerce you need more PHP memory, for multiple sites you've use VirtualHosts, and if you have not domains registered also user UserDir modules.
All I've said is only examples, you must know your script requirements, install everything is not good idea.