{"id":1258,"date":"2011-11-01T22:51:22","date_gmt":"2011-11-01T13:51:22","guid":{"rendered":"http:\/\/www.lancard.com\/blog\/?p=1258"},"modified":"2025-03-12T11:30:50","modified_gmt":"2025-03-12T02:30:50","slug":"install-apache2-2-mysql5-1php5-3-using-homebrew","status":"publish","type":"post","link":"https:\/\/www.lancard.com\/blog\/2011\/11\/01\/install-apache2-2-mysql5-1php5-3-using-homebrew\/","title":{"rendered":"Homebrew\u3067Apache2.2+MySQL5.1+PHP5.3\u74b0\u5883\u3092\u69cb\u7bc9"},"content":{"rendered":"<p>\u6b8b\u5ff5\u306a\u304c\u3089Homebrew\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u306fApache\u3001PHP\u304c\u306a\u304f\u3001MySQL\u306f5.5\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u3082\u3063\u3068\u3082Apache\u3068PHP\u306b\u95a2\u3057\u3066\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u306b\u5165\u3063\u3066\u308b\u3082\u306e\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u306a\u3044\u3068\u3044\u3046Homebrew\u306e\u65b9\u91dd\u306a\u3093\u3060\u308d\u3046\u3068\u601d\u3044\u307e\u3059\u304c\u3002\u3067\u63a2\u3057\u56de\u3063\u3066\u3044\u308b\u3068\u3053\u3093\u306a\u3082\u306e\u3092\u898b\u3064\u3051\u307e\u3057\u305f\u3002<\/p>\n<blockquote><p>Alternate formulae repos for Homebrew<br \/>\n<a href=\"https:\/\/github.com\/adamv\/homebrew-alt\/\">https:\/\/github.com\/adamv\/homebrew-alt\/<\/a><\/p><\/blockquote>\n<p>homebrew\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u306f\u306a\u3044\u3082\u306e\u3092\u91ce\u826f\u7684\u306b\u516c\u958b\u3057\u3066\u304f\u3060\u3055\u3063\u3066\u3044\u307e\u3059\u3002\u4e0a\u8a18\u5229\u7528\u3055\u305b\u3066\u3044\u305f\u3060\u3044\u3066\u3001MAMP\u74b0\u5883\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002<\/p>\n<h3>PHP5.3\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>Homebrew\u306fFomula\u306e\u76f4URL\u6307\u5b9a\u3067\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre lang=\"bash\">brew install https:\/\/raw.github.com\/adamv\/homebrew-alt\/master\/duplicates\/php.rb --with-mysql<\/pre>\n<p>\u3061\u306a\u307f\u306bduplicates\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u5165\u3063\u3066\u3044\u308bFomula\u306f\u3001OS X\u306b\u6a19\u6e96\u3067\u5165\u3063\u3066\u3044\u308b\u3082\u306e\u304c\u96c6\u3081\u3089\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>MySQL5.1\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<pre lang=\"bash\">brew install https:\/\/raw.github.com\/adamv\/homebrew-alt\/master\/versions\/mysql51.rb --with-utf8-default --use-gcc<\/pre>\n<h5>\u521d\u671f\u8a2d\u5b9a<\/h5>\n<pre lang=\"bash\">unset TMPDIR\r\nmysql_install_db<\/pre>\n<h5>\u8d77\u52d5\u30fb\u505c\u6b62<\/h5>\n<p>\u79c1\u306f\u3001\u81ea\u52d5\u8d77\u52d5\u306f\u3055\u305b\u305f\u304f\u306a\u304b\u3063\u305f\u306e\u3067\u3001launchd\u306b\u306f\u767b\u9332\u3057\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<pre lang=\"bash\">mysql.server start\r\nmysql.server stop<\/pre>\n<h3>Apache2.2\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<pre lang=\"bash\">brew install https:\/\/raw.github.com\/adamv\/homebrew-alt\/master\/duplicates\/httpd.rb<\/pre>\n<p>httpd.conf\u7b49\u306f\/usr\/local\/Cellar\/httpd\/2.2.21\/etc\/apache2\u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n<h5>PHP\u306a\u3069\u306e\u8a2d\u5b9a<\/h5>\n<p>\u79c1\u306e\u5834\u5408\u306f\u3001extra\/php.conf\u3092\u4f5c\u6210\u3057\u3001httpd.conf\u306b\u3066Include\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre lang=\"bash\">vi \/usr\/local\/Cellar\/httpd\/2.2.21\/etc\/apache2\/extra\/php.conf<\/pre>\n<pre lang=\"bash\">LoadModule php5_module \/usr\/local\/Cellar\/php\/5.3.8\/libexec\/apache2\/libphp5.so\r\nAddType application\/x-httpd-php .php .php5 .phtml<\/pre>\n<p>\u305d\u306e\u4ed6\u306b\u3001DocumentRoot\u3092\/Users\/dataich\/Sites\u3068\u3044\u3046\u98a8\u306b\u30e6\u30fc\u30b6\u30fc\u30db\u30fc\u30e0\u306eSites\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002\u3053\u306e\u8fba\u308a\u306f\u304a\u597d\u307f\u3067\u3002<\/p>\n<h5>\u8d77\u52d5\u30fb\u505c\u6b62<\/h5>\n<pre lang=\"bash\">sudo apachectl start\r\nsudo apachectl stop<\/pre>\n<p>\u3042\u3068\u306f\u3001phpinfo()\u3067\u51fa\u529b\u3057\u3066\u307f\u305f\u308a\u3057\u3066\u78ba\u8a8d\u3059\u308c\u3070OK\u3067\u3059\u3002<\/p>\n<p><strong>\u8ffd\u8a18 &#8211; 2011\/11\/08<\/strong><br \/>\nHomebrew\u3067\u5165\u308c\u305fPHP\u306epear\u3067permission\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3057\u305f\u306e\u3067\u3001\u4e0b\u8a18\u3067\u3082\u308d\u3082\u308d\u8a2d\u5b9a\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre lang=\"bash\">chmod -R ug+w \/usr\/local\/Cellar\/php\/5.3.8\/lib\/php\r\npear config-set php_ini \/usr\/local\/etc\/php.ini<\/pre>\n<a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-facebook nolightbox\" data-provider=\"facebook\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Facebook\" href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1258&#038;t=Homebrew%E3%81%A7Apache2.2%2BMySQL5.1%2BPHP5.3%E7%92%B0%E5%A2%83%E3%82%92%E6%A7%8B%E7%AF%89&#038;s=100&#038;p&#091;url&#093;=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1258&#038;p&#091;images&#093;&#091;0&#093;=&#038;p&#091;title&#093;=Homebrew%E3%81%A7Apache2.2%2BMySQL5.1%2BPHP5.3%E7%92%B0%E5%A2%83%E3%82%92%E6%A7%8B%E7%AF%89\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"Facebook\" title=\"Share on Facebook\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/facebook.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"http:\/\/twitter.com\/share?url=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1258&#038;text=Homebrew%E3%81%A7Apache2.2%2BMySQL5.1%2BPHP5.3%E7%92%B0%E5%A2%83%E3%82%92%E6%A7%8B%E7%AF%89\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1258&#038;title=Homebrew%E3%81%A7Apache2.2%2BMySQL5.1%2BPHP5.3%E7%92%B0%E5%A2%83%E3%82%92%E6%A7%8B%E7%AF%89\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/linkedin.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-tumblr nolightbox\" data-provider=\"tumblr\" target=\"_blank\" rel=\"nofollow\" title=\"Share on tumblr\" href=\"https:\/\/tumblr.com\/share?s=&#038;v=3&#038;t=Homebrew%E3%81%A7Apache2.2%2BMySQL5.1%2BPHP5.3%E7%92%B0%E5%A2%83%E3%82%92%E6%A7%8B%E7%AF%89&#038;u=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1258\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"tumblr\" title=\"Share on tumblr\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/tumblr.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=Homebrew%E3%81%A7Apache2.2%2BMySQL5.1%2BPHP5.3%E7%92%B0%E5%A2%83%E3%82%92%E6%A7%8B%E7%AF%89&#038;body=%E3%82%B7%E3%82%A7%E3%82%A2%E3%81%99%E3%82%8B%EF%BC%9A:%20https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1258\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/mail.png\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>\u6b8b\u5ff5\u306a\u304c\u3089Homebrew\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u306fApache\u3001PHP\u304c\u306a\u304f\u3001MySQL\u306f5.5\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u3082\u3063\u3068\u3082Apache\u3068PHP\u306b\u95a2\u3057\u3066\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u306b\u5165\u3063\u3066\u308b\u3082\u306e\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u306a\u3044\u3068\u3044\u3046Homebrew\u306e\u65b9\u91dd\u306a\u3093\u3060 [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48,7,36],"tags":[62,138],"class_list":["post-1258","post","type-post","status-publish","format-standard","hentry","category-mac","category-php","category-web","tag-homebrew","tag-mysql"],"_links":{"self":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/1258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/comments?post=1258"}],"version-history":[{"count":4,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/1258\/revisions"}],"predecessor-version":[{"id":8264,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/1258\/revisions\/8264"}],"wp:attachment":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/media?parent=1258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/categories?post=1258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/tags?post=1258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}