{"id":217245,"date":"2014-04-10T13:47:03","date_gmt":"2014-04-10T09:47:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=217245"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=217245","title":{"rendered":"<span class=\"post_title\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 php5.5+php-fpm+mysql+nginx \u043d\u0430 Mac OS X Mavericks<\/span>"},"content":{"rendered":"<div class=\"content html_format\">       \u041a\u0430\u0436\u0434\u044b\u0439 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u0432\u044b\u0431\u0440\u0430\u0432\u0448\u0438\u0439 <i>Mac<\/i>, \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u0449\u0435\u0442 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439. \u0418 \u0435\u0441\u043b\u0438 \u0432 IDE \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u0432\u0441\u0451 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0442\u043e \u0447\u0442\u043e-\u043b\u0438\u0431\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u043f\u043e \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0443 win-\u0434\u043e\u0432\u044b\u043c <i>OpenServer<\/i> \u0438\u043b\u0438 <i>Denwer<\/i> \u0437\u0430 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0442\u0440\u0443\u0434\u043d\u043e. \u0415\u0441\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 <a href=\"http:\/\/www.mamp.info\/en\/mamp-pro\/\">MAMP PRO<\/a>, \u043d\u043e \u043e\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u0434\u0432\u0435 \u0442\u044b\u0441\u044f\u0447\u0438 \u0434\u0435\u0440\u0435\u0432\u044f\u043d\u043d\u044b\u0445. \u0414\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 Apache \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0441\u043c\u0443\u0442\u0438\u0442\u044c. <\/p>\n<p>  \u0417\u0430\u043d\u0438\u043c\u0430\u044f\u0441\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430, \u043d\u0430\u0431\u0440\u0451\u043b \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0439\u0448\u0438\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442-\u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 <a href=\"http:\/\/brew.sh\/\">Homebrew<\/a> \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0437\u0430 5-10 \u043c\u0438\u043d\u0443\u0442.<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/5d3\/176\/b94\/5d3176b940c683489d1a8233636df534.jpg\"\/><br \/>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u00ab\u0422\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u043d\u043e\u0432\u044b\u0439 MacBook Pro \u0438 \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0435\u0433\u043e \u0441 \u0447\u0438\u0441\u0442\u043e\u0433\u043e \u043b\u0438\u0441\u0442\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0442\u043e\u0442 \u0436\u0435 \u0431\u044d\u043a\u0430\u043f Time Machine \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0443\u0436\u0435 \u0447\u0435\u0442\u0432\u0435\u0440\u044b \u0433\u043e\u0434\u0430. \u0425\u043e\u0440\u043e\u0448\u0438\u0439 \u0448\u0430\u043d\u0441 \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0441\u0442\u044d\u043a\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430\/LAMP (<strong>L<\/strong>inux <strong>A<\/strong>pache <strong>M<\/strong>ySQL <strong>P<\/strong>HP) \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e Nginx \u0438 PHP-FPM \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e FastCGI. \u041d\u0438\u0436\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Nginx, PHP-FPM, MySQL \u0438 PhpMyAdmin \u043d\u0430 OS X 10.9 \/ Mavericks.<\/p>\n<h3>Xcode<\/h3>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e <em>Xcode<\/em> \u0447\u0435\u0440\u0435\u0437 Mac App Store:<br \/>  <a href=\"https:\/\/itunes.apple.com\/de\/app\/xcode\/id497799835\">\u0421\u043a\u0430\u0447\u0430\u0442\u044c Xcode.app (\u0447\u0435\u0440\u0435\u0437 Mac App Store)<\/a><\/p>\n<p>  \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0441\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430, \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 Xcode \u0432 \u043f\u0430\u043f\u043a\u0435 <code>\/Applications<\/code> \u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u0435\u0441\u044c \u0441 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439.<\/p>\n<p>  \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043e\u043a\u043d\u043e \u0422\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 Xcode \u0447\u0435\u0440\u0435\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">xcode-select --install <\/code><\/pre>\n<p>  \u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043d\u043e\u043f\u043a\u0438 <code>Install<\/code>.<\/p>\n<p>  \u0412\u0435\u0440\u043d\u0438\u0442\u0435\u0441\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 Xcode, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 <code>\u2318 + ,<\/code> \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a <i>\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c<\/i> \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 <em>Locations<\/em>. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 <em>Command Line Tools<\/em> \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e, <em>Xcode 5.0.2 (5A3005)<\/em> \u0432 \u043c\u043e\u0451\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/efa\/fc6\/d8f\/efafc6d8f09bac927c80c25f875e9fef.png\" alt=\"Xcode.app \u2192 Preferences \u2192 Location | Command Line Tools\"\/><\/p>\n<h3>Homebrew<\/h3>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <em>Homebrew<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0434\u043b\u044f OS X. \u0412\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443\u0436\u0435 \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u043f\u0440\u043e <code>apt-get<\/code> \u0438\u043b\u0438 <code>aptitude<\/code> \u043d\u0430 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430\u0445 Linux \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. <code>brew<\/code> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u0430\u043a\u0436\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u0445 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c Mac OS X. \u041e\u043d \u0442\u0430\u043a\u0436\u0435 \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\u0441\u044f \u0438\u0437-\u0437\u0430 \u043f\u0440\u043e\u0441\u0440\u043e\u0447\u0435\u043d\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u0438\u043b\u0438 \u0431\u0440\u0435\u0448\u0430\u0445 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u044d\u043a\u0441\u043f\u043b\u043e\u0439\u0442\u0430\u0445 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f Xquarz:<\/p>\n<pre><code class=\"bash\">curl http:\/\/xquartz-dl.macosforge.org\/SL\/XQuartz-2.7.5.dmg -o \/tmp\/XQuartz.dmg open \/tmp\/XQuartz.dmg <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Homebrew \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:  <\/p>\n<pre><code class=\"bash\">ruby -e &quot;$(curl -fsSL https:\/\/raw.github.com\/Homebrew\/homebrew\/go\/install)&quot; <\/code><\/pre>\n<p>  \u041f\u043e\u0432\u0435\u0440\u0438\u043c \u043d\u0430 \u043b\u044e\u0431\u044b\u0435 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:  <\/p>\n<pre><code class=\"bash\">brew doctor <\/code><\/pre>\n<p>  \u041e\u0431\u043d\u043e\u0432\u0438\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Homebrew:  <\/p>\n<pre><code class=\"bash\">brew update brew upgrade <\/code><\/pre>\n<h3>PHP-FPM<\/h3>\n<p>  \u041f\u043e\u0442\u043e\u043c\u0443 \u043a\u0430\u043a Homebrew \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f PHP-FPM, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c:  <\/p>\n<pre><code class=\"bash\">brew tap homebrew\/dupes brew tap josegonzalez\/homebrew-php <\/code><\/pre>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c PHP-FPM \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432:  <\/p>\n<pre><code class=\"bash\">brew install --without-apache --with-fpm --with-mysql php55 <\/code><\/pre>\n<p>  Homebrew \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 PHP-FPM \u0438 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u0430\u0437 \u0432\u0430\u0441. \u0414\u0430\u0439\u0442\u0435 \u0435\u043c\u0443 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442.<\/p>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 PHP \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435<\/h4>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c PHP \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435, \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <code>$PATH<\/code> \u0432 \u0444\u0430\u0439\u043b\u0435 <code>~\/.bash_profile<\/code>:  <\/p>\n<pre><code class=\"bash\">echo 'export PATH=&quot;$(brew --prefix josegonzalez\/php\/php55)\/bin:$PATH&quot;' &gt;&gt; ~\/.bash_profile <\/code><\/pre>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a\u0430<\/h4>\n<pre><code class=\"bash\">mkdir -p ~\/Library\/LaunchAgents cp \/usr\/local\/Cellar\/php55\/5.5.9\/homebrew-php.josegonzalez.php55.plist ~\/Library\/LaunchAgents\/ <\/code><\/pre>\n<p>  \u0418 \u0441\u0442\u0430\u0440\u0442 PHP-FPM:<\/p>\n<pre><code class=\"bash\">launchctl load -w ~\/Library\/LaunchAgents\/homebrew-php.josegonzalez.php55.plist  <\/code><\/pre>\n<p>  \u0423\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u044c\u0442\u0435\u0441\u044c, \u0447\u0442\u043e PHP-FPM \u0441\u043b\u0443\u0448\u0430\u0435\u0442 \u043f\u043e\u0440\u0442 9000: <\/p>\n<pre><code class=\"bash\">lsof -Pni4 | grep LISTEN | grep php<\/code><\/pre>\n<p>  \u0412\u044b\u0432\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"bash\">php-fpm   69659  frdmn    6u  IPv4 0x8d8ebe505a1ae01      0t0  TCP 127.0.0.1:9000 (LISTEN) php-fpm   69660  frdmn    0u  IPv4 0x8d8ebe505a1ae01      0t0  TCP 127.0.0.1:9000 (LISTEN) php-fpm   69661  frdmn    0u  IPv4 0x8d8ebe505a1ae01      0t0  TCP 127.0.0.1:9000 (LISTEN) php-fpm   69662  frdmn    0u  IPv4 0x8d8ebe505a1ae01      0t0  TCP 127.0.0.1:9000 (LISTEN)     <\/code><\/pre>\n<h3>MySQL<\/h3>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 MySQL:<\/p>\n<pre><code class=\"bash\">brew install mysql <\/code><\/pre>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a\u0430<\/h4>\n<pre><code class=\"bash\">cp \/usr\/local\/opt\/mysql\/*.plist ~\/Library\/LaunchAgents <\/code><\/pre>\n<p>  \u0418 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"bash\">launchctl load ~\/Library\/LaunchAgents\/homebrew.mxcl.mysql.plist <\/code><\/pre>\n<h4>\u041e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u044c\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443<\/h4>\n<p>  \u0414\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0448\u0435\u0433\u043e MySQL-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043c\u044b \u0432\u044b\u0437\u043e\u0432\u0435\u043c \u0438\u0434\u0443\u0449\u0438\u0439 \u0432 \u043a\u043e\u043c\u043f\u043e\u0435\u043a\u0442\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a <code>secure_mysql_installation<\/code> \u0434\u043b\u044f \u0441\u043c\u0435\u043d\u044b root-\u043f\u0430\u0440\u043e\u043b\u044f, \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043b\u043e\u0433\u0438\u043d\u0430 \u043f\u043e\u0434 root-\u043e\u043c:  <\/p>\n<pre><code class=\"bash\">mysql_secure_installation <\/code><\/pre>\n<pre><code class=\"bash\">&gt; Enter current password for root (enter for none): <\/code><\/pre>\n<p>  \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u0430\u0440\u043e\u043b\u044c, \u0435\u0441\u043b\u0438 \u043e\u043d \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d.<\/p>\n<pre><code class=\"bash\">&gt; Change the root password? [Y\/n] <\/code><\/pre>\n<p>  \u041d\u0430\u0436\u0438\u0442\u0435 enter, \u0443\u043a\u0430\u0437\u0430\u0432 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f root-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430\u0445 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 LastPass \u0438\u043b\u0438 1Password.<\/p>\n<pre><code class=\"bash\">&gt; Remove anonymous users? [Y\/n] <\/code><\/pre>\n<p>  \u0414\u0430, \u0432 \u043d\u0438\u0445 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<pre><code class=\"bash\">&gt; Disallow root login remotely? [Y\/n] <\/code><\/pre>\n<p>  \u0414\u0430, \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0434 root \u0441 \u043b\u044e\u0431\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e IP \u043a\u0440\u043e\u043c\u0435 127.0.0.1.<\/p>\n<pre><code class=\"bash\">&gt; Remove test database and access to it? [Y\/n] <\/code><\/pre>\n<p>  \u0414\u0430. \u041d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u044b \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<pre><code class=\"bash\">&gt; Reload privilege tables now? [Y\/n] <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439 \u0434\u0430\u0441\u0442 \u043d\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0442\u0443\u043f\u0438\u043b\u0438 \u0432 \u0441\u0438\u043b\u0443.<\/p>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f<\/h4>\n<pre><code class=\"bash\">mysql -uroot -p <\/code><\/pre>\n<p>  \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 root-\u043f\u0430\u0440\u043e\u043b\u044c \u0438 \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c MySQL:<\/p>\n<pre><code class=\"bash\">Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.  mysql&gt; <\/code><\/pre>\n<p>  \u0417\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0435 \u0441\u0435\u0441\u0441\u0438\u044e \u043f\u0440\u0438 \u043f\u043e\u043c\u0449\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>\\q<\/code>:<\/p>\n<pre><code class=\"bash\">mysql&gt; \\q Bye <\/code><\/pre>\n<h3>phpMyAdmin<\/h3>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 <code>autoconf<\/code> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f phpMyAdmin:<\/p>\n<pre><code class=\"bash\">brew install autoconf <\/code><\/pre>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f $PHP_AUTOCONF:<\/p>\n<pre><code class=\"bash\">echo 'PHP_AUTOCONF=&quot;'$(which autoconf)'&quot;' &gt;&gt; ~\/.bash_profile <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 phpMyAdmin:<\/p>\n<pre><code class=\"bash\">brew install phpmyadmin <\/code><\/pre>\n<h3>Nginx<\/h3>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 <em>Nginx<\/em> \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"bash\">brew install nginx <\/code><\/pre>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a\u0430<\/h4>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c 80 \u043f\u043e\u0440\u0442, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c Nginx \u043f\u043e\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c root:  <\/p>\n<pre><code class=\"bash\">sudo cp \/usr\/local\/opt\/nginx\/*.plist \/Library\/LaunchDaemons\/ sudo chown root:wheel \/Library\/LaunchDaemons\/homebrew.mxcl.nginx.plist <\/code><\/pre>\n<h4>\u041f\u0440\u043e\u0442\u0435\u0441\u0442\u0440\u0438\u0443\u0439\u0442\u0435 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440<\/h4>\n<p>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 Nginx:<\/p>\n<pre><code class=\"bash\">sudo launchctl load \/Library\/LaunchDaemons\/homebrew.mxcl.nginx.plist <\/code><\/pre>\n<p>  \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u043b\u0443\u0448\u0430\u0435\u0442 \u043f\u043e\u0440\u0442 8080 \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 HTTP \u043f\u043e\u0440\u0442\u0430 80. \u041f\u043e\u043a\u0430 \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e:  <\/p>\n<pre><code class=\"bash\">curl -IL http:\/\/localhost:8080 <\/code><\/pre>\n<p>  \u041e\u0442\u0432\u0435\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"bash\">HTTP\/1.1 403 Forbidden Server: nginx\/1.4.4 Date: Sun, 08 Dec 2013 03:33:41 GMT Content-Type: text\/html Content-Length: 168 Connection: keep-alive <\/code><\/pre>\n<p>  \u0421\u043d\u043e\u0432\u0430 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c Nginx:<\/p>\n<pre><code class=\"bash\">sudo launchctl unload \/Library\/LaunchDaemons\/homebrew.mxcl.nginx.plist <\/code><\/pre>\n<h3>\u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/h3>\n<h4>nginx.conf<\/h4>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0430\u043f\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u043d\u0430\u043c \u043f\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Nginx: <\/p>\n<pre><code class=\"bash\">mkdir -p \/usr\/local\/etc\/nginx\/logs mkdir -p \/usr\/local\/etc\/nginx\/sites-available mkdir -p \/usr\/local\/etc\/nginx\/sites-enabled mkdir -p \/usr\/local\/etc\/nginx\/conf.d mkdir -p \/usr\/local\/etc\/nginx\/ssl sudo mkdir -p \/var\/www  sudo chown :staff \/var\/www sudo chmod 775 \/var\/www <\/code><\/pre>\n<p>  \u0423\u0434\u0430\u043b\u0438\u0442\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0444\u0430\u0439\u043b <code>nginx.conf<\/code> (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>\/usr\/local\/etc\/nginx\/nginx.conf.default<\/code>, \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u0435\u0433\u043e \u043a\u043e\u0434) \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043d\u043e\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <code>curl<\/code> \u0441 GitHub:  <\/p>\n<pre><code class=\"bash\">rm \/usr\/local\/etc\/nginx\/nginx.conf curl -L https:\/\/gist.github.com\/frdmn\/7853158\/raw\/nginx.conf -o \/usr\/local\/etc\/nginx\/nginx.conf <\/code><\/pre>\n<p>  \u041a\u043e\u043d\u0444\u0438\u0443\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0441\u0442 \u0438 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u0435\u043d \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e: \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 worker, \u043f\u0443\u0442\u0438\/\u0444\u043e\u0440\u043c\u0430\u0442\u044b \u043b\u043e\u0433\u043e\u0432 \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e includes. \u041d\u0438\u0447\u0435\u0433\u043e \u043b\u0438\u0448\u043d\u0435\u0433\u043e \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 <code>nginx.conf.default<\/code>.<\/p>\n<h4>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 PHP FPM<\/h4>\n<p>  \u0421\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u043c\u043e\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 PHP-FPM \u0441 GitHub:  <\/p>\n<pre><code class=\"bash\">curl -L https:\/\/gist.github.com\/frdmn\/7853158\/raw\/php-fpm -o \/usr\/local\/etc\/nginx\/conf.d\/php-fpm <\/code><\/pre>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432<\/h4>\n<pre><code class=\"bash\">curl -L https:\/\/gist.github.com\/frdmn\/7853158\/raw\/sites-available_default -o \/usr\/local\/etc\/nginx\/sites-available\/default curl -L https:\/\/gist.github.com\/frdmn\/7853158\/raw\/sites-available_default-ssl -o \/usr\/local\/etc\/nginx\/sites-available\/default-ssl curl -L https:\/\/gist.github.com\/frdmn\/7853158\/raw\/sites-available_phpmyadmin -o \/usr\/local\/etc\/nginx\/sites-available\/phpmyadmin <\/code><\/pre>\n<p>  \u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0439\u0442\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0445\u043e\u0441\u0442 (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0440\u0435\u0440\u0430\u0439\u0442\u044b \u0434\u043b\u044f 404, 403 \u0438 <code>phpinfo()<\/code>) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <code>git<\/code>:  <\/p>\n<pre><code class=\"bash\">git clone http:\/\/git.frd.mn\/frdmn\/nginx-virtual-host.git \/var\/www rm -rf \/var\/www\/.git <\/code><\/pre>\n<p>  \u0418 \u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u043f\u0430\u043f\u043a\u0443 <code>\/var\/www\/.git<\/code>, \u0447\u0442\u043e\u0431\u044b git \u043d\u0435 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043b \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u043d\u0435\u043d\u0438\u044f.<\/p>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 SSL<\/h4>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0430\u043f\u043a\u0443 \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 SSL \u0438 \u0447\u0430\u0441\u0442\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439:<\/p>\n<pre><code class=\"bash\">mkdir -p \/usr\/local\/etc\/nginx\/ssl <\/code><\/pre>\n<p>  \u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0439\u0442\u0435 4096bit RSA \u043a\u043b\u044e\u0447\u0438 \u0438 \u0441\u0430\u043c\u043e-\u043f\u043e\u0434\u043f\u0438\u0441\u043d\u044b\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u0441\u043b\u0435\u0434\u044e\u0443\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code class=\"bash\">openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj &quot;\/C=US\/ST=State\/L=Town\/O=Office\/CN=phpmyadmin&quot; -keyout \/usr\/local\/etc\/nginx\/ssl\/localhost.key -out \/usr\/local\/etc\/nginx\/ssl\/localhost.crt openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj &quot;\/C=US\/ST=State\/L=Town\/O=Office\/CN=localhost&quot; -keyout \/usr\/local\/etc\/nginx\/ssl\/phpmyadmin.key -out \/usr\/local\/etc\/nginx\/ssl\/phpmyadmin.crt <\/code><\/pre>\n<h4>\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432<\/h4>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0438\u043c\u043b\u0438\u043d\u043a\u0438 \u0432 \u043f\u0430\u043f\u043a\u0435 <code>sites-enabled<\/code> \u0434\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 \u0441 \u0446\u0435\u043b\u044c\u044e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0445:  <\/p>\n<pre><code class=\"bash\">ln -sfv \/usr\/local\/etc\/nginx\/sites-available\/default \/usr\/local\/etc\/nginx\/sites-enabled\/default ln -sfv \/usr\/local\/etc\/nginx\/sites-available\/default-ssl \/usr\/local\/etc\/nginx\/sites-enabled\/default-ssl ln -sfv \/usr\/local\/etc\/nginx\/sites-available\/phpmyadmin \/usr\/local\/etc\/nginx\/sites-enabled\/phpmyadmin <\/code><\/pre>\n<p>  \u0421\u043d\u043e\u0432\u0430 \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u043c Nginx:<\/p>\n<pre><code class=\"bash\">sudo launchctl load \/Library\/LaunchDaemons\/homebrew.mxcl.nginx.plist <\/code><\/pre>\n<h3>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u044b<\/h3>\n<p>  \u0412\u043e\u0442 \u043e\u043d\u043e, \u0432\u0441\u0451 \u0434\u043e\u043b\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0429\u0435\u043b\u043a\u0430\u0439\u0442\u0435 \u043d\u0430 \u0441\u0441\u044b\u043b\u043a\u0430\u0445 \u043d\u0438\u0436\u0435 \u0441 \u0446\u0435\u043b\u044c\u044e \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f \u0432 \u044d\u0442\u043e\u043c:<\/p>\n<ul>\n<li><a href=\"http:\/\/localhost\">http:\/\/localhost<\/a> \u2192 \u00abNginx works\u00bb page <\/li>\n<li><a href=\"http:\/\/localhost\/info\">http:\/\/localhost\/info<\/a> \u2192 <code>phpinfo()<\/code> <\/li>\n<li><a href=\"http:\/\/localhost\/nope\">http:\/\/localhost\/nope<\/a> \u2192 &quot; Not Found&quot; page <\/li>\n<li><a href=\"https:\/\/localhost:443\">https:\/\/localhost:443<\/a> \u2192 \u00abNginx works\u00bb page (SSL) <\/li>\n<li><a href=\"https:\/\/localhost:443\/info\">https:\/\/localhost:443\/info<\/a> \u2192 <code>phpinfo()<\/code> (SSL) <\/li>\n<li><a href=\"https:\/\/localhost:443\/nope\">https:\/\/localhost:443\/nope<\/a> \u2192 \u00abNot Found\u00bb page (SSL) <\/li>\n<li><a href=\"https:\/\/localhost:306\">https:\/\/localhost:306<\/a> \u2192 phpMyAdmin (SSL) <\/li>\n<\/ul>\n<h3>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438<\/h3>\n<p>  \u0412 \u0441\u0438\u043b\u0443 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u044b \u0432\u0430\u043c \u0440\u0430\u043d\u043e \u0438\u043b\u0438 \u043f\u043e\u0437\u0434\u043d\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u043e\u0442 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u0432\u0440\u0435\u0441\u0438\u0432, \u0432\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0430\u043b\u0438\u0430\u0441\u044b:  <\/p>\n<pre><code class=\"bash\">curl -L https:\/\/gist.github.com\/frdmn\/7853158\/raw\/bash_aliases -o \/tmp\/.bash_aliases cat \/tmp\/.bash_aliases &gt;&gt; ~\/.bash_aliases echo &quot;source ~\/.bash_aliases&quot; &gt;&gt; ~\/.bash_profile <\/code><\/pre>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u043e\u043a\u043d\u043e\/\u0441\u0435\u0441\u0441\u0438\u044e \u0422\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 \u0438\u043b\u0438 \u0436\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c <code>~\/.bash_profile<\/code> \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:  <\/p>\n<pre><code class=\"bash\">source ~\/.bash_profile <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u043b\u0438\u0430\u0441\u044b \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u0435\u0447\u0430\u0442\u0430\u043d\u0438\u044f \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 <code>launchctl<\/code>, \u043a\u0430\u043a \u0442\u043e \u0431\u044b\u043b\u043e \u0432\u044b\u0448\u0435.<\/p>\n<h4>Nginx<\/h4>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u0442\u044c, \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c Nginx \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043c\u0430\u043d\u0434:<\/p>\n<pre><code class=\"bash\">nginx.start nginx.stop nginx.restart <\/code><\/pre>\n<p>  \u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043b\u043e\u0433\u0430\u043c:<\/p>\n<pre><code class=\"bash\">nginx.logs.access nginx.logs.default.access nginx.logs.phpmyadmin.access nginx.logs.default-ssl.access nginx.logs.error nginx.logs.phpmyadmin.error <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0430:<\/p>\n<pre><code class=\"bash\">[sudo] nginx -t <\/code><\/pre>\n<h4>PHP-FPM<\/h4>\n<p>  \u0421\u0442\u0430\u0440\u0442, \u0441\u0442\u043e\u043f \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 PHP-FPM:<\/p>\n<pre><code class=\"bash\">php-fpm.start php-fpm.stop php-fpm.restart <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0430:<\/p>\n<pre><code class=\"bash\">[sudo] php-fpm -t <\/code><\/pre>\n<h4>MySQL<\/h4>\n<p>  \u0421\u0442\u0430\u0440\u0442, \u0441\u0442\u043e\u043f \u0438 \u0440\u0435\u0441\u0442\u0430\u0440\u0442 MySQL-\u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\">mysql.start mysql.stop mysql.restart <\/code><\/pre>\n<p>  \u0414\u0430\u0439\u0442\u0435 \u043c\u043d\u0435 \u0437\u043d\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0437\u0430\u0441\u0442\u0440\u044f\u043b\u0438 \u0438\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f!\u00bb<\/p>\n<hr\/>\n<p>  \u041e\u0442 \u0441\u0435\u0431\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044e, \u0447\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 Nginx \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0438\u043c\u0438 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0443 \u00abIP domain.name\u00bb \u0432 \u0444\u0430\u0439\u043b\u0435 <code>hosts<\/code> \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>sudo vi \/etc\/hosts<\/code>.<\/p>\n<p>  \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 Apache \u0432\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0430 \u0441 Nginx \u0438\u0437-\u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430 80-\u043e\u043c \u043f\u043e\u0440\u0442\u0435:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/7ae\/763\/458\/7ae76345889efafe441aaf104e3e2ae8.png\"\/>   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/217245\/\"> http:\/\/habrahabr.ru\/post\/217245\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">       \u041a\u0430\u0436\u0434\u044b\u0439 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u0432\u044b\u0431\u0440\u0430\u0432\u0448\u0438\u0439 <i>Mac<\/i>, \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u0449\u0435\u0442 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439. \u0418 \u0435\u0441\u043b\u0438 \u0432 IDE \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u0432\u0441\u0451 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0442\u043e \u0447\u0442\u043e-\u043b\u0438\u0431\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u043f\u043e \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0443 win-\u0434\u043e\u0432\u044b\u043c <i>OpenServer<\/i> \u0438\u043b\u0438 <i>Denwer<\/i> \u0437\u0430 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0442\u0440\u0443\u0434\u043d\u043e. \u0415\u0441\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 <a href=\"http:\/\/www.mamp.info\/en\/mamp-pro\/\">MAMP PRO<\/a>, \u043d\u043e \u043e\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u0434\u0432\u0435 \u0442\u044b\u0441\u044f\u0447\u0438 \u0434\u0435\u0440\u0435\u0432\u044f\u043d\u043d\u044b\u0445. \u0414\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 Apache \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0441\u043c\u0443\u0442\u0438\u0442\u044c. <\/p>\n<p>  \u0417\u0430\u043d\u0438\u043c\u0430\u044f\u0441\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430, \u043d\u0430\u0431\u0440\u0451\u043b \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0439\u0448\u0438\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442-\u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 <a href=\"http:\/\/brew.sh\/\">Homebrew<\/a> \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0437\u0430 5-10 \u043c\u0438\u043d\u0443\u0442.<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/5d3\/176\/b94\/5d3176b940c683489d1a8233636df534.jpg\"\/>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-217245","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/217245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=217245"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/217245\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=217245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=217245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=217245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}