{"id":299513,"date":"2020-03-01T21:00:18","date_gmt":"2020-03-01T21:00:18","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=299513"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=299513","title":{"rendered":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 VestaCP \u043d\u0430 VPS, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 docker \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u0436\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u0438 PHP"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/490592\/\">\u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438!<\/p>\n<p>  \u041e\u0441\u0442\u0430\u0432\u043b\u044e \u0442\u0443\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0430 \u043d\u0430 VPS \u0437\u0430 5 \u0435\u0432\u0440\u043e, \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0441 \u0446\u0435\u043b\u044c\u044e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435.<\/p>\n<p>  \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u044f \u0430\u0440\u0435\u043d\u0434\u043e\u0432\u0430\u043b \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u0434 20+ \u0441\u0430\u0439\u0442\u043e\u0432, \u0444\u0430\u0439\u043b\u043e\u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a, \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u044b\u0445 \u043d\u0430 PostgreSQL \u0434\u043b\u044f 1\u0421, \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 IMAP. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b ISPmanager \u0441 \u00ab\u0432\u0435\u0447\u043d\u043e\u0439\u00bb \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u041e\u0421 \u0431\u044b\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e CentOS 7 (\u0438\u043b\u0438 \u0434\u0430\u0436\u0435 6), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0432\u0430\u0436\u0430\u044e, \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f Debian\/Ubuntu. \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0443\u0445\u043e\u0434\u0438\u043b\u0438 \u0432 \u0441\u043e\u0446\u0441\u0435\u0442\u0438, \u0441\u0430\u0439\u0442\u044b \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u0430\u043b\u0438 \u0431\u044b\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c\u0438, \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u043b\u0438\u0441\u044c. <\/p>\n<p>  \u0412 2019 \u0433\u043e\u0434\u0443 \u044f \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f \u043c\u043e\u0439 \u0441\u0430\u0439\u0442 \u0438 \u0434\u0432\u0430 \u0441\u0430\u0439\u0442\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u0432 IMAP \u0441 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u0438\u0441\u0435\u043c \u043d\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443 \u043c\u0435\u043d\u044f, \u0444\u0430\u0439\u043b\u043e\u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u0438 \u0442\u0430\u043a \u0436\u0435 \u0443\u0448\u043b\u0438 \u0432 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/w5\/4h\/xb\/w54hxbcxo5185n2npfiok-dugg4.png\"><\/p>\n<p>  \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u043e\u0434\u0438\u043d \u0441\u0430\u0439\u0442 \u043d\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 PHP \u0432\u044b\u0448\u0435 5.4<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0420\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0448\u0435\u0432\u043e\u043c VPS \u0441 40\u0413\u0431 hdd, 2 CPU, 4\u041e\u0417\u0423 \u043f\u0440\u043e\u0442\u0438\u0432 8 \u044f\u0434\u0435\u0440 i7, 750 SSD, 24\u041e\u0417\u0423. <\/p>\n<p>  \u0411\u0430\u0437\u0430 postgresql \u043f\u0435\u0440\u0435\u0435\u0445\u0430\u043b\u0430 \u043d\u0430 i5 HP \u043c\u0438\u043d\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0441 16\u0413\u0431 \u041e\u0417\u0423 \u043d\u0430 \u043f\u043b\u0430\u0442\u044f\u043d\u043e\u0439 \u0448\u043a\u0430\u0444 \u0434\u043e\u043c\u0430, \u0432 \u043d\u043e\u0432\u043e\u043c VPS \u0432 docker \u0437\u0430\u0432\u0435\u043b RouterOS, \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b L2TP \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e \u0434\u043e\u0441\u0442\u0443\u043f \u0447\u0435\u0440\u0435\u0437 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043a \u0431\u0430\u0437\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445 1\u0421 \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e VPS \u0441 Windows 8.1 \u043d\u0430 \u0431\u043e\u0440\u0442\u0443. \u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u041e\u0421 Windows \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0435 \u043d\u0430 \u043f\u043b\u0430\u0442\u044f\u043d\u043e\u043c \u0448\u043a\u0430\u0444\u0443 \u043f\u043e\u0434 \u044d\u0442\u0438 \u0446\u0435\u043b\u0438, \u043d\u043e \u0432\u0441\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f PostgreSQL \u0437\u0430\u0442\u043e\u0447\u0435\u043d\u044b \u043f\u043e\u0434 Linux, \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043e\u043d \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0434 Linux, \u0435\u0441\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u0432\u043d\u0435 \u043c\u043e\u0438\u0445 \u043c\u0430\u0448\u0438\u043d \u043d\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<p>  \u0418\u0442\u0430\u043a \u0432\u0432\u043e\u0434\u043d\u0430\u044f: <\/p>\n<ol>\n<li>\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043d\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0435 30\u0413\u0431 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u041e\u0421, \u0441\u0430\u0439\u0442\u0430\u043c\u0438 \u0438 \u043f\u043e\u0447\u0442\u043e\u0439;<\/li>\n<li>\u0411\u0435\u043a\u0430\u043f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u0431\u043b\u0430\u043a\u043e;<\/li>\n<li>\u041e\u0434\u0438\u043d \u0441\u0430\u0439\u0442 \u0441\u0430\u043c\u043e\u043f\u0438\u0441\u043d\u044b\u0439, \u0434\u0432\u0430 \u043d\u0430 WP;<\/li>\n<li>\u0411\u0430\u0437\u044b \u0432 MySQL;<\/li>\n<li>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0430\u0439\u0442\u044b \u043f\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438;<\/li>\n<li>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 ssh (\u043d\u0443\u0436\u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0430\u0439\u0442\u0430\u043c\u0438);<\/li>\n<li>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0435 (\u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0438 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u0430\u044f \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c). <\/li>\n<\/ol>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u043c \u043f\u0430\u043d\u0435\u043b\u044f\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0448\u0438\u043b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0430 VestaCP, \u0445\u043e\u0442\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0434\u0438\u0432\u043b\u0435\u043d, \u0447\u0442\u043e CP \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 RedHat\/Debian \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u0432. \u041f\u0440\u0438\u0432\u043e\u0436\u0443 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442 \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/9i\/bh\/uw\/9ibhuwrrltcb9m7w66qvwgk776g.png\"><\/p>\n<p>  \u041f\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441 \u043c\u043e\u0435\u0439 VPS \u0432\u0441\u0435 \u0437\u0434\u043e\u0440\u043e\u0432\u043e. <\/p>\n<p>  \u0418\u0442\u0430\u043a, hetzner.cloud, \u0441\u043e\u0437\u0434\u0430\u044e \u043f\u0440\u043e\u0435\u043a\u0442 (project), \u0432 \u043d\u0435\u043c \u043c\u0430\u0448\u0438\u043d\u0430 CX21, \u0441\u043e\u0437\u0434\u0430\u0442\u044c. <\/p>\n<p>  VestaCP \u0441\u0442\u0430\u0432\u0438\u0442 nginx proxy \u043a apache2, \u043a\u043e\u043d\u0444\u0438\u0433 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430\/\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. <\/p>\n<p>  \u041d\u0435 \u0431\u0443\u0434\u0443 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0438, \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u2014 Debian 9. <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c SSH-2 RSA \u043a\u043b\u044e\u0447 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PuTTY<\/b><\/p>\n<div class=\"spoiler_text\">\u0412 PuTTY \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 puttygen \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e SSH-2 RSA \u043a\u043b\u044e\u0447, \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e \u0437\u0430\u043a\u0438\u0434\u044b\u0432\u0430\u044e \u0435\u0433\u043e \u0441\u0435\u0431\u0435 \u0432 Dropbox.<\/p>\n<p>  \u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 Acess \u043f\u0440\u043e\u0435\u043a\u0442\u0430 hetzner.cloud \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043e\u043a \u043a\u043b\u044e\u0447\u0430 RSA, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u0432 \u0441\u0430\u043c\u043e\u043c PuTTY \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 SSH-&gt;\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f (\u0443 \u043c\u0435\u043d\u044f PuTTY RUS) \u0444\u0430\u0439\u043b \u0441 \u043a\u043b\u044e\u0447\u043e\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438\u0437 Dropbox. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u044e \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043c\u0430\u0448\u0438\u043d\u044b.   <\/div>\n<\/div>\n<p>  \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443: <\/p>\n<pre><code class=\"bash\">apt-get update -y apt-get upgrade -y  apt-get install mc -y reboot <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u0442\u0430\u0432\u0438\u043c VestaCP \u043d\u0430 Debian 9<\/b><\/p>\n<div class=\"spoiler_text\"><a href=\"https:\/\/vestacp.com\/install\/\">\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0439<\/a>. <br \/>  \u0412 Debian \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a \u0440\u0443\u0433\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e exim \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u043c\u0435\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e, \u0432\u044b\u0431\u0440\u0430\u043b \u00aby\u00bb \u0432 \u043f\u0443\u043d\u043a\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0441 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 exim. \u041f\u0440\u0430\u0432\u0434\u0430 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u043c\u0435\u043d\u044f \u0432\u044b\u043a\u0438\u043d\u0443\u043b\u043e \u0438\u0437 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u0430, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0435\u0449\u0435 \u0440\u0430\u0437: <\/p>\n<pre><code class=\"bash\">\/bin\/bash vst-install-debian.sh <\/code><\/pre>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u2014 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 VestaCP \u0434\u0430\u043b\u0430 \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0443 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 http:\/\/:8083\/ admin password, \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435. <\/p><\/div>\n<\/div>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u0438 \u043f\u0430\u043d\u0435\u043b\u0438 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0448\u0435\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c Firewall \u0438 \u0431\u044b\u043b \u0443\u0434\u0438\u0432\u043b\u0435\u043d, \u0447\u0442\u043e \u043e\u0434\u043d\u043e \u0438\u0437 \u043f\u0440\u0430\u0432\u0438\u043b \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u0438\u0437\u0432\u043d\u0435 \u043a MySQL (\u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f MariaDB). <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/uw\/cr\/es\/uwcres1tpfzglmt7b0n1n9snvgc.png\"><\/p>\n<p>  \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0441\u0440\u0430\u0437\u0443 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u044b \u043a \u0442\u0430\u043a\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c, \u0443 \u043c\u0435\u043d\u044f \u0431\u0440\u0443\u0442\u0444\u043e\u0440\u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 \u043f\u043e\u0448\u0435\u043b \u043c\u0438\u043d\u0443\u0442 \u0447\u0435\u0440\u0435\u0437 5 \u043f\u043e\u0441\u043b\u0435 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u0438. <\/p>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0432\u0435\u0440\u0441\u0438\u044e PHP: 7.0.33 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438. \u041f\u0435\u0440\u0435\u0445\u043e\u0436\u0443 \u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e \u043f\u043e\u043d\u0438\u0436\u0435\u043d\u0438\u044e \u0432\u0435\u0440\u0441\u0438\u0438 PHP \u0434\u043e 5.4.16(\u0440\u0435\u0448\u0435\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u0430\u043a \u043d\u0430 \u0441\u0442\u0430\u0440\u043e\u043c \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0435 CentOS 7, epel, httpd + php: <\/p>\n<pre><code class=\"bash\">wget https:\/\/download.docker.com\/linux\/debian\/gpg sudo apt-key add gpg echo &quot;deb [arch=amd64] https:\/\/download.docker.com\/linux\/debian $(lsb_release -cs) stable&quot; | sudo tee -a \/etc\/apt\/sources.list.d\/docker.list apt-get install docker-ce systemctl enable docker docker login <\/code><\/pre>\n<p>  (\u0435\u0441\u043b\u0438 \u0435\u0449\u0435 \u043d\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 <a href=\"https:\/\/hub.docker.com\/\">\u0414\u043e\u043a\u0435\u0440 \u0425\u0430\u0431 <\/a><\/p>\n<p>  \u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u0430\u0439\u0442\u0430 \u0432 VestaCP \u0438 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u0430. \u0421\u043a\u0440\u0438\u043f\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: \/home\/site1\/wev\/site1.ru\/public_html<\/p>\n<p>  \u0412 docker \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u043b\u0438\u0437 CentOS \u043d\u0430 \u0431\u0430\u0437\u0435 default centos:7. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0441\u0432\u043e\u0439 DockerFile:<\/p>\n<pre><code class=\"bash\">FROM centos:7 MAINTAINER Dmitry Luponos &lt;info@adm55.ru&gt; VOLUME \/home\/site1 EXPOSE 8082 RUN yum update -y &amp;&amp; yum install mc -y RUN yum install epel-release -y RUN yum install yum-utils -y RUN yum-config-manager --disable remi-safe RUN yum-config-manager --enable remi RUN yum-config-manager --enable remi-php54 RUN yum install -y httpd RUN yum install php-fpm php-cli php-mysqlnd php-gd php-ldap php-odbc php-pdo php-pecl-memcache php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap php-zip php-opcache php-imap php php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json -y RUN yum clean all <\/code><\/pre>\n<p>  \u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u044f \u0434\u0435\u043b\u0430\u044e: <\/p>\n<p>  FROM centos:7 \u2014 \u0432\u044b\u0431\u0438\u0440\u0430\u044e \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u044e docker hub<br \/>  VOLUME \/home\/site1 \u2014 \u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0438\u0437 \u041e\u0421 \u0432 \u0433\u043e\u0441\u0442\u0435\u0432\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443<br \/>  EXPOSE 8082 \u2014 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e \u043f\u043e\u0440\u0442 httpd \u2014 8082<br \/>  RUN \u2014 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e \u0432 \u043c\u0430\u0448\u0438\u043d\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0431\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 <br \/>  RUN yum clean all \u2014 \u043e\u0447\u0438\u0449\u0430\u044e \u043a\u044d\u0448, \u0447\u0442\u043e\u0431\u044b \u043c\u0430\u0448\u0438\u043d\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0430 \u043c\u0435\u043d\u044c\u0448\u0435 \u043c\u0435\u0441\u0442\u0430. <\/p>\n<p>  \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u044e \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 docker \u0434\u043b\u044f CentOS 7: <\/p>\n<pre><code class=\"bash\">docker pull centos:7 cd \/&lt;\u043f\u0443\u0442\u044c \u0434\u043e Dockerfile&gt; docker build -t bessome\/centos:7 .  docker run -it --name centphp54 --expose 8082 --restart always -v \/home\/site1:\/home\/site1 bessome\/centos7:php54 \/bin\/bash <\/code><\/pre>\n<p>  \u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u043c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c (\u043a\u043b\u044e\u0447 -it) \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 docker. <\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e ID \u043c\u0430\u0448\u0438\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <\/p>\n<pre><code class=\"bash\">docker ps -a<\/code><\/pre>\n<p> \u0432\u0438\u0434\u0430 \u00abe8b6d6ef6c1a\u00bb. <\/p>\n<pre><code class=\"bash\">docker exec -it e8b6d6ef6c1a \/bin\/bash<\/code><\/pre>\n<p>  \u0438 \u044f \u0432\u043d\u0443\u0442\u0440\u0438. <\/p>\n<p>  \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u044f \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043e\u0442 EXPOSE \u2014 \u043c\u043d\u0435 \u043d\u0435 \u043d\u0430\u0434\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u0442 \u043d\u0430\u0440\u0443\u0436\u0443, \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u0447\u0442\u043e nginx \u0432\u0438\u0434\u0438\u0442 \u0441\u0430\u0439\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0442\u0438 172.17.0.0\/24, \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 8082 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 docker. <\/p>\n<p>  \u041a\u043b\u044e\u0447 <\/p>\n<pre><code class=\"bash\">--restart always<\/code><\/pre>\n<p>  \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0430\u0448\u0438\u043d\u0435 \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u043b\u0443\u0436\u0431\u044b Docker, \u0435\u0441\u043b\u0438 \u0437\u0430\u0431\u044b\u043b\u0438 \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a: <\/p>\n<pre><code class=\"bash\">docker update --restart always e8b6d6ef6c1a<\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0437\u0430\u0446\u0435\u043f\u0438\u043b\u0441\u044f \u043b\u0438 \u043f\u0440\u043e\u0431\u0440\u043e\u0441 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0445\u043e\u0441\u0442\u0430: <\/p>\n<pre><code class=\"bash\">ls \/home\/site1 [root@e8b6d6ef6c1a centos.docker]# cd \/home\/site1 [root@e8b6d6ef6c1a centos.docker]# ls conf  mail  tmp  web du -sh 418M    . <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 httpd \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430, \u043f\u043e\u043a\u0430 \u043c\u044b \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438:<\/b><\/p>\n<div class=\"spoiler_text\">httpd.conf: <\/p>\n<pre><code class=\"bash\">Listen 8082 IncludeOptional conf.d\/*.conf <\/code><\/pre>\n<p>  \u0438 \u0437\u0430\u0431\u0438\u0440\u0430\u044e \u0438\u0437 \/home\/site1\/conf \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0441\u0430\u0439\u0442\u0430 \u0432 \/etc\/httpd\/conf.d\/site1.conf:<\/p>\n<pre><code class=\"bash\">&lt;VirtualHost *:8082&gt;      ServerName site1.ru     ServerAlias www.site1.ru     ServerAdmin info@site1.ru     AddDefaultCharset off     DocumentRoot \/home\/site1\/web\/site1.ru\/public_html     ScriptAlias \/cgi-bin\/ \/home\/site1\/web\/site1.ru\/cgi-bin\/     Alias \/vstats\/ \/home\/site1\/web\/site1.ru\/stats\/     Alias \/error\/ \/home\/site1\/web\/site1.ru\/document_errors\/     &lt;FilesMatch &quot;\\.ph(p[3-5]?|tml)$&quot;&gt;         SetHandler application\/x-httpd-php     &lt;\/FilesMatch&gt;     DirectoryIndex index.html index.php     &lt;FilesMatch &quot;\\.phps$&quot;&gt;         SetHandler application\/x-httpd-php-source     &lt;\/FilesMatch&gt;     &lt;Directory \/home\/site1\/web\/site1.ru\/public_html&gt;         AllowOverride All         Require all granted         Options +Includes -Indexes +ExecCGI         php_admin_value open_basedir \/home\/tehnolit\/web\/site1.ru\/public_html:\/home\/site1\/tmp         php_admin_value upload_tmp_dir \/home\/site1\/tmp         php_admin_value session.save_path \/home\/site1\/tmp         php_admin_flag engine on     &lt;\/Directory&gt;     &lt;Directory \/home\/site1\/web\/site1.ru\/stats&gt;         AllowOverride All     &lt;\/Directory&gt;      IncludeOptional \/home\/site1\/conf\/web\/apache2.site1.ru.conf*  &lt;\/VirtualHost&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 VestaCP \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u043e\u044f \u0434\u043e\u043c\u0430\u0448\u043d\u044f\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f, site1.ru \u2014 \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f, \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c docker \u0438 \u043c\u0430\u0448\u0438\u043d\u044b \u0432 \u043d\u0435\u043c, \u043a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e systemctl \u0432\u044b\u0434\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443 \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443 httpd \u0432\u043d\u0443\u0442\u0440\u0438 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430, \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u043c \u0438\u0437 rc.local VPS: <\/p>\n<pre><code class=\"bash\"> cat rc.local #!\/bin\/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will &quot;exit 0&quot; on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing.  docker exec 5473051a7b3c \/usr\/sbin\/httpd \/opt\/mpr-start iptables-restore &lt; \/usr\/src\/iptables.lst  exit 0 <\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e <a href=\"https:\/\/softnastroy.com\/content\/vklyuchaem-rclocal-v-debian-9-stretch.html\">\u0441\u043e\u0437\u0434\u0430\u0432 \u0441\u043b\u0443\u0436\u0431\u0443 \u0434\u043b\u044f \u0441\u0442\u0430\u0440\u0442\u0430 rc.local \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435<\/a>. <\/p>\n<p>  \u041d\u0443\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u0441\u0435 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0441\u0430\u0439\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0438\u0437 VestaCP \u0438\u043b\u0438 VPS, \u0441 \u043e\u0434\u043d\u043e\u0439 \u043e\u0433\u043e\u0432\u043e\u0440\u043a\u043e\u0439: \u043f\u0440\u0430\u0432\u043a\u0430 nginx.conf \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a httpd CentOS7: <\/p>\n<pre><code class=\"bash\">server {     listen      &lt;IP-VPS&gt;:80;     server_name site1.ru www.site1.ru;     error_log  \/var\/log\/apache2\/domains\/site1.ru.error.log error;      location \/ { #\u041d\u0430\u0448 \u0412\u041d\u0423\u0422\u0420\u0415\u041d\u041d\u0418\u0419 \u0430\u0434\u0440\u0435\u0441 docker \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430:          proxy_pass      http:\/\/172.17.0.2:8082;         location ~* ^.+\\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav|wma|3gp|avi|flv|m4v|mkv|mov|mpeg|mpg|wmv|exe|iso|dmg|swf)$ {             root           \/home\/site1\/web\/site1.ru\/public_html;             access_log     \/var\/log\/apache2\/domains\/site1.ru.log combined;             access_log     \/var\/log\/apache2\/domains\/site1.ru.bytes bytes;             expires        max;             try_files      $uri @fallback;         }     }      location \/error\/ {         alias   \/home\/site1\/web\/site1.ru\/document_errors\/;     }      location @fallback { #\u041d\u0430\u0448 \u0412\u041d\u0423\u0422\u0420\u0415\u041d\u041d\u0418\u0419 \u0430\u0434\u0440\u0435\u0441 docker \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430:          proxy_pass      http:\/\/172.17.0.2:8082;     }      location ~ \/\\.ht    {return 404;}     location ~ \/\\.svn\/  {return 404;}     location ~ \/\\.git\/  {return 404;}     location ~ \/\\.hg\/   {return 404;}     location ~ \/\\.bzr\/  {return 404;}      include \/home\/site1\/conf\/web\/nginx.site1.ru.conf*; } <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0434\u0435\u043b\u043e \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u2014 \u0437\u0430\u0446\u0435\u043f\u043b\u044f\u0435\u043c\u0441\u044f \u043a MySQL, \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0444\u0430\u0439\u043b \u0441\u0430\u0439\u0442\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430 172.17.0.1 \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0439 VPS, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0431\u0430\u0437\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0443\u0436\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u0430 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043d\u0435\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d. <\/p>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u0441\u0430\u0439\u0442\u0443 site1.ru \u0432\u0441\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0448\u0442\u0430\u0442\u043d\u043e, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0433\u0434\u0435-\u0442\u043e \u0437\u0430\u043a\u0440\u0430\u043b\u0430\u0441\u044c \u043e\u0448\u0438\u0431\u043a\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a, \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c. <\/p>\n<p>  \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0430\u0439\u0442\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 PHP 7.0 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0431\u0443\u0434\u0443 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0441\u0430\u043c\u043e\u0439 VestaCP. <\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u044f \u0434\u043e\u0441\u0442\u0438\u0433 \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u0430\u0432\u0438\u043b \u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u0431\u043e\u0439. \u041e\u0441\u0442\u0430\u0432\u043b\u044e \u0437\u0430 \u0440\u0430\u043c\u043a\u0430\u043c\u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u044b\u044f\u0441\u043d\u0435\u043d\u0438\u0435 ip-\u0430\u0434\u0440\u0435\u0441\u0430 172.17.0.\u0445\u0445\u0445 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 docker, \u043f\u0438\u043d\u0433\u0438 \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u0438\u0445 \u0432 DockerFile \u043d\u0435\u0442, \u0441\u0442\u0430\u0432\u0438\u043b \u0447\u0435\u0440\u0435\u0437 yum \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u044b. <\/p>\n<p>  P.S. \u041f\u043e\u043f\u0443\u0442\u043d\u043e \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c RouterOS \u0442\u0430\u043a \u0436\u0435 \u0432 Docker, \u0431\u0435\u043a\u0430\u043f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 L2TP \u0441 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0433\u043e \u0440\u043e\u0443\u0442\u0435\u0440\u0430 \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b, \u0442\u0430\u043a \u0447\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441: <\/p>\n<pre><code class=\"bash\">docker pull evilfreelancer\/docker-routeros docker run -d -p 22202:22 -p 8728:8728 -p 8729:8729 -p 5900:5900 --restart always -ti evilfreelancer\/docker-routeros  iptables-save &gt; iptables.lst <\/code><\/pre>\n<p>  \u0412\u043d\u0435\u0441\u0435\u043c \u0432 iptables \u0447\u0435\u0440\u0435\u0437 iptables.lst \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043b\u044f winbox (\u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u043e\u0440\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 \u043f\u0440\u043e\u0431\u0440\u043e\u0448\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 8728 \u0438 5900): <\/p>\n<pre><code class=\"bash\">-A INPUT -p tcp -m tcp --dport 8291 -j ACCEPT -A DOCKER -d 172.17.0.3\/32 ! -i docker0 -o docker0 -p tcp -m tcp --dport 8291 -j ACCEPT -A POSTROUTING -s 172.17.0.3\/32 -d 172.17.0.3\/32 -p tcp -m tcp --dport 8291 -j MASQUERADE -A DOCKER ! -i docker0 -p tcp -m tcp --dport 8291 -j DNAT --to-destination 172.17.0.3:8291 <\/code><\/pre>\n<p>  \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0432 VPS: <\/p>\n<pre><code class=\"bash\">iptables-restore &lt; iptables.lst<\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0431\u0440\u043e\u0441\u044b \u043f\u043e\u0440\u0442\u043e\u0432 \u0434\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 docker \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0430\u0448\u0438\u043d\u044b, \u043f\u0440\u0438 docker update, \u043b\u0438\u0431\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0445 \u0441\u0430\u043c\u043e\u043c\u0443 \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u0440\u0432\u043e\u043b\u043b iptables \u2014 \u0432\u0441\u0435 \u0434\u0435\u043b\u043e \u0432\u043e \u0432\u043a\u0443\u0441\u0435. <\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e RouterOS, \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0438\u043b \u043f\u043e\u0440\u0442\u044b \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0432\u043d\u0443\u0442\u0440\u044c docker RouterOS, \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. <\/p>\n<p>  \u0417\u0430\u043c\u0435\u0440\u043e\u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443, \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u0435\u043d\u044f \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0432\u0441\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442. \u0415\u0441\u043b\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f, \u0432\u043e\u0437\u044c\u043c\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 VPS \u0441 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u0438 \u041e\u0417\u0423. <\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u043a\u043e\u043c\u0443-\u043b\u0438\u0431\u043e \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 docker, \u0430 \u044f \u043a \u043d\u0435\u0439 \u0441\u043c\u043e\u0433\u0443 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0438 \u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0438\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438.<\/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=\"https:\/\/habr.com\/ru\/post\/490592\/\"> https:\/\/habr.com\/ru\/post\/490592\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/490592\/\">\u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438!<\/p>\n<p>  \u041e\u0441\u0442\u0430\u0432\u043b\u044e \u0442\u0443\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0430 \u043d\u0430 VPS \u0437\u0430 5 \u0435\u0432\u0440\u043e, \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0441 \u0446\u0435\u043b\u044c\u044e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435.<\/p>\n<p>  \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u044f \u0430\u0440\u0435\u043d\u0434\u043e\u0432\u0430\u043b \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u0434 20+ \u0441\u0430\u0439\u0442\u043e\u0432, \u0444\u0430\u0439\u043b\u043e\u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a, \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u044b\u0445 \u043d\u0430 PostgreSQL \u0434\u043b\u044f 1\u0421, \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 IMAP. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b ISPmanager \u0441 \u00ab\u0432\u0435\u0447\u043d\u043e\u0439\u00bb \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u041e\u0421 \u0431\u044b\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e CentOS 7 (\u0438\u043b\u0438 \u0434\u0430\u0436\u0435 6), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0432\u0430\u0436\u0430\u044e, \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f Debian\/Ubuntu. \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0443\u0445\u043e\u0434\u0438\u043b\u0438 \u0432 \u0441\u043e\u0446\u0441\u0435\u0442\u0438, \u0441\u0430\u0439\u0442\u044b \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u0430\u043b\u0438 \u0431\u044b\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c\u0438, \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u043b\u0438\u0441\u044c. <\/p>\n<p>  \u0412 2019 \u0433\u043e\u0434\u0443 \u044f \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f \u043c\u043e\u0439 \u0441\u0430\u0439\u0442 \u0438 \u0434\u0432\u0430 \u0441\u0430\u0439\u0442\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u0432 IMAP \u0441 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u0438\u0441\u0435\u043c \u043d\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443 \u043c\u0435\u043d\u044f, \u0444\u0430\u0439\u043b\u043e\u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u0438 \u0442\u0430\u043a \u0436\u0435 \u0443\u0448\u043b\u0438 \u0432 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/w5\/4h\/xb\/w54hxbcxo5185n2npfiok-dugg4.png\"><\/p>\n<p>  \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u043e\u0434\u0438\u043d \u0441\u0430\u0439\u0442 \u043d\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 PHP \u0432\u044b\u0448\u0435 5.4  <\/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-299513","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299513","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=299513"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299513\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=299513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=299513"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=299513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}