macos 如何在 Mac OS X 上安装 MySQL/Apache/PHP?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8773241/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to install MySQL/Apache/PHP on Mac OS X?
提问by andrewpthorp
Do you guys recommend using MAMP, or should I go about a manual install? I am savvy enough to do the install manually (I have done many manual Apache installs with Ruby on Rails in the past), but I am not sure if MAMP is worth it.
你们推荐使用 MAMP,还是我应该手动安装?我很精明,可以手动安装(过去我用 Ruby on Rails 手动安装了很多 Apache),但我不确定 MAMP 是否值得。
Any guides, tips, or opinions are welcomed, as well!
也欢迎任何指南、提示或意见!
UPDATE
更新
This will be used for development purposes. Speed/Efficiency is not the most important thing. As long as php/apache/mysql are all available, I should be okay.
这将用于开发目的。速度/效率并不是最重要的事情。只要php/apache/mysql都可用,我应该没问题。
Keep in mind, MySQL has already been installed (using Homebrew), and I prefer to install mysql/postgresql that way.
请记住,MySQL 已经安装(使用 Homebrew),我更喜欢以这种方式安装 mysql/postgresql。
Thanks!
谢谢!
回答by Milad Naseri
Follow the instructions on this page, works perfectly fine.
按照此页面上的说明进行操作,效果很好。
MAMP is good, but it's gonna install everything from scratch. The same goes for PHP via homebrew. I have tried all of those. But you have to remember that your Mac comes bundled with Apache and PHP out of the box. You just have to add MySQL to the mix and get rolling.
MAMP 很好,但它会从头开始安装所有东西。PHP 通过自制软件也是如此。我已经尝试了所有这些。但您必须记住,您的 Mac 与 Apache 和 PHP 捆绑在一起,开箱即用。您只需要将 MySQL 添加到组合中并开始运行。
回答by Pete Mitchell
Mamp is easiest but without paying for pro, virtual hosts are difficult to manage.
Mamp 是最简单的,但如果不为专业人士付费,虚拟主机很难管理。
I found the default version already on the system a pain to manage due to some osx specific config in apache's httpd.conf. But you can use mac ports or homebrew (my preferred) for a custom php/apache install.
由于 apache 的 httpd.conf 中的某些 osx 特定配置,我发现系统上已经存在的默认版本很难管理。但是您可以使用 mac 端口或自制软件(我的首选)进行自定义 php/apache 安装。
My preferred and in my opinion the cleanest way is to install virtualbox and run a full LAMP stack. This is the most flexible and a lot closer to anything you may be hosting on. If you havent done any sysadmin before it is a pretty good way to learn a bit more
我的首选,在我看来,最干净的方法是安装 virtualbox 并运行完整的 LAMP 堆栈。这是最灵活的,并且更接近您可能托管的任何内容。如果您之前没有做过任何系统管理员,这是了解更多信息的好方法