{"id":287717,"date":"2018-08-16T14:15:16","date_gmt":"2018-08-16T10:15:16","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=287717"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=287717","title":{"rendered":"LEMP \u0441\u0442\u0435\u043a c PHP 7 \u043d\u0430 CentOS 7 + Let&#8217;s Encrypt \u0432 Google Cloud \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Symfony 4"},"content":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/post\/419121\/\" class=\"post__text post__text-html js-mediator-article\">\u0414\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c, \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0425\u0430\u0431\u0440! <br \/>  \u0421\u043a\u0430\u0436\u0443 \u0441\u0440\u0430\u0437\u0443, \u0447\u0442\u043e \u044f \u2014 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u0438, \u0434\u0443\u043c\u0430\u044e \u043c\u043d\u043e\u0433\u0438\u0435 \u043a\u043e\u043b\u043b\u0435\u0433\u0438 \u043c\u0435\u043d\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u0442, \u0432 \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0447\u0430\u0441\u0442\u043e \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u0433\u0434\u0435-\u0442\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430, \u0433\u0434\u0435-\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430. \u041d\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u0430 \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u043d\u044b\u043c \u043e\u043f\u044b\u0442\u043e\u043c, \u043f\u043e-\u043c\u043e\u0435\u043c\u0443, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u0435\u0442 \u043d\u0430 \u043b\u0430\u0432\u0440\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 CentOS, \u0438 \u0434\u0430, \u0432 \u043d\u0435\u0439 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f SELinux, \u0438 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 MySQL, \u043e\u043d\u0430 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043b\u0438\u0448\u044c \u0442\u043e, \u0447\u0442\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 \u043f\u0440\u0438 \u0447\u0435\u043c \u0432 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u0412 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0437\u0430\u0442\u0435\u043c \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442, \u043d\u043e \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0437\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u042f \u0431\u0443\u0434\u0443 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0435\u043d \u0433\u0443\u0440\u0443 \u0437\u0430 \u0438\u0445 \u0441\u043e\u0432\u0435\u0442\u044b \u0438 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f, \u0432\u0441\u0435\u0433\u0434\u0430 \u0437\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u043a\u0440\u0438\u0442\u0438\u043a\u0443, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443 \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u043a\u0438, \u0435\u0441\u043b\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f. \u0414\u043b\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0436\u0435 \u0445\u043e\u0447\u0443 \u043f\u0440\u043e\u0446\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/habr.com\/users\/antonshevchuk\/\" class=\"user_link\">AntonShevchuk<\/a>: \u00ab\u0415\u0441\u043b\u0438 \u0412\u044b \u043d\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u044b \u0441 \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 \u043e\u043f\u0438\u0448\u0438\u0442\u0435 \u0441\u0432\u043e\u044e \u0442\u043e\u0447\u043a\u0443 \u0437\u0440\u0435\u043d\u0438\u044f, \u0437\u0430\u0447\u0435\u043c \u0436\u0435 \u0437\u043b\u043e\u0440\u0430\u0434\u043d\u043e \u043f\u043e\u043d\u0438\u0436\u0430\u0442\u044c \u0435\u043c\u0443 \u043a\u0430\u0440\u043c\u0443?\u00bb. \u0421\u043f\u0430\u0441\u0438\u0431\u043e, \u043f\u043e\u0435\u0445\u0430\u043b\u0438\u2026<\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0441\u0432\u044f\u0437\u043a\u0438 Nginx + MySQL + PHP7 \u043d\u0430 CentOS 7. \u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u043f\u0440\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u043d\u0430 Google Cloud Platform, \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438 \u043d\u0430\u0447\u043d\u0443:<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0432 Google Cloud \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 SSH-\u043a\u043b\u044e\u0447\u0435\u0439<\/b><\/p>\n<div class=\"spoiler_text\">\u0412\u044b\u0431\u0435\u0440\u0435\u043c \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u043c\u0435\u043d\u044e \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u00abCompute Engine\u00bb \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u00ab\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u00bb. \u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u0438\u043f \u043c\u0430\u0448\u0438\u043d\u044b, \u043d\u043e <b>\u043d\u0435 \u043d\u0438\u0436\u0435 g1-small<\/b>, \u0442\u0430\u043a \u043a\u0430\u043a Composer \u0434\u043b\u044f Symfony 4 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043d \u043a \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043d\u0430 f1-micro \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442.<\/p>\n<p>  \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u043d\u0430 CentOS 7, \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043c \u0434\u0438\u0441\u043a\u0430 \u0432 10\u0413\u0431 \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0432\u0441\u0435\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>  \u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u043e SSH \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043b\u044e\u0447, \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 MacOS X \u0438\u043b\u0438 Linux \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <\/p>\n<pre><code>ssh-keygen -t rsa -f __FILE__ -C __USER__<\/code><\/pre>\n<p>  \u0433\u0434\u0435 __FILE__ \u2014 \u043f\u0443\u0442\u044c \u043a \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0444\u0430\u0439\u043b\u0430, \u0430 __USER__ \u2014 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u043b\u043e\u0433\u0438\u043d\u0438\u0442\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u041f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442 \u0432\u0430\u0441 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u0443\u044e \u0444\u0440\u0430\u0437\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u0435\u043c \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430, \u0435\u0435 \u0432\u0432\u043e\u0434 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d, \u0434\u043b\u044f \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u0432\u043e\u0434\u0438\u0442\u0435 \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Enter, \u0434\u0430\u043b\u0435\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435. \u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432 __FILE__ \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u0430 \u0440\u044f\u0434\u043e\u043c \u0441 \u043d\u0438\u043c \u2014 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c __FILE__.pub<br \/>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435, \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043a\u043b\u044e\u0447\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c MacOS X \u0438 Linux \u2014 \u044d\u0442\u043e \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u043b\u044f \u0432\u0441\u0435\u0445, \u043a\u0440\u043e\u043c\u0435 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u043a\u043b\u044e\u0447\u0430, \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439<\/p>\n<pre><code>chmod 400 __FILE__ <\/code><\/pre>\n<p>  \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 Windows \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 PuTTYgen. \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Generate \u0438 \u0441\u043b\u0435\u0434\u0443\u0439\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u043e\u0434\u043d\u0430\u043a\u043e Google \u043d\u0430\u0441\u0442\u0430\u0438\u0432\u0430\u0435\u0442 \u043d\u0430 2048-\u0431\u0438\u0442\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0430\u0445, \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440. \u041f\u043e\u043b\u0435 \u00abKey comment\u00bb \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0430 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u0444\u0440\u0430\u0437\u044b \u2014 \u00abKey passphrase\u00bb. \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447. \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c .ppk \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u00abSave private key\u00bb.<\/p>\n<p>  \u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 (\u0438\u0437 \u0444\u0430\u0439\u043b\u0430 __FILE__.pub \u0434\u043b\u044f MacOS X \/ Linux \u0438\u043b\u0438 \u0438\u0437 \u043e\u043a\u043d\u0430 PuTTYgen \u0434\u043b\u044f Windows) \u0438 \u0432\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0435\u0433\u043e \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043f\u043e\u043b\u0435 \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u00ab\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u00bb:<\/p>\n<p>  <img decoding=\"async\" width=\"408\" src=\"https:\/\/habrastorage.org\/webt\/0n\/xc\/bn\/0nxcbnvsk0zdxh3gpmv4cx7ygc4.png\"><\/p>\n<p>  \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a HTTP \u0438 HTTPS, \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0432 \u0433\u0430\u043b\u043e\u0447\u043a\u0438 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u043e\u043b\u044f\u0445. \u041d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e, \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u00ab\u0421\u043e\u0437\u0434\u0430\u0442\u044c\u00bb.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u043d\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0443 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 IP-\u0430\u0434\u0440\u0435\u0441, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c\u0441\u044f \u043a \u043d\u0435\u043c\u0443 \u043f\u043e SSH \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447:<\/p>\n<pre><code>ssh -i __FILE__ __USER__@__IP__<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 LEMP. \u041f\u043e\u0434 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre><code>export USER_NAME=__\u0418\u041c\u042f_\u041f\u041e\u041b\u042c\u0417\u041e\u0412\u0410\u0422\u0415\u041b\u042f_\u0421\u0418\u0421\u0422\u0415\u041c\u042b__ export DOMAIN_NAME=__\u0412\u0410\u0428\u0415_\u0414\u041e\u041c\u0415\u041d\u041d\u041e\u0415_\u0418\u041c\u042f__<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0440\u0435\u0436\u0438\u043c \u0441\u0443\u043f\u0435\u0440\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0432\u0441\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043e\u0442 \u0435\u0433\u043e \u0438\u043c\u0435\u043d\u0438, \u0435\u0441\u043b\u0438 \u044f\u0432\u043d\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0438\u043d\u043e\u0435.<\/p>\n<p>  \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u00ab\u043e\u0441\u0438\u0440\u043e\u0442\u0435\u0432\u0448\u0438\u0435\u00bb \u043f\u0430\u043a\u0435\u0442\u044b:<\/p>\n<pre><code>yum clean all yum update yum autoremove<\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 Fedora, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 nano \u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 wget \u0434\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. \u0414\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 Symfony (\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e), \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 git, \u0442\u0430\u043a\u0436\u0435 Symfony \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 zip (\u043e\u043f\u0446\u0438\u044f -y \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043e\u0442\u0432\u0435\u0442 \u00abY\u00bb \u043d\u0430 \u0432\u0441\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0435 \u0443 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b):<\/p>\n<pre><code>yum install epel-release nano wget git-core zip unzip -y<\/code><\/pre>\n<p>  \u041d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u0435\u0442\u0438:<\/p>\n<pre><code>cat &lt;&lt; EOF &gt; \/etc\/sysconfig\/network HOSTNAME=${DOMAIN_NAME} EOF<\/code><\/pre>\n<p>  \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0436\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b hostnamectl:<\/p>\n<pre><code>hostnamectl set-hostname ${DOMAIN_NAME}<\/code><\/pre>\n<p>  \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c nginx:<\/p>\n<pre><code>yum install nginx -y<\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c nginx:<\/p>\n<pre><code>systemctl start nginx<\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c nginx \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443:<\/p>\n<pre><code>systemctl enable nginx<\/code><\/pre>\n<p>  \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c MySQL, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443:<\/p>\n<pre><code>yum install mariadb mariadb-server -y systemctl start mariadb systemctl enable mariadb<\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 MySQL, \u043d\u0430 \u0432\u0441\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043e\u0442\u0432\u0435\u0442\u044c\u0442\u0435 \u00abY\u00bb \u0438 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c \u0441\u0443\u043f\u0435\u0440\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/p>\n<pre><code>mysql_secure_installation<\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 Let&#8217;s Encrypt:<\/p>\n<pre><code>yum install certbot -y<\/code><\/pre>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u043a \u043c\u043e\u043c\u0435\u043d\u0442\u0443 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 PHP 7 \u043d\u0435\u0442 \u043d\u0438 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445 CentOS, \u043d\u0438 \u0432 Fedora, \u0435\u0433\u043e \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f REMI:<\/p>\n<pre><code class=\"bash\">yum install http:\/\/rpms.remirepo.net\/enterprise\/remi-release-7.rpm yum-utils -y  yum-config-manager --enable remi-php72  yum --enablerepo=remi,remi-php72 install php-fpm php-common php-opcache php-cli php-pear php-pdo php-mysqlnd php-gd php-mcrypt php-xml php-zip -y<\/code><\/pre>\n<p>  \u0412\u0435\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0441\u043e\u0444\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435, \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b php-fpm:<\/p>\n<pre><code>nano \/etc\/php-fpm.d\/www.conf<\/code><\/pre>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0433\u0440\u0443\u043f\u043f\u0443, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432 \u043d\u0430\u0448\u0435\u0439 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u044d\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c, \u043f\u043e\u0434 \u043a\u0435\u043c \u0432\u044b \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043b\u043e\u0433\u0438\u043d\u0438\u043b\u0438\u0441\u044c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u0430 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<pre><code>user = __\u0418\u041c\u042f_\u041f\u041e\u041b\u042c\u0417\u041e\u0412\u0410\u0422\u0415\u041b\u042f_\u0421\u0418\u0421\u0422\u0415\u041c\u042b__ group = __\u0418\u041c\u042f_\u041f\u041e\u041b\u042c\u0417\u041e\u0412\u0410\u0422\u0415\u041b\u042f_\u0421\u0418\u0421\u0422\u0415\u041c\u042b__ listen.owner = __\u0418\u041c\u042f_\u041f\u041e\u041b\u042c\u0417\u041e\u0412\u0410\u0422\u0415\u041b\u042f_\u0421\u0418\u0421\u0422\u0415\u041c\u042b__ listen.group = __\u0418\u041c\u042f_\u041f\u041e\u041b\u042c\u0417\u041e\u0412\u0410\u0422\u0415\u041b\u042f_\u0421\u0418\u0421\u0422\u0415\u041c\u042b__<\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435, \u0443\u043a\u0430\u0436\u0435\u043c \u0441\u043e\u043a\u0435\u0442 \u2014 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 listen = 127.0.0.1:9000 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<br \/>  listen = \/var\/run\/php-fpm\/php-fpm.sock<\/p>\n<p>  \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 php-fpm \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443:<\/p>\n<pre><code>systemctl start php-fpm systemctl enable php-fpm<\/code><\/pre>\n<p>  \u041e\u0442\u043a\u043b\u044e\u0447\u0438\u043c SELINUX:<\/p>\n<pre><code>setenforce 0<\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0432\u044b \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0435 SELINUX \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0441\u0435\u0430\u043d\u0441\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u043a\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b:<\/p>\n<pre><code>nano \/etc\/selinux\/config<\/code><\/pre>\n<p>  \u0433\u0434\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c SELINUX=disabled<\/p>\n<p>  \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 <b>\u0432\u044b\u0439\u0434\u0435\u0442\u0435 \u0438\u0437 \u0440\u0435\u0436\u0438\u043c\u0430 \u0441\u0443\u043f\u0435\u0440\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/b>. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0442\u0443\u0434\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u2014 \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0443 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0441\u0442\u0435\u043a\u0430:<\/p>\n<pre><code>cd mkdir -p ${DOMAIN_NAME}\/public cd ${DOMAIN_NAME}\/public nano index.php<\/code><\/pre>\n<p>  \u041f\u0443\u0441\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c (\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 __YOUR_ROOT_PASSWORD__ \u043d\u0430 \u043f\u0430\u0440\u043e\u043b\u044c \u0441\u0443\u043f\u0435\u0440\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f MySQL, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0438 \u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435):<\/p>\n<pre><code class=\"php\">&lt;html&gt; &lt;head&gt;     &lt;h2&gt;LEMP test&lt;\/h2&gt; &lt;\/head&gt;     &lt;body&gt;     &lt;?php echo '&lt;p&gt;Hello!&lt;\/p&gt;';      $host = \"localhost\";     $username = \"root\";     $password = \"__YOUR_ROOT_PASSWORD__\";      $connection = mysqli_connect($host, $username, $password);      if (!$connection)          print '&lt;p&gt;DB connect failed with error: ' .  mysqli_connect_error() . '&lt;\/p&gt;';     else         print '&lt;p&gt;DB connection established&lt;\/p&gt;';     ?&gt; &lt;\/body&gt; &lt;\/html&gt;<\/code><\/pre>\n<p>  \u0421\u043d\u043e\u0432\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0435\u043c\u0441\u044f \u043f\u043e\u0434 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0441\u0443\u043f\u0435\u0440\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043e\u0442\u043a\u0440\u043e\u0435\u043c \u043d\u0430 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b nginx:<\/p>\n<pre><code>nano \/etc\/nginx\/nginx.conf<\/code><\/pre>\n<p>  \u0418\u0437\u043c\u0435\u043d\u0438\u043c \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 php-fpm:<br \/>  user __\u0418\u041c\u042f_\u041f\u041e\u041b\u042c\u0417\u041e\u0412\u0410\u0422\u0415\u041b\u042f_\u0421\u0418\u0421\u0422\u0415\u041c\u042b__;<\/p>\n<p>  \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b server, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u043f\u043e-\u0443\u043f\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"nginx\">server {     set $USER_NAME __\u0418\u041c\u042f_\u041f\u041e\u041b\u042c\u0417\u041e\u0412\u0410\u0422\u0415\u041b\u042f_\u0421\u0418\u0421\u0422\u0415\u041c\u042b__;      server_name $hostname www.$hostname;      root \/home\/$USER_NAME\/$hostname\/public;      location \/ {         # try to serve file directly, fallback to index.php         try_files $uri \/index.php$is_args$args;     }      location ~ ^\/index\\.php(\/|$) {         fastcgi_pass unix:\/var\/run\/php-fpm\/php-fpm.sock;         fastcgi_split_path_info ^(.+\\.php)(\/.*)$;         include fastcgi_params;          fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;         fastcgi_param DOCUMENT_ROOT $realpath_root;          internal;     }      location ~ \\.php$ {         return 404;     }      error_log \/var\/log\/nginx\/$hostname.error.log;     access_log \/var\/log\/nginx\/$hostname.access.log; }<\/code><\/pre>\n<p>  \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u0434\u0430\u0439\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 nginx \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e:<\/p>\n<pre><code>nginx -s reload<\/code><\/pre>\n<p>  \u041f\u043e \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u043c\u0443 \u0438\u043c\u0435\u043d\u0438 __\u0412\u0410\u0428\u0415_\u0414\u041e\u041c\u0415\u041d\u041d\u041e\u0415_\u0418\u041c\u042f__ \u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u043d\u0430\u043c\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u2014 \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0430. <\/p>\n<p>  \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430:<\/p>\n<pre><code>openssl dhparam -out \/etc\/ssl\/certs\/dhparam.pem 2048  certbot certonly --webroot -w \/home\/${USER_NAME}\/${DOMAIN_NAME}\/public -d ${DOMAIN_NAME}  certbot certonly --webroot -w \/home\/${USER_NAME}\/${DOMAIN_NAME}\/public -d www.${DOMAIN_NAME}<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043b\u044e\u0447\u0435\u0439, \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e nginx \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 HTTPS, \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u00ab\u0433\u043b\u0430\u0432\u043d\u044b\u043c\u00bb \u0438\u0434\u0435\u0442 \u0434\u043e\u043c\u0435\u043d \u0431\u0435\u0437 www \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435. \u0418 \u0442\u0430\u043a:<\/p>\n<pre><code>nano \/etc\/nginx\/nginx.conf<\/code><\/pre>\n<p>  \u041c\u0435\u043d\u044f\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u043d\u0430\u043c\u0438 2 \u0448\u0430\u0433\u0430 \u043d\u0430\u0437\u0430\u0434 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 server \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435:<\/p>\n<pre><code class=\"nginx\">server {        set $USER_NAME __\u0418\u041c\u042f_\u041f\u041e\u041b\u042c\u0417\u041e\u0412\u0410\u0422\u0415\u041b\u042f_\u0421\u0418\u0421\u0422\u0415\u041c\u042b__;        listen 443 ssl;        server_name $hostname;         ssl_certificate \/etc\/letsencrypt\/live\/__\u0412\u0410\u0428\u0415_\u0414\u041e\u041c\u0415\u041d\u041d\u041e\u0415_\u0418\u041c\u042f__\/fullchain.pem;        ssl_certificate_key \/etc\/letsencrypt\/live\/__\u0412\u0410\u0428\u0415_\u0414\u041e\u041c\u0415\u041d\u041d\u041e\u0415_\u0418\u041c\u042f__\/privkey.pem;         ssl_protocols TLSv1 TLSv1.1 TLSv1.2;        ssl_prefer_server_ciphers on;        ssl_ciphers \"EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH\";        ssl_ecdh_curve secp384r1;        ssl_session_cache shared:SSL:10m;        ssl_session_tickets off;        ssl_stapling on;        ssl_stapling_verify on;        resolver 8.8.8.8 8.8.4.4 valid=300s;        resolver_timeout 5s;        add_header Strict-Transport-Security \"max-age=63072000; includeSubdomains\";        add_header X-Frame-Options DENY;        add_header X-Content-Type-Options nosniff;         ssl_dhparam \/etc\/ssl\/certs\/dhparam.pem;         root \/home\/$USER_NAME\/$hostname\/public;         location \/ {            # try to serve file directly, fallback to index.php            try_files $uri \/index.php$is_args$args;        }         location ~ ^\/index\\.php(\/|$) {            fastcgi_pass unix:\/var\/run\/php-fpm\/php-fpm.sock;            fastcgi_split_path_info ^(.+\\.php)(\/.*)$;            include fastcgi_params;             fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;            fastcgi_param DOCUMENT_ROOT $realpath_root;             internal;        }         location ~ \\.php$ {            return 404;        }         error_log \/var\/log\/nginx\/$hostname.error.log;        access_log \/var\/log\/nginx\/$hostname.access.log;    }     server {        listen 443 ssl;        server_name www.$hostname;         ssl_certificate \/etc\/letsencrypt\/live\/www.__\u0412\u0410\u0428\u0415_\u0414\u041e\u041c\u0415\u041d\u041d\u041e\u0415_\u0418\u041c\u042f__\/fullchain.pem;        ssl_certificate_key \/etc\/letsencrypt\/live\/www.__\u0412\u0410\u0428\u0415_\u0414\u041e\u041c\u0415\u041d\u041d\u041e\u0415_\u0418\u041c\u042f__\/privkey.pem;        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;         return 301 https:\/\/$hostname$request_uri;    }     server {        server_name $hostname www.$hostname;        return 301 https:\/\/$hostname$request_uri;    }<\/code><\/pre>\n<p>  \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u043c nginx \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e:<\/p>\n<pre><code>nginx -s reload<\/code><\/pre>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a Let&#8217;s Encrypt \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0440\u0430\u0437 \u0432 \u0442\u0440\u0438 \u043c\u0435\u0441\u044f\u0446\u0430, \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u043e\u0434\u043b\u0435\u043d\u0438\u0435 \u0432 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0435, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0442\u0430\u043a, \u0432 \u043d\u043e\u0447\u044c \u043d\u0430 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a<\/p>\n<pre><code>crontab -e<\/code><\/pre>\n<p>  15 4 * * 1 \/usr\/bin\/certbot renew &#8212;quiet<br \/>  18 4 * * 1 \/usr\/bin\/systemctl reload nginx<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0443 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438, \u043c\u0435\u043d\u044f\u0435\u043c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0430\u043f\u043e\u043a:<\/p>\n<pre><code>chown -R ${USER_NAME}:${USER_NAME} \/var\/lib\/nginx chown -R ${USER_NAME}:${USER_NAME} \/var\/lib\/php\/session\/<\/code><\/pre>\n<p>  \u0412\u0441\u0435, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0433\u043e\u0442\u043e\u0432\u0430. \u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0435\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0441\u043e\u0444\u0442 \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u0431\u044f \u0438\u043d\u0430\u0447\u0435, \u0434\u0430\u043b\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u043d\u0430\u043c\u0438 \u043f\u0430\u043f\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043d\u0435\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439.<\/p>\n<p>  <b>UPD<\/b>:<br \/>  \u041f\u043e \u0441\u043e\u0432\u0435\u0442\u0443 <a href=\"https:\/\/habr.com\/users\/amet13\/\" class=\"user_link\">Amet13<\/a> \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 + \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u00ab\u0431\u0435\u0441\u0448\u0443\u043c\u043d\u0443\u044e\u00bb \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443<\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/post\/419121\/\"> https:\/\/habr.com\/post\/419121\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/post\/419121\/\" class=\"post__text post__text-html js-mediator-article\">\u0414\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c, \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0425\u0430\u0431\u0440! <br \/>  \u0421\u043a\u0430\u0436\u0443 \u0441\u0440\u0430\u0437\u0443, \u0447\u0442\u043e \u044f \u2014 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u0438, \u0434\u0443\u043c\u0430\u044e \u043c\u043d\u043e\u0433\u0438\u0435 \u043a\u043e\u043b\u043b\u0435\u0433\u0438 \u043c\u0435\u043d\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u0442, \u0432 \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0447\u0430\u0441\u0442\u043e \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u0433\u0434\u0435-\u0442\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430, \u0433\u0434\u0435-\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430. \u041d\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u0430 \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u043d\u044b\u043c \u043e\u043f\u044b\u0442\u043e\u043c, \u043f\u043e-\u043c\u043e\u0435\u043c\u0443, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u0435\u0442 \u043d\u0430 \u043b\u0430\u0432\u0440\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 CentOS, \u0438 \u0434\u0430, \u0432 \u043d\u0435\u0439 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f SELinux, \u0438 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 MySQL, \u043e\u043d\u0430 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043b\u0438\u0448\u044c \u0442\u043e, \u0447\u0442\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 \u043f\u0440\u0438 \u0447\u0435\u043c \u0432 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u0412 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0437\u0430\u0442\u0435\u043c \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442, \u043d\u043e \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0437\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u042f \u0431\u0443\u0434\u0443 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0435\u043d \u0433\u0443\u0440\u0443 \u0437\u0430 \u0438\u0445 \u0441\u043e\u0432\u0435\u0442\u044b \u0438 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f, \u0432\u0441\u0435\u0433\u0434\u0430 \u0437\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u043a\u0440\u0438\u0442\u0438\u043a\u0443, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443 \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u043a\u0438, \u0435\u0441\u043b\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f. \u0414\u043b\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0436\u0435 \u0445\u043e\u0447\u0443 \u043f\u0440\u043e\u0446\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/habr.com\/users\/antonshevchuk\/\" class=\"user_link\">AntonShevchuk<\/a>: \u00ab\u0415\u0441\u043b\u0438 \u0412\u044b \u043d\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u044b \u0441 \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 \u043e\u043f\u0438\u0448\u0438\u0442\u0435 \u0441\u0432\u043e\u044e \u0442\u043e\u0447\u043a\u0443 \u0437\u0440\u0435\u043d\u0438\u044f, \u0437\u0430\u0447\u0435\u043c \u0436\u0435 \u0437\u043b\u043e\u0440\u0430\u0434\u043d\u043e \u043f\u043e\u043d\u0438\u0436\u0430\u0442\u044c \u0435\u043c\u0443 \u043a\u0430\u0440\u043c\u0443?\u00bb. \u0421\u043f\u0430\u0441\u0438\u0431\u043e, \u043f\u043e\u0435\u0445\u0430\u043b\u0438\u2026<\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0441\u0432\u044f\u0437\u043a\u0438 Nginx + MySQL + PHP7 \u043d\u0430 CentOS 7. \u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u043f\u0440\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u043d\u0430 Google Cloud Platform, \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438 \u043d\u0430\u0447\u043d\u0443:  <\/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-287717","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/287717","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=287717"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/287717\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=287717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=287717"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=287717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}