{"id":6970,"date":"2012-02-24T19:13:17","date_gmt":"2012-02-24T10:13:17","guid":{"rendered":"http:\/\/fukata.org\/?p=6970"},"modified":"2017-08-11T22:58:48","modified_gmt":"2017-08-11T22:58:48","slug":"mac-local-start-development-amp","status":"publish","type":"post","link":"https:\/\/blog.fukata.org\/archives\/6970\/","title":{"rendered":"Mac\u306e\u30ed\u30fc\u30ab\u30eb\u3067Apache, MySQL, PHP\u3092\u4f7f\u3063\u3066\u958b\u767a\u3092\u59cb\u3081\u308b\u307e\u3067"},"content":{"rendered":"
WordPress\u30d7\u30e9\u30b0\u30a4\u30f3\u3084\u3001PHP\u88fd\u306eFW\u3092\u4f7f\u3063\u305f\u30b5\u30fc\u30d3\u30b9\u306a\u3069\u3092\u30ed\u30fc\u30ab\u30eb\u3067\u958b\u767a\u3059\u308b\u305f\u3081\u306bMBA\u306b\u958b\u767a\u74b0\u5883\u3092\u6574\u3048\u305f\u308f\u3051\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u305d\u308c\u3092\u4f7f\u3063\u3066\u958b\u767a\u3059\u308b\u307e\u3067\u306e\u624b\u9806\u3092\u66f8\u3044\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u8ab0\u304b\u306b\u5f79\u306b\u7acb\u3064\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n
<\/p>\n
\u666e\u6bb5PHP\u3092\u4f7f\u3063\u305f\u30b5\u30fc\u30d3\u30b9\u3092\u958b\u767a\u3059\u308b\u524d\u306b\u3001\u4e0b\u8a18\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n
VirtualHost\u8ffd\u52a0\u7528\u30b9\u30af\u30ea\u30d7\u30c8<\/a><\/p>\n \u4ee5\u4e0a\u3067\u3001VirtualHost\u3068\u3057\u3066\u4e0b\u8a18\u306e\u8a2d\u5b9a\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002<\/p>\n \nURL: https:\/\/local.fukata.org \u4eca\u56de\u3001MBA\u306e\u30ed\u30fc\u30ab\u30eb\u306bPHP\u306e\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\u969b\u306b\u884c\u3063\u305f\u8a2d\u5b9a\u306b\u3064\u3044\u3066\u3001\u5404\u30b5\u30fc\u30d3\u30b9\u6bce\u306b\u8a2d\u5b9a\u3057\u305f\u3053\u3068\u3092\u66f8\u3044\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n \u76ee\u6b21<\/p> \u57fa\u672c\u7684\u306a\u69cb\u6210\u306fLAMP\u3067\u30db\u30b9\u30c8\u304cLinux\u304b\u3089Mac\u306b\u5909\u308f\u3063\u305f\u3060\u3051\u3067\u3059\u3002Ubuntu\u3092\u4f7f\u3063\u3066\u3044\u305f\u4eba\u306b\u3068\u3063\u3066\u306f\u99b4\u67d3\u307f\u6df1\u3044\u3093\u3058\u3083\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n \u57fa\u672c\u7684\u306bMBA\u306b\u30d7\u30ea\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n \u9055\u3046\u70b9\u3068\u3057\u3066\u3001<\/p>\n WEB\u5171\u6709\u306a\u3069\u306f\u4f7f\u308f\u306a\u3044\u306e\u3067\u3001\u30d7\u30ea\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bhttpd.conf\u3067\u306f\u306a\u304f\u3001\u30aa\u30ea\u30b8\u30ca\u30eb\u306e\u3082\u306e\u3092\u30b3\u30d4\u30fc\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n \u30b5\u30fc\u30d3\u30b9\u3092\u4f5c\u6210\u3059\u308b\u5834\u5408\u3001localhost\/[\u30b5\u30fc\u30d3\u30b9\u540d]\u3067\u306f\u306a\u304f\u3001local.[\u53d6\u5f97\u3057\u305f\u30c9\u30e1\u30a4\u30f3\u540d]<\/strong>\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u30ed\u30fc\u30ab\u30eb\u306e\u307f\u3067\u30a2\u30af\u30bb\u30b9\u51fa\u6765\u308b\u3088\u3046\u306b\u3057\u3066\u958b\u767a\u3092\u884c\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u305d\u3053\u3067\u3001apache\u306e\u65b9\u306bVirtualHost\u306e\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u3067\u3059\u304c\u3001\u901a\u5e38\u306e\u5834\u5408\u306f\/etc\/apache2\/extras\/httpd-vhosts.conf\u306b\u5168\u3066\u66f8\u304f\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n Ubuntu\u3067\u958b\u767a\u3057\u3066\u3044\u305f\u6642\u306b\u30ed\u30fc\u30ab\u30eb\u958b\u767a\u7528\u306e\u30c9\u30e1\u30a4\u30f3\u304c20\u4ee5\u4e0a\u306b\u306a\u3063\u3066\u3044\u305f\u306e\u3067\u3001\u305d\u308c\u3092\u4e00\u3064\u306e\u30d5\u30a1\u30a4\u30eb\u3067\u7ba1\u7406\u3059\u308b\u306e\u306f\u4eca\u5f8c\u3081\u3093\u3069\u304f\u3055\u304f\u306a\u308b\u306e\u306f\u308f\u304b\u3063\u3066\u3044\u305f\u306e\u3067\u3001Ubuntu\u3068\u540c\u3058\u3088\u3046\u306bVirtualHost\u7528\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u3066\u3001\u305d\u306e\u4e2d\u3067\u7ba1\u7406\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304c\u7121\u304f\u306a\u308b\u3068\u9762\u5012\u306a\u4e8b\u3082\u3042\u308b\u306e\u3067\u3001Dropbox\u4e0a\u306b\u4fdd\u5b58\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n \u307e\u305f\u3001site-enabled\u5185\u306e\u8a2d\u5b9a\u3092\u8aad\u307f\u8fbc\u3080\u3088\u3046\u306b\/etc\/apache2\/httpd.conf\u306b\u4e0b\u8a18\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n Homebrew\u3067\u5165\u308c\u305f\u3060\u3051\u3067\u7279\u306b\u5909\u66f4\u306f\u3057\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n \u30d7\u30ea\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" WordPress\u30d7\u30e9\u30b0\u30a4\u30f3\u3084\u3001PHP\u88fd\u306eFW\u3092\u4f7f\u3063\u305f\u30b5\u30fc\u30d3\u30b9\u306a\u3069\u3092\u30ed\u30fc\u30ab\u30eb\u3067\u958b\u767a\u3059\u308b\u305f\u3081\u306bMBA\u306b\u958b\u767a\u74b0\u5883\u3092\u6574\u3048\u305f\u308f\u3051\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u305d\u308c\u3092\u4f7f\u3063\u3066\u958b\u767a\u3059\u308b\u307e\u3067\u306e\u624b\u9806\u3092\u66f8\u3044\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u8ab0\u304b\u306b\u5f79\u306b … \u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":2,"featured_media":9223372036854775807,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1980],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/posts\/6970"}],"collection":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/comments?post=6970"}],"version-history":[{"count":0,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/posts\/6970\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/media\/9223372036854775807"}],"wp:attachment":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/media?parent=6970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/categories?post=6970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/tags?post=6970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}\r\nsudo .\/addhost.sh local.fukata.org \/Users\/tatsuya\/workspace\/fukata.org\/\r\n<\/pre>\n
\nDocumentRoot: \/Users\/tatsuya\/workspace.fukata.org\/
\nAccessLog: \/var\/log\/apache2\/local.fukata.org\/access.log
\nErrorLog: \/var\/log\/apache2\/local.fukata.org\/error.log\n<\/p><\/blockquote>\n\u5404\u7a2e\u8a2d\u5b9a<\/span><\/h2>\n
Apache<\/span><\/h3>\n
httpd.conf<\/span><\/h3>\n
\r\ncd \/etc\/apache2\r\nsudo cp \/etc\/apache2\/original\/httpd.conf \/etc\/apache2\/\r\n<\/pre>\n
VirtualHost\u306e\u8a2d\u5b9a<\/span><\/h4>\n
\r\ncd \/etc\/apache2\r\nsudo ln -sn \/Users\/tatsuya\/Dropbox\/mac\/apache2\/sites-available .\r\nsudo ln -sn \/Users\/tatsuya\/Dropbox\/mac\/apache2\/sites-enabled .\r\n<\/pre>\n
\r\nInclude \/private\/etc\/apache2\/sites-enabled\/*\r\n<\/pre>\n
MySQL<\/span><\/h3>\n
\r\nbrew install mysql mysql++\r\n<\/pre>\n
PHP<\/span><\/h3>\n