{"id":1104,"date":"2020-01-29T14:43:32","date_gmt":"2020-01-29T10:43:32","guid":{"rendered":"http:\/\/blog.5flor.ru\/?p=1104"},"modified":"2020-01-30T10:18:54","modified_gmt":"2020-01-30T07:18:54","slug":"nginx-centos-7","status":"publish","type":"post","link":"https:\/\/blog.5flor.ru\/?p=1104","title":{"rendered":"Nginx Centos 7"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 nginx \u043d\u0430 CentOS 7<\/h2>\n\n\n\n<p>\u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0430\u043c\u043e\u0439 \u0441\u0432\u0435\u0436\u0435\u0439 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 nginx \u043d\u0430 centos \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0440\u043e\u0434\u043d\u043e\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#&nbsp;rpm -Uvh http:\/\/nginx.org\/packages\/centos\/7\/noarch\/RPMS\/nginx-release-centos-7-0.el7.ngx.noarch.rpm<\/pre>\n\n\n\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0441\u0441\u044b\u043b\u043a\u0430 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u0438\u043b\u0438 \u0443\u0441\u0442\u0430\u0440\u0435\u0435\u0442, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f nginx \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0440\u0438\u0441\u0443\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433&nbsp;<em>\/etc\/yum.repos.d\/nginx.repo.<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[nginx]\nname=nginx repo\nbaseurl=http:\/\/nginx.org\/packages\/centos\/7\/$basearch\/\ngpgcheck=0\nenabled=1<\/pre>\n\n\n\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c nginx \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># yum install nginx<\/pre>\n\n\n\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c nginx \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\n\n\n<pre class=\"wp-block-preformatted\"># systemctl start nginx\n# systemctl enable nginx<\/pre>\n\n\n\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f \u043b\u0438 web \u0441\u0435\u0440\u0432\u0435\u0440. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0434\u0435\u043c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435&nbsp;<em>http:\/\/95.169.190.64\/<\/em>. \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0443.(welcome to nginx)<\/p>\n\n\n\n<p>\u0415\u0441\u043b\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043d\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0442\u043e \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u044b \u043d\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 firewall.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 nginx<\/h2>\n\n\n\n<p>\u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c nginx \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0445\u043e\u0441\u0442 \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 \u0441\u0430\u0439\u0442\u0430 \u0438 \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f phpmyadmin.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># mkdir -p \/web\/sites\/hl.zeroxzed.ru\/www &amp;&amp; mkdir \/web\/sites\/hl.zeroxzed.ru\/log\n# mkdir -p \/web\/sites\/p1m2a.zeroxzed.ru\/www &amp;&amp; mkdir \/web\/sites\/p1m2a.zeroxzed.ru\/log<\/pre>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0438 nginx \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432. \u042f \u0441\u0440\u0430\u0437\u0443 \u0431\u0443\u0434\u0443 \u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0445 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c https, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043f\u043e\u0437\u0436\u0435. \u0422\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u0435 \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u2014 \u0431\u0443\u0434\u0443\u0442 \u043e\u0448\u0438\u0431\u043a\u0438. \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0445\u043e\u0441\u0442 \u0441\u0430\u0439\u0442\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435&nbsp;<strong>wordpress<\/strong>. \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0441\u043e\u0431\u0440\u0430\u043d\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0434\u043b\u044f \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 nginx.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># mcedit \/etc\/nginx\/conf.d\/wordpress.ru.conf<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">server {\n    listen 80;\n    server_name wordpress.ru;\n    root \/web\/sites\/wordpress.ru\/www\/;\n    index index.php index.html index.htm;\n    access_log \/web\/sites\/wordpress.ru\/log\/access.log main;\n    error_log \/web\/sites\/wordpress.ru\/log\/error.log;\n\n    location \/ {\n    return 301 https:\/\/wordpress.ru$request_uri;\n    }\n\n    location ~* ^.+.(js|css|png|jpg|jpeg|gif|ico|woff)$ {\n    return 301 https:\/\/wordpress.ru$request_uri;\n    }\n\n    location ~ \\.php$ {\n    return 301 https:\/\/wordpress.ru$request_uri;\n    }\n\n    location = \/favicon.ico {\n    log_not_found off;\n    access_log off;\n    }\n\n    location = \/robots.txt {\n    rewrite ^ \/robots.txt break;\n    allow all;\n    log_not_found off;\n    access_log off;\n    }\n\n    location ~ \/\\.ht {\n    deny all;\n    }\n}\n\nserver {\n     listen  80;\n     server_name  www.wordpress.ru;\n     rewrite ^ https:\/\/wordpress.ru$request_uri? permanent;\n}\n\nserver {\n    listen 443 ssl http2;\n    server_name wordpress.ru;\n    root \/web\/sites\/wordpress.ru\/www\/;\n    index index.php index.html index.htm;\n    access_log \/var\/log\/nginx\/wordpress.ru-ssl-access.log main;\n    error_log  \/var\/log\/nginx\/wordpress.ru-ssl-error.log;\n\n    keepalive_timeout 60;\n    ssl_certificate \/etc\/letsencrypt\/live\/wordpress.ru\/fullchain.pem;\n    ssl_certificate_key \/etc\/letsencrypt\/live\/wordpress.ru\/privkey.pem;\n    ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;\n    ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';\n    ssl_dhparam  \/etc\/ssl\/certs\/dhparam.pem;\n    add_header Strict-Transport-Security 'max-age=604800';\n\n    location \/ {\n    try_files $uri $uri\/ \/index.php?$args;\n    }\n\n    location ~* ^.+.(js|css|png|jpg|jpeg|gif|ico|woff)$ {\n    access_log off;\n    expires max;\n    }\n\n    location ~ \\.php$ {\n    try_files  $uri =404;\n    fastcgi_pass   unix:\/var\/run\/php-fpm\/php-fpm.sock;\n    #fastcgi_pass    127.0.0.1:9000;\n    fastcgi_index index.php;\n    fastcgi_param DOCUMENT_ROOT \/web\/sites\/wordpress.ru\/www\/;\n    fastcgi_param SCRIPT_FILENAME \/web\/sites\/wordpress.ru\/www$fastcgi_script_name;\n    fastcgi_param PATH_TRANSLATED \/web\/sites\/wordpress.ru\/www$fastcgi_script_name;\n    include fastcgi_params;\n    fastcgi_param QUERY_STRING $query_string;\n    fastcgi_param REQUEST_METHOD $request_method;\n    fastcgi_param CONTENT_TYPE $content_type;\n    fastcgi_param CONTENT_LENGTH $content_length;\n    fastcgi_param HTTPS on;\n    fastcgi_intercept_errors on;\n    fastcgi_ignore_client_abort off;\n    fastcgi_connect_timeout 60;\n    fastcgi_send_timeout 180;\n    fastcgi_read_timeout 180;\n    fastcgi_buffer_size 128k;\n    fastcgi_buffers 4 256k;\n    fastcgi_busy_buffers_size 256k;\n    fastcgi_temp_file_write_size 256k;\n    }\n\n    location = \/favicon.ico {\n    log_not_found off;\n    access_log off;\n    }\n\n    location = \/robots.txt {\n    allow all;\n    log_not_found off;\n    access_log off;\n    }\n\n    location ~ \/\\.ht {\n    deny all;\n    }\n}\n\nserver {\n     listen  443 ssl http2;\n     server_name  www.wordpress.ru;\n     rewrite ^ https:\/\/wordpress.ru$request_uri? permanent;\n}\n<\/pre>\n\n\n\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u044b, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u0444\u0430\u0439\u043b\u0430 robots.txt. \u041e\u043d \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u043e http \u0438 https. \u042d\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u044f\u043d\u0434\u0435\u043a\u0441\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0441 http \u043d\u0430 https \u0438 \u0441\u043a\u043b\u0435\u0439\u043a\u0438 \u0437\u0435\u0440\u043a\u0430\u043b.<\/p>\n\n\n\n<p>\u0414\u043b\u044f phpmyadmin \u0440\u0438\u0441\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u043f\u043e\u043f\u0440\u043e\u0449\u0435.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># mcedit \/etc\/nginx\/conf.d\/p1m2a.zeroxzed.ru.conf<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">server {\n    listen 443 ssl http2;\n    server_name p1m2a.zeroxzed.ru;\n    root \/web\/sites\/p1m2a.zeroxzed.ru\/www\/;\n    index index.php index.html index.htm;\n    access_log \/web\/sites\/p1m2a.zeroxzed.ru\/log\/ssl-access.log main;\n    error_log \/web\/sites\/p1m2a.zeroxzed.ru\/log\/ssl-error.log;\n\n    keepalive_timeout\t\t60;\n    ssl_certificate\t\t\/etc\/letsencrypt\/live\/p1m2a.zeroxzed.ru\/fullchain.pem;\n    ssl_certificate_key\t\t\/etc\/letsencrypt\/live\/p1m2a.zeroxzed.ru\/privkey.pem;\n    ssl_protocols \t\tTLSv1 TLSv1.1 TLSv1.2;\n    ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';\n    ssl_dhparam \t\t\/etc\/ssl\/certs\/dhparam.pem;\n    add_header\t\t\tStrict-Transport-Security 'max-age=604800';\n\n    location ~ \\.php$ {\n    fastcgi_pass   unix:\/var\/run\/php-fpm\/php-fpm.sock;\n    #fastcgi_pass    127.0.0.1:9000;\n    fastcgi_index index.php;\n    fastcgi_param DOCUMENT_ROOT \/web\/sites\/p1m2a.zeroxzed.ru\/www\/;\n    fastcgi_param SCRIPT_FILENAME \/web\/sites\/p1m2a.zeroxzed.ru\/www$fastcgi_script_name;\n    fastcgi_param PATH_TRANSLATED \/web\/sites\/p1m2a.zeroxzed.ru\/www$fastcgi_script_name;\n    include fastcgi_params;\n    fastcgi_param QUERY_STRING $query_string;\n    fastcgi_param REQUEST_METHOD $request_method;\n    fastcgi_param CONTENT_TYPE $content_type;\n    fastcgi_param CONTENT_LENGTH $content_length;\n    fastcgi_intercept_errors on;\n    fastcgi_ignore_client_abort off;\n    fastcgi_connect_timeout 60;\n    fastcgi_send_timeout 180;\n    fastcgi_read_timeout 180;\n    fastcgi_buffer_size 128k;\n    fastcgi_buffers 4 256k;\n    fastcgi_busy_buffers_size 256k;\n    fastcgi_temp_file_write_size 256k;\n    }\n}\n\nserver {\n     listen  443 ssl http2;\n     server_name  www.p1m2a.zeroxzed.ru;\n     rewrite ^ https:\/\/p1m2a.zeroxzed.ru$request_uri? permanent;\n}\n\nserver {\n    listen 80;\n    server_name p1m2a.zeroxzed.ru;\n    root \/web\/sites\/p1m2a.zeroxzed.ru\/www\/;\n    index index.php index.html index.htm;\n    access_log \/web\/sites\/p1m2a.zeroxzed.ru\/log\/access.log main;\n    error_log \/web\/sites\/p1m2a.zeroxzed.ru\/log\/error.log;\n\n    location \/ {\n    return 301 https:\/\/p1m2a.zeroxzed.ru$request_uri;\n    try_files $uri $uri\/ \/index.php?$args;\n    }\n}\n<\/pre>\n\n\n\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 nginx \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e&nbsp;<a href=\"https:\/\/serveradmin.ru\/ustanovka-i-nastrojka-nginx\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 Nginx<\/a>&nbsp;\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u043c\u0443.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 php-fpm 7.1<\/h2>\n\n\n\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 7-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 php \u043d\u0430 centos \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430. \u0420\u0430\u043d\u0435\u0435 \u044f \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b&nbsp;\u043a\u0430\u043a&nbsp;<a href=\"https:\/\/serveradmin.ru\/ustanovka-i-obnovlenie-php-7-na-centos-7\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c php \u0434\u043e 7-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438<\/a>, \u043d\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u043e\u0442\u043a\u0430\u0442\u0438\u043b\u0441\u044f \u043d\u0430\u0437\u0430\u0434. \u041f\u0440\u043e\u0448\u043b\u043e \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0443\u0436\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b.<\/p>\n\n\n\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445 \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0430\u0440\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 php, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u043d\u0438 \u0447\u0430\u0441\u0442\u043e \u0435\u0441\u0442\u044c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u0445 \u043a \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0430\u043a\u0435\u0442\u0430\u043c. \u0412 \u0438\u0442\u043e\u0433\u0435, \u043e\u0431\u043d\u043e\u0432\u0438\u0432\u0448\u0438\u0441\u044c \u043d\u0435\u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0434\u043e 7.1 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, phpmyadmin \u0438\u043b\u0438 zabbix. \u0412 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043a \u043c\u043e\u0438\u043c \u0441\u0442\u0430\u0442\u044c\u044f\u043c \u044f \u0438\u043d\u043e\u0433\u0434\u0430 \u0432\u0438\u0436\u0443 \u044d\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443 \u043e\u0448\u0438\u0431\u043e\u043a \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u0447\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438.<\/p>\n\n\n\n<p>\u0412\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 php7. \u0418\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043c\u043e\u0439 \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u0432 \u0441\u0432\u043e\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e&nbsp;<a href=\"https:\/\/sevo44.ru\/php-7-ustanovka-v-centos-7\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 web \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/a>&nbsp;\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439&nbsp;Webtatic. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c php 7-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u044d\u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c phpmyadmin \u0447\u0435\u0440\u0435\u0437 yum \u0443\u0436\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f. \u0411\u0443\u0434\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u0430\u043a-\u0442\u043e \u0440\u0443\u043a\u0430\u043c\u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c.<\/p>\n\n\n\n<p>\u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, zabbix \u0431\u0435\u0437 \u043f\u043b\u044f\u0441\u043e\u043a \u0441 \u0431\u0443\u0431\u043d\u0430\u043c\u0438 \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0435 \u0432\u0441\u0442\u0430\u043d\u0435\u0442. \u0412 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445 \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u0418\u043d\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0442\u0441\u044f. \u0418 \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0435\u0442 \u0434\u043b\u044f \u0432\u0430\u0441 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u043d\u0430 \u0431\u043e\u0435\u0432\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0422\u0430\u043a \u0447\u0442\u043e \u043a \u0432\u044b\u0431\u043e\u0440\u0443 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0438 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u042f \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0438\u043d\u043e\u0433\u0434\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 centos 5 \u0441 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u043c centos.alt.ru, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043a\u0440\u044b\u043b\u0441\u044f. \u0421\u0435\u0439\u0447\u0430\u0441 \u044d\u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u0442\u0430\u043a \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0430\u043a\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043c\u0430\u043b\u043e, \u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0437\u0430\u0434 \u043c\u043d\u0435 \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0435 \u043d\u0435\u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430.<\/p>\n\n\n\n<p>\u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0432\u0435\u0436\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 php \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439&nbsp;<strong>Remi<\/strong>. \u042d\u0442\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0435\u0434\u0435\u0442 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a RedHat. \u0418 \u0445\u043e\u0442\u044f \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0435\u0434\u0435\u0442 \u043e\u0434\u0438\u043d \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043d\u0435 \u0442\u0430\u043a \u0432\u044b\u0441\u043e\u043a\u0430, \u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043b\u0443\u0447\u0448\u0435 \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u0435\u0435 remi \u043b\u0438\u0447\u043d\u043e \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u0446\u0435\u043b\u0435\u0439. \u0415\u0441\u043b\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u044d\u0442\u043e\u0442 \u0441\u0447\u0435\u0442 \u2014 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0432 \u0432\u0430\u0448\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438. \u0411\u0443\u0434\u0443 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0435\u043d \u0437\u0430 \u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043e\u0432\u0435\u0442.<\/p>\n\n\n\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c remi \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0434\u043b\u044f centos 7.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># rpm -Uhv http:\/\/rpms.remirepo.net\/enterprise\/remi-release-7.rpm<\/pre>\n\n\n\n<p>\u042f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u043e\u0448\u0438\u0431\u043a\u0443:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Retrieving http:\/\/rpms.remirepo.net\/enterprise\/remi-release-7.rpm\nwarning: \/var\/tmp\/rpm-tmp.nwcDV1: Header V4 DSA\/SHA1 Signature, key ID 00f97f56: NOKEY\nerror: Failed dependencies: \n       epel-release = 7 is needed by remi-release-7.3-2.el7.remi.noarch<\/pre>\n\n\n\n<p>\u0422\u0443\u0442 \u0432\u0441\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043d\u0443\u0436\u0435\u043d \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 epel. \u0422\u0435, \u043a\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e \u043c\u043e\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0435\u0433\u043e \u0443\u0436\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438, \u0430 \u0442\u0435 \u043a\u0442\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u043b\u0438 \u044d\u0442\u043e\u0433\u043e, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0441\u0435\u0439\u0447\u0430\u0441:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># yum install epel-release<\/pre>\n\n\n\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 remi, \u0432\u0441\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0440\u043e\u0439\u0442\u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#&nbsp;yum repolist<\/pre>\n\n\n\n<p>\u0423 \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c.<\/p>\n\n\n\n<p>\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u043f\u0443&nbsp;<strong>remi-php72<\/strong>, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#&nbsp;yum-config-manager --enable remi-php72<\/pre>\n\n\n\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0443:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bash: yum-config-manager: command not found<\/pre>\n\n\n\n<p>\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0430\u043a\u0435\u0442&nbsp;<strong>yum-utils<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#&nbsp;yum install yum-utils<\/pre>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c&nbsp;<strong>php7.2<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># yum install php72<\/pre>\n\n\n\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c&nbsp;<strong>php-fpm<\/strong>&nbsp;\u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># yum install php-fpm php-cli php-mysql php-gd php-ldap php-odbc php-pdo php-pecl-memcache php-opcache php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap php-zip<\/pre>\n\n\n\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c php-fpm \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\n\n\n<pre class=\"wp-block-preformatted\"># systemctl start php-fpm\n# systemctl enable php-fpm<\/pre>\n\n\n\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f \u043b\u0438 \u043e\u043d.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># netstat -tulpn | grep php-fpm\ntcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 9084\/php-fpm: maste<\/pre>\n\n\n\n<p>\u0412\u0441\u0435 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u043f\u043e\u0432\u0438\u0441 \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 9000. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 unix \u0441\u043e\u043a\u0435\u0442. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433&nbsp;<em>\/etc\/php-fpm.d\/www.conf<\/em>&nbsp;\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">;listen = 127.0.0.1:9000<\/pre>\n\n\n\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0440\u0443\u0433\u0438\u0445:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">listen = \/var\/run\/php-fpm\/php-fpm.sock\nlisten.mode = 0660\nlisten.owner = nginx\nlisten.group = nginx<\/pre>\n\n\n\n<p>\u0417\u0430\u043e\u0434\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c php-fpm. \u0412\u043c\u0435\u0441\u0442\u043e apache \u0443\u043a\u0430\u0436\u0438\u0442\u0435 nginx.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">user = nginx\ngroup = nginx<\/pre>\n\n\n\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c php-fpm.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># systemctl restart php-fpm<\/pre>\n\n\n\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u043b \u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0441\u043e\u043a\u0435\u0442.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># ll \/var\/run\/php-fpm\/php-fpm.sock \nsrw-rw----. 1 nginx nginx 0 Oct 26 18:08 \/var\/run\/php-fpm\/php-fpm.sock<\/pre>\n\n\n\n<p>\u041d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 php-fpm \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438, \u0434\u0432\u0438\u0433\u0430\u0435\u043c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n\n\n\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c ssl \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b. \u0411\u0435\u0437 \u043d\u0438\u0445 nginx \u0441 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u043c \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f. \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u0442\u043e.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0433\u043e ssl \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 Lets Encrypt<\/h2>\n\n\n\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u043a\u0435\u0442&nbsp;<strong>certbot<\/strong>&nbsp;\u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0433\u043e ssl \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u043e\u0442 let\u2019s encrypt.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># yum install certbot<\/pre>\n\n\n\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># certbot certonly<\/pre>\n\n\n\n<p>\u0412\u0430\u043c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0434\u0430\u043d\u044b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432. \u0412\u043e\u0442 \u043c\u043e\u0438 \u043e\u0442\u0432\u0435\u0442\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430. \u041f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u0430\u043c\u043e\u0433\u043e certbot, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0448 \u0435\u0449\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0414\u0430\u043b\u0435\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u0431\u0443\u0434\u0435\u043c \u0432 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0432 \u043a\u043e\u0440\u043d\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># certbot certonly\nSaving debug log to \/var\/log\/letsencrypt\/letsencrypt.log\n\nHow would you like to authenticate with the ACME CA?\n-------------------------------------------------------------------------------\n1: Spin up a temporary webserver (standalone)\n2: Place files in webroot directory (webroot)\n-------------------------------------------------------------------------------\nSelect the appropriate number [1-2] then [enter] (press 'c' to cancel): 1\nPlugins selected: Authenticator standalone, Installer None\nEnter email address (used for urgent renewal and security notices) (Enter 'c' to\ncancel): zeroxzed@gmail.com\nStarting new HTTPS connection (1): acme-v01.api.letsencrypt.org\n\n-------------------------------------------------------------------------------\nPlease read the Terms of Service at\nhttps:\/\/letsencrypt.org\/documents\/LE-SA-v1.1.1-August-1-2016.pdf. You must agree\nin order to register with the ACME server at\nhttps:\/\/acme-v01.api.letsencrypt.org\/directory\n-------------------------------------------------------------------------------\n(A)gree\/(C)ancel: A\n\n-------------------------------------------------------------------------------\nWould you be willing to share your email address with the Electronic Frontier\nFoundation, a founding partner of the Let's Encrypt project and the non-profit\norganization that develops Certbot? We'd like to send you email about EFF and\nour work to encrypt the web, protect its users and defend digital rights.\n-------------------------------------------------------------------------------\n(Y)es\/(N)o: N\nPlease enter in your domain name(s) (comma and\/or space separated)  (Enter 'c'\nto cancel): hl.zeroxzed.ru\nObtaining a new certificate\nPerforming the following challenges:\ntls-sni-01 challenge for hl.zeroxzed.ru\nWaiting for verification...\nCleaning up challenges\n\nIMPORTANT NOTES:\n - Congratulations! Your certificate and chain have been saved at:\n   \/etc\/letsencrypt\/live\/hl.zeroxzed.ru\/fullchain.pem\n   Your key file has been saved at:\n   \/etc\/letsencrypt\/live\/hl.zeroxzed.ru\/privkey.pem\n   Your cert will expire on 2018-01-24. To obtain a new or tweaked\n   version of this certificate in the future, simply run certbot\n   again. To non-interactively renew *all* of your certificates, run\n   \"certbot renew\"\n - Your account credentials have been saved in your Certbot\n   configuration directory at \/etc\/letsencrypt. You should make a\n   secure backup of this folder now. This configuration directory will\n   also contain certificates and private keys obtained by Certbot so\n   making regular backups of this folder is ideal.\n - If you like Certbot, please consider supporting our work by:\n\n   Donating to ISRG \/ Let's Encrypt:   https:\/\/letsencrypt.org\/donate\n   Donating to EFF:                    https:\/\/eff.org\/donate-le\n<\/pre>\n\n\n\n<p>\u0414\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 ssl \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u043e\u0442 lets encrypt \u0443 \u0432\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u044b DNS \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u043e\u0432, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b.<\/p>\n\n\n\n<p>\u0418\u0442\u0430\u043a, \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e nginx \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># nginx -t<\/pre>\n\n\n\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0443:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nginx: [emerg] BIO_new_file(\"\/etc\/ssl\/certs\/dhparam.pem\") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('\/etc\/ssl\/certs\/dhparam.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)\nnginx: configuration file \/etc\/nginx\/nginx.conf test failed<\/pre>\n\n\n\n<p>\u0422\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043a\u043b\u044e\u0447:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># openssl dhparam -out \/etc\/ssl\/certs\/dhparam.pem 4096<\/pre>\n\n\n\n<p>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0434\u043b\u0438\u0442\u044c\u0441\u044f \u0434\u043e\u043b\u0433\u043e (\u0443 \u043c\u0435\u043d\u044f 20 \u043c\u0438\u043d\u0443\u0442 \u0434\u043b\u0438\u043b\u043e\u0441\u044c \u043d\u0430 \u0434\u0432\u0443\u0445 \u044f\u0434\u0440\u0430\u0445). \u0421\u043d\u043e\u0432\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e. \u0415\u0441\u043b\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0435\u0442, \u0442\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c nginx.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># systemctl restart nginx<\/pre>\n\n\n\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 nginx \u043d\u0430 \u044d\u0442\u043e\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430. \u041e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u0441\u044f \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0440\u0435\u0436\u0438\u043c\u0435.<\/p>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u043f\u0435\u0440\u0435\u0434 \u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u0435\u043c \u0441\u0440\u043e\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043e\u043c\u0435\u043d\u043e\u0432. \u041e\u043d\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438&nbsp;<em>\/etc\/letsencrypt\/renewal<\/em>. \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043d\u0430\u0448 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u043e\u043d\u0444\u0438\u0433&nbsp;<em>hl.zeroxzed.ru.conf<\/em>&nbsp;\u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># renew_before_expiry = 30 days\nversion = 0.18.1\narchive_dir = \/etc\/letsencrypt\/archive\/hl.zeroxzed.ru\ncert = \/etc\/letsencrypt\/live\/hl.zeroxzed.ru\/cert.pem\nprivkey = \/etc\/letsencrypt\/live\/hl.zeroxzed.ru\/privkey.pem\nchain = \/etc\/letsencrypt\/live\/hl.zeroxzed.ru\/chain.pem\nfullchain = \/etc\/letsencrypt\/live\/hl.zeroxzed.ru\/fullchain.pem\n\n# Options used in the renewal process\n<\/pre>\n\n\n\n<p>\nauthenticator = standalone\ninstaller = None\naccount = e9c86e6aa57b45f9614bc7c0015927a5<\/p>\n\n\n\n<p>\u041f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u0435\u0433\u043e \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0432\u0438\u0434\u0443:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># renew_before_expiry = 30 days\nversion = 0.18.1\narchive_dir = \/etc\/letsencrypt\/archive\/hl.zeroxzed.ru\ncert = \/etc\/letsencrypt\/live\/hl.zeroxzed.ru\/cert.pem\nprivkey = \/etc\/letsencrypt\/live\/hl.zeroxzed.ru\/privkey.pem\nchain = \/etc\/letsencrypt\/live\/hl.zeroxzed.ru\/chain.pem\nfullchain = \/etc\/letsencrypt\/live\/hl.zeroxzed.ru\/fullchain.pem\n\n# Options used in the renewal process\n<\/pre>\n\n\n\n<p>\nauthenticator = <strong>webroot<\/strong>\ninstaller = None\naccount = e9c86e6aa57b45f9614bc7c0015927a5\n<strong>post_hook = nginx -s reload<\/strong><strong>[[webroot_map]]<\/strong><strong>www.hl.zeroxzed.ru = \/web\/sites\/hl.zeroxzed.ru\/www<\/strong><strong>hl.zeroxzed.ru = \/web\/sites\/hl.zeroxzed.ru\/www<\/strong><\/p>\n\n\n\n<p>\u041f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0441 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0445\u043e\u0441\u0442\u0430\u043c\u0438, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b let\u2019s encrypt. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0434\u0435\u043b\u043e \u0437\u0430 \u043c\u0430\u043b\u044b\u043c \u2014 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u044b\u043f\u0443\u0441\u043a \u043d\u043e\u0432\u044b\u0445 ssl \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432, \u0432\u0437\u0430\u043c\u0435\u043d \u043f\u0440\u043e\u0441\u0440\u043e\u0447\u0435\u043d\u043d\u044b\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432&nbsp;<em>\/etc\/crontab<\/em>&nbsp;\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># Cert Renewal\n30 2 * * * root \/usr\/bin\/certbot renew --post-hook \"nginx -s reload\" &gt;&gt; \/var\/log\/le-renew.log<\/pre>\n\n\n\n<p>\u0412\u0441\u0435, \u0441 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c\u0438 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438. \u0414\u0432\u0438\u0433\u0430\u0435\u043c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 web \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 mariadb 10 \u043d\u0430 CentOS 7<\/h2>\n\n\n\n<p>\u0414\u043e\u0448\u043b\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f web \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 CentOS 7 \u2014&nbsp;<strong>MariaDB<\/strong>. \u041f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u043e\u0444\u0442\u043e\u043c, \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0430\u0440\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f mariadb \u2014 5.5. \u042f \u0436\u0435 \u0431\u0443\u0434\u0443 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 10.2.<\/p>\n\n\n\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 MariaDB, \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439&nbsp;<a href=\"http:\/\/downloads.mariadb.org\/mariadb\/repositories\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435\u0439<\/a>&nbsp;\u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f.<\/p>\n\n\n\n<p>\u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u043d\u0444\u0438\u0433 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># cat \/etc\/yum.repos.d\/mariadb.repo<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">[mariadb]\nname = MariaDB\nbaseurl = http:\/\/yum.mariadb.org\/10.2\/centos7-amd64\ngpgkey=https:\/\/yum.mariadb.org\/RPM-GPG-KEY-MariaDB\ngpgcheck=1<\/pre>\n\n\n\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e mariadb \u043d\u0430 centos.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#&nbsp;yum install MariaDB-server MariaDB-client<\/pre>\n\n\n\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0438\u0437 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f.<\/p>\n\n\n\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c mariadb \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\n\n\n<pre class=\"wp-block-preformatted\"># systemctl start mariadb\n# systemctl enable mariadb<\/pre>\n\n\n\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 mysql \u0438 \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f root. \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#&nbsp;\/usr\/bin\/mysql_secure_installation<\/pre>\n\n\n\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 mysql \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e web \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0433\u043e\u0442\u043e\u0432. \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f mysql \u2014 phpmyadmin.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 phpmyadmin<\/h2>\n\n\n\n<p><ins><\/ins><\/p>\n\n\n\n<p>\u041a\u0440\u0430\u0442\u043a\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u0440\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 phpmyadmin \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043d\u0435 \u0431\u0443\u0434\u0443 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u0442\u0430\u0442\u044c\u044f \u0438 \u0442\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043e\u0431\u044a\u0435\u043c\u043d\u0430\u044f, \u0430 \u044f \u0435\u0449\u0435 \u043d\u0435 \u0432\u0441\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b. \u0412\u043e\u043f\u0440\u043e\u0441&nbsp;<a href=\"https:\/\/serveradmin.ru\/ustanovit-i-nastroit-phpmyadmin-na-centos-7\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 phpmyadmin<\/a>&nbsp;\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e. \u0417\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0442\u0443\u0434\u0430.<\/p>\n\n\n\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c phpmyadmin \u0447\u0435\u0440\u0435\u0437 yum. \u0415\u0441\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0442\u043e \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432 \u0441 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438 \u0431\u044b\u0442\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># yum install phpmyadmin<\/pre>\n\n\n\n<p>Phpmyadmin \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 httpd. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0435\u0435, \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u0438\u0437 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438 \u043f\u0430\u043d\u0435\u043b\u0438 \u0432 \u043d\u0430\u0448 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0445\u043e\u0441\u0442.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># rm -df \/web\/sites\/p1m2a.zeroxzed.ru\/www\n# ln -s \/usr\/share\/phpMyAdmin \/web\/sites\/p1m2a.zeroxzed.ru\/www<\/pre>\n\n\n\n<p>\u0412\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441 php \u0441\u0435\u0441\u0441\u0438\u044f\u043c\u0438. \u0411\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c phpmyadmin \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># chown nginx:nginx \/var\/lib\/php\/session\/<\/pre>\n\n\n\n<p>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 phpmyadmin. \u0415\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u0430.<\/p>\n\n\n\n<p><strong>SELinux<\/strong><\/p>\n\n\n\n<p>\u0422\u0430\u043a \u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c SELinux \u0442.\u043a. \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u043b\u043e\u0433\u043e\u0432 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \/var\/www\/nginx \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0430.<\/p>\n\n\n\n<p>\u0421\u0443\u0442\u044c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0434\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 selinux \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0435\u0441\u043b\u0438 \u0432\u044b \u0441 \u043d\u0438\u043c\u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u044b. \u041c\u0435\u0442\u043e\u0434\u043e\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0430\u0432\u0438\u043b selinux.<\/p>\n\n\n\n<p>\u042f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438. \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0432\u0448\u0438\u0445 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a selinux \u0434\u043b\u044f nginx.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># grep nginx \/var\/log\/audit\/audit.log | audit2why<\/pre>\n\n\n\n<p>\u041c\u043e\u0436\u0435\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u0443\u0442\u044c \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a. \u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043d\u043e \u0432 \u0446\u0435\u043b\u043e\u043c \u0432\u0441\u0435 \u0433\u0443\u0433\u043b\u0438\u0442\u0441\u044f. \u041c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u043f\u0438\u0441\u0430\u043d \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435&nbsp;<a href=\"https:\/\/www.nginx.com\/blog\/using-nginx-plus-with-selinux\/\" target=\"_blank\" rel=\"noreferrer noopener\">nginx.com<\/a>.<\/p>\n\n\n\n<p>\u0421\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u043b\u044f selinux.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># grep nginx \/var\/log\/audit\/audit.log | audit2allow -m nginx &gt; ~\/nginx.te<\/pre>\n\n\n\n<p>\u042d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0442\u043e\u043c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u0441\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0432 \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b, \u0433\u043e\u0442\u043e\u0432\u043b\u044e \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f selinux.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># checkmodule -M -m -o nginx.mod nginx.te\n# semodule_package -m nginx.mod -o nginx.pp<\/pre>\n\n\n\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e \u044d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u0432 selinx.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># semodule -i nginx.pp<\/pre>\n\n\n\n<p>\u041c\u043e\u0436\u043d\u043e \u043d\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0441\u0430\u043c\u043e\u043c\u0443, \u0430 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0433\u043e.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># grep nginx \/var\/log\/audit\/audit.log | audit2allow -M nginx\n# semodule -i nginx.pp<\/pre>\n\n\n\n<p>\u041f\u043e\u0442\u043e\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u0432\u0441\u0435 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0434\u043b\u044f php-fpm \u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 web \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0447\u0442\u043e-\u0442\u043e \u0435\u0449\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043e\u043f\u044f\u0442\u044c \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 audit.log \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0439\u0442\u0435 \u043c\u043e\u0434\u0443\u043b\u044c. \u0422\u0430\u043a, \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u043b\u044f selinux.<\/p>\n\n\n\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044c \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d, \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># semodule -l | grep nginx<\/pre>\n\n\n\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c, \u043f\u043e selinux \u0432\u0441\u0435. \u041c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043b\u0438 \u0432\u0441\u0435, \u0447\u0442\u043e \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u043e\u0441\u0438\u043b. \u041f\u043e \u0438\u0434\u0435\u0435, \u043d\u0430\u0434\u043e \u0432\u0434\u0443\u043c\u0447\u0438\u0432\u043e \u0432\u043e \u0432\u0441\u0435\u0445 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u0445 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e, \u0447\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0448\u044c \u043d\u0443\u0436\u043d\u044b\u043c. \u042f \u0447\u0435\u0441\u0442\u043d\u043e \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e selinux \u0437\u043d\u0430\u044e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e. \u0414\u0430\u043b\u044c\u0448\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e audit2allow \u044f \u043d\u0435 \u0434\u0432\u0438\u0433\u0430\u043b\u0441\u044f. \u0420\u0443\u043a\u0430\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0438\u0441\u0430\u043b. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 selinux \u043d\u0430 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n\n\n\n<p>\u0425\u043e\u0440\u043e\u0448\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e \u0440\u0443\u0447\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 selinux \u0434\u043b\u044f web \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u2014&nbsp;<a href=\"https:\/\/habr.com\/ru\/post\/322904\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/habr.com\/ru\/post\/322904\/<\/a>. \u0422\u0430\u043c \u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0430\u0432\u0442\u043e\u0440\u0430 \u043d\u0430 \u0442\u0435\u043c\u0443 selinux. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0435\u0439.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0420\u043e\u0442\u0430\u0446\u0438\u044f \u043b\u043e\u0433\u043e\u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432<\/h2>\n\n\n\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0448\u0442\u0440\u0438\u0445 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 web \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u2014 \u0440\u043e\u0442\u0430\u0446\u0438\u044f \u043b\u043e\u0433\u043e\u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0442\u043e \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e, \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435, \u0432\u0440\u0435\u043c\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u043b\u043e\u0433 \u0444\u0430\u0439\u043b\u0430.<\/p>\n\n\n\n<p>\u0423 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438&nbsp;<strong>logrotate<\/strong>&nbsp;\u0434\u043b\u044f nginx, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u2014&nbsp;<em>\/etc\/logrotate.d\/nginx<\/em>. \u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u0435\u0433\u043e \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0432\u0438\u0434\u0443:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/var\/log\/nginx\/*log\n\/web\/sites\/p1m2a.zeroxzed.ru\/log\/*log {\n\n    create 0644 nginx nginx\n    size=1M\n    rotate 10\n    missingok\n    notifempty\n    compress\n    sharedscripts\n    postrotate\n        \/bin\/kill -USR1 `cat \/run\/nginx.pid 2&gt;\/dev\/null` 2&gt;\/dev\/null || true\n    endscript\n}\n\n\/web\/sites\/hl.zeroxzed.ru\/log\/*log {\n\n    create 0644 hl.zeroxzed.ru hl.zeroxzed.ru\n    size=1M\n    rotate 10\n    missingok\n    notifempty\n    compress\n    sharedscripts\n    postrotate\n        \/bin\/kill -USR1 `cat \/run\/nginx.pid 2&gt;\/dev\/null` 2&gt;\/dev\/null || true\n    endscript\n}\n<\/pre>\n\n\n\n<p>\u042f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0440\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u043b\u043e\u0433\u043e\u0432 \u043f\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044e \u0438\u043c\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432 1\u041c\u0431, \u0441\u0436\u0438\u043c\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0440\u043e\u0442\u0430\u0446\u0438\u0438 \u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u044c 10 \u0430\u0440\u0445\u0438\u0432\u043e\u0432 \u0441 \u043b\u043e\u0433\u043e\u043c. \u0414\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u043e\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043d\u043e\u0432\u044b\u0435 \u043b\u043e\u0433\u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u043f\u0440\u0430\u0432\u0430\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0431\u044b\u043b \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043d\u0438\u043c. \u0414\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0435 \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u0442\u0443\u0434\u0430 \u043d\u043e\u0432\u044b\u0435 \u043f\u0443\u0442\u0438 \u0434\u043b\u044f \u043b\u043e\u0433\u043e\u0432.<\/p>\n\n\n\n<p>\u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u0412\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e \u0441\u0432\u043e\u0435\u043c\u0443 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044e. \u041f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 logrotate \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043c\u043d\u043e\u0433\u043e.<\/p>\n\n\n\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435. \u042f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u0432\u0441\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e web \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 nginx \u0438 php-fpm \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b \u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0435\u0449\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0432\u044b\u0448\u0430\u044e\u0442 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0438 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 nginx \u043d\u0430 CentOS 7 \u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0430\u043c\u043e\u0439 \u0441\u0432\u0435\u0436\u0435\u0439 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 nginx \u043d\u0430 centos \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0440\u043e\u0434\u043d\u043e\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439. #&nbsp;rpm -Uvh http:\/\/nginx.org\/packages\/centos\/7\/noarch\/RPMS\/nginx-release-centos-7-0.el7.ngx.noarch.rpm \u0415\u0441\u043b\u0438 \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0441\u0441\u044b\u043b\u043a\u0430 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u0438\u043b\u0438 \u0443\u0441\u0442\u0430\u0440\u0435\u0435\u0442, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f nginx \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0440\u0438\u0441\u0443\u0435\u043c &hellip; <a href=\"https:\/\/blog.5flor.ru\/?p=1104\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1104","post","type-post","status-publish","format-standard","hentry","category-1"],"_links":{"self":[{"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/posts\/1104"}],"collection":[{"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1104"}],"version-history":[{"count":1,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/posts\/1104\/revisions"}],"predecessor-version":[{"id":1123,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/posts\/1104\/revisions\/1123"}],"wp:attachment":[{"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}