{"id":27669,"date":"2022-08-13T17:00:06","date_gmt":"2022-08-13T12:30:06","guid":{"rendered":"https:\/\/parspack.com\/blog\/?p=27669"},"modified":"2024-08-18T19:57:36","modified_gmt":"2024-08-18T15:27:36","slug":"how-install-nginx-on-centos","status":"publish","type":"post","link":"https:\/\/parspack.com\/blog\/os\/linux\/centos\/how-install-nginx-on-centos","title":{"rendered":"\u0622\u0645\u0648\u0632\u0634 \u0646\u0635\u0628 \u0648 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc Nginx \u0631\u0648\u06cc CentOS 7"},"content":{"rendered":"<p style=\"text-align: justify;\">\u0646\u0635\u0628 Nginx \u0631\u0648\u06cc CentOS 7 \u0628\u0647\u200c\u062f\u0644\u06cc\u0644 \u0639\u0645\u0644\u06a9\u0631\u062f \u0648 \u0633\u0647\u0648\u0644\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647\u060c \u0628\u0647\u062a\u0631\u06cc\u0646 \u0627\u0646\u062a\u062e\u0627\u0628 \u0628\u0631\u0627\u06cc \u062f\u0627\u0634\u062a\u0646 \u0633\u0631\u0648\u0631\u06cc \u0628\u0627 \u067e\u0627\u0633\u062e\u06af\u0648\u06cc\u06cc \u0633\u0631\u06cc\u0639 \u0648 \u0628\u0647\u06cc\u0646\u0647 \u0627\u0633\u062a. \u0628\u0627\u062a\u0648\u062c\u0647 \u0628\u0647 \u0627\u0647\u0645\u06cc\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0627\u06cc\u0646 \u0648\u0628\u200c\u0633\u0631\u0648\u0631\u00a0 \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0637\u0644\u0628 \u0627\u0632 <a title=\"\u0622\u0645\u0648\u0632\u0634 \u0633\u06cc\u0633\u062a\u0645 \u0639\u0627\u0645\u0644 centos\" href=\"\/blog\/os\/linux\/centos\" target=\"_blank\" rel=\"noopener\">\u0622\u0645\u0648\u0632\u0634 \u0633\u0646\u062a \u0627\u0648 \u0627\u0633<\/a>\u060c \u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Nginx \u0631\u0648\u06cc CentOS 7 \u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u06a9\u0627\u0645\u0644 \u0648 \u06af\u0627\u0645\u200c\u0628\u0647\u200c\u06af\u0627\u0645 \u0622\u0645\u0648\u0632\u0634 \u062e\u0648\u0627\u0647\u06cc\u0645 \u062f\u0627\u062f.<\/p>\n<div class=\"info-box-section\">\n<h2 class=\"title\">\u062e\u0631\u06cc\u062f \u0633\u0631\u0648\u06cc\u0633 \u0644\u06cc\u0646\u0648\u06a9\u0633\u06cc \u0628\u0627 \u0633\u06cc\u0633\u062a\u0645 CentOS \u0627\u0632 \u067e\u0627\u0631\u0633 \u067e\u06a9<\/h2>\n<p class=\"description\">\u0634\u0645\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u0627\u06cc\u0646 \u0645\u0642\u0627\u0644\u0647 \u0628\u0631\u0627\u06cc \u0645\u062f\u06cc\u0631\u06cc\u062a \u0633\u0631\u0648\u0631\u0647\u0627\u06cc \u0644\u06cc\u0646\u0648\u06a9\u0633 \u062e\u0648\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f \u0648 \u0627\u06af\u0631 \u0642\u0635\u062f \u062e\u0631\u06cc\u062f \u0647\u0631 \u06cc\u06a9 \u0627\u0632 \u0633\u0631\u0648\u06cc\u0633\u200c\u0647\u0627\u06cc \u0644\u06cc\u0646\u0648\u06a9\u0633\u06cc \u067e\u0627\u0631\u0633 \u067e\u06a9 \u0631\u0627 \u062f\u0627\u0631\u06cc\u062f\u060c \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0627 \u06a9\u0627\u0631\u0634\u0646\u0627\u0633\u0627\u0646 \u0641\u0631\u0648\u0634 \u0645\u0627 \u062f\u0631 \u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0627\u0634\u06cc\u062f. \u0647\u0645\u0686\u0646\u06cc\u0646\u060c \u0634\u0645\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0631\u0627\u06cc \u0627\u0637\u0644\u0627\u0639 \u0627\u0632 \u062a\u0639\u0631\u0641\u0647\u200c\u0647\u0627 \u0648 \u0647\u0632\u06cc\u0646\u0647\u200c\u0647\u0627 \u0628\u0647 \u0644\u06cc\u0646\u06a9\u200c\u0647\u0627\u06cc \u0632\u06cc\u0631 \u0645\u0631\u0627\u062c\u0639\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><a title=\"\u062e\u0631\u06cc\u062f \u0633\u0631\u0648\u0631 \u0645\u062c\u0627\u0632\u06cc \u0644\u06cc\u0646\u0648\u06a9\u0633\" href=\"\/vps\/linux\" target=\"_blank\" rel=\"noopener\">\u0633\u0631\u0648\u0631 \u0645\u062c\u0627\u0632\u06cc \u0644\u06cc\u0646\u0648\u06a9\u0633<\/a><\/li>\n<li><a title=\"\u062e\u0631\u06cc\u062f \u0633\u0631\u0648\u0631 \u0644\u06cc\u0646\u0648\u06a9\u0633 \" href=\"\/servers\/linux\" target=\"_blank\" rel=\"noopener\">\u0633\u0631\u0648\u0631 \u0644\u06cc\u0646\u0648\u06a9\u0633<\/a><\/li>\n<li><a title=\"\u062e\u0631\u06cc\u062f \u0633\u0631\u0648\u0631 \u0627\u062e\u062a\u0635\u0627\u0635\u06cc \u0644\u06cc\u0646\u0648\u06a9\u0633\" href=\"\/dedicated-servers\/linux\" target=\"_blank\" rel=\"noopener\">\u0633\u0631\u0648\u0631 \u0627\u062e\u062a\u0635\u0627\u0635\u06cc \u0644\u06cc\u0646\u0648\u06a9\u0633<\/a><\/li>\n<li><a title=\"\u062e\u0631\u06cc\u062f \u0633\u0631\u0648\u0631 \u0627\u0628\u0631\u06cc \u0644\u06cc\u0646\u0648\u06a9\u0633\" href=\"\/cloud-server\/linux\" target=\"_blank\" rel=\"noopener\"> \u0633\u0631\u0648\u0631 \u0627\u0628\u0631\u06cc \u0644\u06cc\u0646\u0648\u06a9\u0633 <\/a><\/li>\n<li><a title=\"\u062e\u0631\u06cc\u062f \u0647\u0627\u0633\u062a \u0644\u06cc\u0646\u0648\u06a9\u0633\" href=\"\/host\/linux\" target=\"_blank\" rel=\"noopener\">\u0647\u0627\u0633\u062a \u0644\u06cc\u0646\u0648\u06a9\u0633<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<h2 style=\"text-align: justify;\"><span style=\"color: #3366ff;\">\u0646\u0635\u0628 Nginx \u0631\u0648\u06cc CentOS 7 <\/span><\/h2>\n<p style=\"text-align: justify;\">\u0628\u0631\u0627\u06cc \u0646\u0635\u0628 Nginx \u0631\u0648\u06cc CentOS 7 \u0627\u06af\u0631 \u0627\u0632 \u06a9\u0627\u0631\u0628\u0631 non-root \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f\u060c \u0628\u0627\u06cc\u062f \u0645\u062c\u0648\u0632 Sudo \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f \u0648 \u067e\u06cc\u0634 \u0627\u0632 \u062a\u0645\u0627\u0645 \u062f\u0633\u062a\u0648\u0631\u0647\u0627\u060c Sudo \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<p style=\"text-align: justify;\">\u0628\u0631\u0627\u06cc \u0646\u0635\u0628 \u0627\u0646\u062c\u06cc\u0646\u200c\u0627\u06a9\u0633\u060c \u0631\u06cc\u067e\u0627\u0632\u06cc\u062a\u0648\u0631\u06cc EPEL \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">yum install epel-release -y<\/pre>\n<p style=\"text-align: justify;\">\u062f\u0631\u0627\u062f\u0627\u0645\u0647\u060c Nginx \u0648 \u0648\u06cc\u0631\u0627\u06cc\u0634\u06af\u0631 \u0645\u062a\u0646 Nano \u0631\u0627 \u0628\u0631\u0627\u06cc \u0631\u0627\u062d\u062a\u06cc \u06a9\u0627\u0631 \u0646\u0635\u0628 \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">yum install nginx nano -y<\/pre>\n<p style=\"text-align: justify;\">\u0628\u0647\u200c\u0637\u0648\u0631 \u067e\u06cc\u0634\u200c\u0641\u0631\u0636\u060c \u0627\u0646\u062c\u06cc\u0646\u200c\u0627\u06a9\u0633 \u0628\u0631\u0627\u06cc \u06a9\u0627\u0631 \u0628\u0627 \u0622\u062f\u0631\u0633\u200c\u0647\u0627\u06cc IPv4 \u0648 IPv6 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0634\u062f\u0647 \u0627\u0633\u062a. \u0627\u06af\u0631 \u062c\u062f\u06cc\u062f\u062a\u0631\u06cc\u0646 \u0646\u0633\u062e\u0647 \u0622\u0646 \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0646\u0634\u062f\u0647 \u0628\u0627\u0634\u062f\u060c \u0648\u0628\u200c\u0633\u0631\u0648\u0631 \u0628\u0647\u200c\u0633\u0627\u062f\u06af\u06cc \u0631\u0627\u0647\u200c\u0627\u0646\u062f\u0627\u0632\u06cc \u0646\u0645\u06cc\u200c\u0634\u0648\u062f\u061b \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646\u060c \u0628\u0644\u0627\u0641\u0627\u0635\u0644\u0647 \u0628\u0647 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0628\u0631\u0648\u06cc\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">nano \/etc\/nginx\/nginx.conf<\/pre>\n<p style=\"text-align: justify;\">\u062e\u0637 \u0628\u0639\u062f\u06cc \u0631\u0627 \u067e\u06cc\u062f\u0627 \u06a9\u0646\u06cc\u062f \u0648 \u0631\u0648\u06cc \u0622\u0646 \u06a9\u0627\u0645\u0646\u062a \u0628\u06af\u0630\u0627\u0631\u06cc\u062f\u061b \u06cc\u0639\u0646\u06cc \u0639\u0644\u0627\u0645\u062a # \u0631\u0627 \u062f\u0631 \u0627\u0628\u062a\u062f\u0627\u06cc \u0622\u0646 \u0642\u0631\u0627\u0631 \u062f\u0647\u06cc\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">listen       [::]:80 default_server;<\/pre>\n<p style=\"text-align: justify;\">\u0646\u062a\u06cc\u062c\u0647:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#        listen       [::]:80 default_server;<\/pre>\n<p style=\"text-align: justify;\">\u062d\u0627\u0644\u0627 \u0641\u0627\u06cc\u0644 \u0631\u0627 \u0630\u062e\u06cc\u0631\u0647 \u0648 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0631\u0627 \u0628\u0631\u0627\u06cc \u062e\u0637\u0627\u0647\u0627 \u0628\u0631\u0631\u0633\u06cc \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">nginx -t<\/pre>\n<p style=\"text-align: justify;\">\u062e\u0631\u0648\u062c\u06cc \u0634\u0645\u0627 \u0627\u0632\u0627\u06cc\u0646\u200c\u0642\u0631\u0627\u0631 \u0627\u0633\u062a:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">nginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\r\n\r\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful<\/pre>\n<p style=\"text-align: justify;\">\u0627\u06af\u0631 \u062e\u0631\u0648\u062c\u06cc \u0645\u062a\u0641\u0627\u0648\u062a\u06cc \u062f\u0627\u0631\u06cc\u062f\u060c \u0628\u062f\u06cc\u0646\u200c\u0645\u0639\u0646\u0627\u0633\u062a \u06a9\u0647 \u0686\u0647 \u062e\u0637\u0627\u0647\u0627\u06cc\u06cc \u0628\u0627\u06cc\u062f \u062f\u0631 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0627\u0635\u0644\u0627\u062d \u0634\u0648\u0646\u062f.<\/p>\n<div class=\"cta-section\">\n<p class=\"cta-description\">\u0628\u0631\u0627\u06cc \u0622\u0645\u0648\u0632\u0634 \u06a9\u0627\u0645\u0644 \u0646\u0635\u0628 Cpanel \u0628\u0631 \u0631\u0648\u06cc vps \u0648 \u06cc\u0627 \u0633\u0631\u0648\u0631 \u0627\u062e\u062a\u0635\u0627\u0635\u06cc \u0644\u06cc\u0646\u0648\u06a9\u0633 CentOs 7 \u0645\u0642\u0627\u0644\u0647\u200c\u06cc \u0632\u06cc\u0631 \u0631\u0627 \u0628\u062e\u0648\u0627\u0646\u06cc\u062f.<\/p>\n<p><a class=\"cta-button \" href=\"https:\/\/parspack.com\/blog\/os\/linux\/centos\/install-cpanel-on-a-centos7\" target=\"_blank\" rel=\"noopener\">\u0646\u0635\u0628 \u0633\u06cc \u067e\u0646\u0644 \u062f\u0631 CentOs 7<\/a><\/p>\n<\/div>\n<p style=\"text-align: justify;\">\u062d\u0627\u0644\u0627 \u0627\u062c\u0627\u0632\u0647 \u062f\u0647\u06cc\u062f Nginx \u0631\u0627 \u0627\u0633\u062a\u0627\u0631\u0627 \u0648 \u0622\u0646 \u0631\u0627 \u0628\u0647 Autorun \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">systemctl enable --now nginx<\/pre>\n<p style=\"text-align: justify;\">\u0627\u06af\u0631 \u0627\u0632 \u0641\u0627\u06cc\u0631\u0648\u0627\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f\u060c \u0628\u0627\u06cc\u062f \u0645\u062c\u0648\u0632\u06cc \u0628\u0631\u0627\u06cc \u0648\u0628\u200c\u0633\u0631\u0648\u0631 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f. \u062f\u0631\u0627\u062f\u0627\u0645\u0647\u060c \u0645\u062b\u0627\u0644\u06cc \u0628\u0631\u0627\u06cc \u0641\u0627\u06cc\u0631\u0648\u0627\u0644 \u0622\u0648\u0631\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a. \u062f\u0633\u062a\u0648\u0631\u0647\u0627 \u0631\u0627 \u0628\u0647\u200c\u062a\u0631\u062a\u06cc\u0628 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">firewall-cmd --zone=public --permanent --add-service=http\r\n\r\nfirewall-cmd --zone=public --permanent --add-service=https\r\n\r\nfirewall-cmd --reload<\/pre>\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" data-loaded=\"true\" src=\"https:\/\/parspack.com\/blog\/wp-content\/uploads\/2022\/08\/install-and-configure-nginx-on-centos-7-1.jpg\" class=\"wp-image-27684 size-full\" alt=\"\u0646\u0635\u0628 nginx \u0631\u0648\u06cc centos\" title=\"\u0646\u0635\u0628 \u0627\u0646 \u062c\u06cc\u0646 \u0627\u06cc\u06a9\u0633 \u0631\u0648\u06cc CentOS 7\"       width=\"750\" height=\"519\" srcset=\"https:\/\/parspack.com\/blog\/wp-content\/uploads\/2022\/08\/install-and-configure-nginx-on-centos-7-1.jpg 750w, https:\/\/parspack.com\/blog\/wp-content\/uploads\/2022\/08\/install-and-configure-nginx-on-centos-7-1-300x208.jpg 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><figcaption class=\"text-subtitle-5 text-gray-9 text-center mt-2\" >\u0686\u0637\u0648\u0631 \u0627\u0646\u062c\u06cc\u0646 \u0627\u06cc\u06a9\u0633 \u0631\u0627 \u0631\u0648\u06cc CentOS 7 \u0646\u0635\u0628 \u06a9\u0646\u06cc\u0645\u061f<\/figcaption><\/figure>\n<h2 style=\"text-align: justify;\"><span style=\"color: #3366ff;\"><b>\u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0645\u06a9\u0627\u0646 \u0641\u0627\u06cc\u0644\u200c\u0647\u0627\u06cc \u0648\u0628\u200c\u0633\u0627\u06cc\u062a \u0628\u0631\u0627\u06cc \u0646\u0635\u0628 Nginx \u0631\u0648\u06cc CentOS 7<br \/>\n<\/b><\/span><\/h2>\n<p style=\"text-align: justify;\">\u0628\u0647\u200c\u0637\u0648\u0631 \u067e\u06cc\u0634\u200c\u0641\u0631\u0636\u060c Nginx \u0635\u0641\u062d\u0647 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0631\u0627 \u062f\u0631 \u0648\u0628\u200c\u0633\u0627\u06cc\u062a \u0646\u0645\u0627\u06cc\u0634 \u0645\u06cc\u200c\u062f\u0647\u062f. \u062d\u0627\u0644 \u0628\u0627\u06cc\u062f \u0645\u06a9\u0627\u0646 \u0645\u062a\u0641\u0627\u0648\u062a\u06cc \u0628\u0631\u0627\u06cc \u0641\u0627\u06cc\u0644\u200c\u0647\u0627\u06cc \u0648\u0628\u200c\u0633\u0627\u06cc\u062a \u062a\u0646\u0638\u06cc\u0645 \u0648 \u0635\u0641\u062d\u0647 \u062e\u0648\u062f \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f. \u0627\u0628\u062a\u062f\u0627\u060c \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc\u200c\u0647\u0627\u06cc \u0645\u0648\u0631\u062f\u0646\u06cc\u0627\u0632 \u0631\u0627 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">mkdir -p \/var\/www\/default<\/pre>\n<p style=\"text-align: justify;\">\u0633\u067e\u0633 \u062e\u0648\u062f\u0650 \u0635\u0641\u062d\u0647 \u0631\u0627 \u062f\u0631 \u067e\u0648\u0634\u0647\u200c\u0627\u06cc \u062c\u062f\u06cc\u062f \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">nano \/var\/www\/default\/index.html<\/pre>\n<p style=\"text-align: justify;\">\u062d\u0627\u0644 \u0628\u0647 \u0622\u0646 \u0645\u062d\u062a\u0648\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f. \u0627\u06cc\u0646 \u0645\u062d\u062a\u0648\u0627 \u0647\u0631\u0686\u06cc\u0632\u06cc \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0628\u0627\u0634\u062f\u061b \u0645\u062b\u0644\u0627\u064b:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;h1&gt;My first web page&lt;\/h1&gt;<\/pre>\n<p style=\"text-align: justify;\">\u067e\u0633\u200c\u0627\u0632\u0622\u0646 Owner \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u0648 \u0641\u0627\u06cc\u0644 \u0645\u0648\u062c\u0648\u062f \u062f\u0631 \u0622\u0646 \u0631\u0627 \u0631\u0648\u06cc \u06a9\u0627\u0631\u0628\u0631\u0650 Nginx \u062a\u0646\u0638\u06cc\u0645 \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">chown -R nginx:nginx \/var\/www\/default\/<\/pre>\n<p style=\"text-align: justify;\">\u0627\u0632 \u0633\u0631\u0648\u0631 \u0645\u062c\u0627\u0632\u06cc \u062f\u0631 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0627\u0646\u062c\u06cc\u0646\u200c\u0627\u06a9\u0633 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0648 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0631\u0627 \u0628\u0631\u0627\u06cc \u0645\u06a9\u0627\u0646 \u0641\u0627\u06cc\u0644\u200c\u0647\u0627\u06cc \u0648\u0628\u200c\u0633\u0627\u06cc\u062a \u062c\u0627\u0628\u0647\u200c\u062c\u0627 \u06a9\u0646\u06cc\u062f. \u0628\u0631\u0627\u06cc \u0627\u0646\u062c\u0627\u0645 \u0627\u06cc\u0646 \u06a9\u0627\u0631\u060c \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0627\u0646\u062c\u06cc\u0646\u200c\u0627\u06a9\u0633 \u0631\u0627 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">nano \/etc\/nginx\/nginx.conf<\/pre>\n<p style=\"text-align: justify;\">\u0628\u0627\u06cc\u062f \u0628\u062e\u0634 \u0633\u0631\u0648\u0631 \u0631\u0627 \u06a9\u0647 \u0628\u0627 listen 80 default_server \u0634\u0631\u0648\u0639 \u0645\u06cc\u200c\u0634\u0648\u062f \u0648 \u062f\u0631 \u0622\u0646 \u067e\u0627\u0631\u0627\u0645\u062a\u0631 root \u06a9\u0647 \u0645\u0633\u06cc\u0631 \u0641\u0627\u06cc\u0644\u200c\u0647\u0627\u06cc \u0648\u0628\u200c\u0633\u0627\u06cc\u062a \u0631\u0627 \u062a\u0639\u06cc\u06cc\u0646 \u0645\u06cc\u200c\u06a9\u0646\u062f\u060c \u067e\u06cc\u062f\u0627 \u06a9\u0646\u06cc\u062f. \u062d\u0627\u0644\u0627 \u0622\u0646 \u0631\u0627 \u0628\u0627 \u0645\u0633\u06cc\u0631 \/ var\/www\/default\/ \u0627\u06cc\u062c\u0627\u062f\u0634\u062f\u0647 \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646 \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">    server {\r\n        listen       80 default_server;\r\n#        listen       [::]:80 default_server;\r\n        server_name  _;\r\n        root         \/var\/www\/default\/;\r\n...<\/pre>\n<p style=\"text-align: justify;\">\u0641\u0627\u06cc\u0644 \u0631\u0627 \u0630\u062e\u06cc\u0631\u0647 \u0648 \u0627\u0646\u062c\u06cc\u0646\u200c\u0627\u06a9\u0633 \u0631\u0627 \u0631\u06cc\u0633\u062a\u0627\u0631\u062a \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">systemctl restart nginx<\/pre>\n<p style=\"text-align: justify;\">\u0627\u06a9\u0646\u0648\u0646 \u0647\u0646\u06af\u0627\u0645 \u062f\u0633\u062a\u0631\u0633\u06cc \u0628\u0647 \u0622\u062f\u0631\u0633 \u0633\u0631\u0648\u0631 \u0627\u0632 \u067e\u0646\u062c\u0631\u0647 \u0645\u0631\u0648\u0631\u06af\u0631\u060c \u0645\u062d\u062a\u0648\u06cc\u0627\u062a \u0635\u0641\u062d\u0647 \u062c\u062f\u06cc\u062f \u0627\u06cc\u062c\u0627\u062f\u200c\u0634\u062f\u0647 \u0631\u0627 \u0645\u0634\u0627\u0647\u062f\u0647 \u062e\u0648\u0627\u0647\u06cc\u062f \u06a9\u0631\u062f.<\/p>\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" data-loaded=\"true\" src=\"https:\/\/parspack.com\/blog\/wp-content\/uploads\/2022\/08\/install-and-configure-nginx-on-centos-7-2.jpg\" class=\"wp-image-27685 size-full\" alt=\"\u0622\u0645\u0648\u0632\u0634 \u0646\u0635\u0628 nginx \u062f\u0631 Centos\" title=\"\u0645\u0631\u0627\u062d\u0644 \u0646\u0635\u0628 PHP \u062f\u0631 NGINX\"       width=\"750\" height=\"500\" srcset=\"https:\/\/parspack.com\/blog\/wp-content\/uploads\/2022\/08\/install-and-configure-nginx-on-centos-7-2.jpg 750w, https:\/\/parspack.com\/blog\/wp-content\/uploads\/2022\/08\/install-and-configure-nginx-on-centos-7-2-300x200.jpg 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><figcaption class=\"text-subtitle-5 text-gray-9 text-center mt-2\" >\u0645\u0631\u0627\u062d\u0644 \u0646\u0635\u0628 PHP \u062f\u0631 \u0627\u0646\u062c\u06cc\u0646 \u0627\u06cc\u06a9\u0633 \u0686\u06af\u0648\u0646\u0647 \u0627\u0633\u062a\u061f<\/figcaption><\/figure>\n<h2 style=\"text-align: justify;\"><span style=\"color: #3366ff;\"><b>\u0645\u0631\u0627\u062d\u0644 \u0646\u0635\u0628 PHP<\/b><\/span><\/h2>\n<p style=\"text-align: justify;\">\u0647\u0646\u06af\u0627\u0645 \u0646\u0635\u0628 Nginx \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0644\u06cc\u0646\u0648\u06a9\u0633 CentOS 7\u060c \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 PHP \u06cc\u06a9 \u0646\u06cc\u0627\u0632 \u0636\u0631\u0648\u0631\u06cc \u0627\u0633\u062a. \u0628\u0631\u0627\u06cc \u06a9\u0627\u0631 \u0628\u0627 PHP\u060c \u0628\u0627\u06cc\u062f php-fpm \u0631\u0627 \u0646\u0635\u0628 \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">yum install php-fpm<\/pre>\n<p style=\"text-align: justify;\">\u062d\u0627\u0644\u0627 \u0622\u0646 \u0631\u0627 \u0627\u062c\u0631\u0627 \u0648 \u0628\u0647 Startup \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">systemctl enable --now php-fpm<\/pre>\n<p style=\"text-align: justify;\">\u062a\u0646\u0638\u06cc\u0645\u0627\u062a \u06a9\u0627\u0631 \u0628\u0627 php-fpm \u0631\u0627 \u062f\u0631 \u0627\u0646\u062a\u0647\u0627\u06cc \u0647\u0645\u0627\u0646 \u0628\u062e\u0634 \u0633\u0631\u0648\u0631\u060c \u0645\u0627\u0646\u0646\u062f \u0642\u0628\u0644 \u0628\u0647 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc Nginx \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">nano \/etc\/nginx\/nginx.conf<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">location ~ \\.php$ {\r\n\r\ntry_files $uri =404;\r\n\r\nfastcgi_pass 127.0.0.1:9000;\r\n\r\nfastcgi_index index.php;\r\n\r\nfastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n\r\nfastcgi_param SCRIPT_NAME $fastcgi_script_name;\r\n\r\nfastcgi_buffer_size 128k;\r\n\r\nfastcgi_buffers 256 16k;\r\n\r\nfastcgi_busy_buffers_size 256k;\r\n\r\nfastcgi_temp_file_write_size 256k;\r\n\r\ninclude fastcgi_params;\r\n\r\n}<\/pre>\n<p style=\"text-align: justify;\">\u0627\u0646\u062c\u06cc\u0646\u200c\u0627\u06cc\u06a9\u0633 \u0631\u0627 \u0631\u06cc\u0633\u062a\u0627\u0631\u062a \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">systemctl restart nginx<\/pre>\n<p style=\"text-align: justify;\">\u062d\u0627\u0644\u0627 \u0641\u0627\u06cc\u0644\u06cc \u0628\u0631\u0627\u06cc \u0622\u0632\u0645\u0627\u06cc\u0634 \u0639\u0645\u0644\u06a9\u0631\u062f php-fpm \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">echo \"&lt;!--?php phpinfo(); ?--&gt;\" &gt; \/var\/www\/default\/info.php<\/pre>\n<p style=\"text-align: justify;\">\u0633\u067e\u0633\u060c http:\/\/server-IP\/info.php \u0631\u0627 \u062f\u0631 \u0646\u0648\u0627\u0631 \u0622\u062f\u0631\u0633 \u0645\u0631\u0648\u0631\u06af\u0631 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f \u0648 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 PHP \u0631\u0627 \u0628\u0628\u06cc\u0646\u06cc\u062f.<\/p>\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" data-loaded=\"true\" src=\"https:\/\/parspack.com\/blog\/wp-content\/uploads\/2022\/08\/install-and-configure-nginx-on-centos-7-3.jpg\" class=\"wp-image-27686 size-full\" alt=\"centos nginx install\" title=\"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Nginx \u0631\u0648\u06cc CentOS 7\"       width=\"750\" height=\"420\" srcset=\"https:\/\/parspack.com\/blog\/wp-content\/uploads\/2022\/08\/install-and-configure-nginx-on-centos-7-3.jpg 750w, https:\/\/parspack.com\/blog\/wp-content\/uploads\/2022\/08\/install-and-configure-nginx-on-centos-7-3-300x168.jpg 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><figcaption class=\"text-subtitle-5 text-gray-9 text-center mt-2\" >\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Nginx \u0631\u0648\u06cc CentOS 7 \u0686\u0637\u0648\u0631\u0647\u061f<\/figcaption><\/figure>\n<p style=\"text-align: justify;\">\u0627\u06cc\u0646 \u062e\u0631\u0648\u062c\u06cc \u062a\u0623\u06cc\u06cc\u062f \u0645\u06cc\u200c\u06a9\u0646\u062f \u06a9\u0647 nginx + php-fpm \u06a9\u0627\u0631 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u067e\u0633 \u0627\u0632 \u0622\u0632\u0645\u0627\u06cc\u0634 \u0639\u0645\u0644\u06a9\u0631\u062f \u0633\u0631\u0648\u0631\u060c \u062d\u062a\u0645\u0627\u064b \u0627\u06cc\u0646 \u0635\u0641\u062d\u0647 \u0631\u0627 \u062d\u0630\u0641 \u06a9\u0646\u06cc\u062f\u061b \u0632\u06cc\u0631\u0627 \u0627\u0645\u0646\u06cc\u062a \u0633\u0631\u0648\u0631 \u0631\u0627 \u0628\u0647\u200c\u062e\u0637\u0631 \u0645\u06cc\u200c\u0627\u0646\u062f\u0627\u0632\u062f.<\/p>\n<h2 style=\"text-align: justify;\"><span style=\"color: #3366ff;\">\u062c\u0645\u0639\u200c\u0628\u0646\u062f\u06cc<\/span><\/h2>\n<p style=\"text-align: justify;\">Nginx \u0628\u0647\u200c\u0639\u0646\u0648\u0627\u0646 \u06cc\u06a9 \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646 \u0645\u0646\u0627\u0633\u0628 \u0628\u0631\u0627\u06cc \u0622\u067e\u0627\u0686\u06cc\u060c \u06cc\u06a9\u06cc \u0627\u0632 \u0628\u0647\u062a\u0631\u06cc\u0646 \u0648 \u0645\u062d\u0628\u0648\u0628\u200c\u062a\u0631\u06cc\u0646 \u0648\u0628\u200c\u0633\u0631\u0648\u0631\u0647\u0627 \u062f\u0631 \u062f\u0646\u06cc\u0627 \u0627\u0633\u062a. \u0627\u06cc\u0646 \u0648\u0628\u200c\u0633\u0631\u0648\u0631 \u0628\u0631\u062e\u0644\u0627\u0641 \u0631\u0642\u06cc\u0628 \u062f\u06cc\u0631\u06cc\u0646\u0647 \u062e\u0648\u062f \u0622\u067e\u0627\u0686\u06cc\u060c \u0628\u0647\u200c\u062f\u0644\u06cc\u0644 \u0645\u0635\u0631\u0641 \u06a9\u0645 \u0645\u0646\u0627\u0628\u0639\u060c \u0632\u0645\u0627\u0646 \u067e\u0627\u0633\u062e\u06af\u0648\u06cc\u06cc \u0633\u0631\u0648\u0631 \u0631\u0627 \u062a\u0633\u0631\u06cc\u0639 \u0645\u06cc\u200c\u0628\u062e\u0634\u062f. \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0637\u0644\u0628 \u0627\u0632 <a href=\"https:\/\/parspack.com\/blog\/os\/linux\">\u0622\u0645\u0648\u0632\u0634 \u0644\u06cc\u0646\u0648\u06a9\u0633<\/a> \u0633\u0639\u06cc \u06a9\u0631\u062f\u06cc\u0645 \u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Nginx \u0631\u0648\u06cc CentOS 7 \u0631\u0627 \u0628\u0647\u200c\u0635\u0648\u0631\u062a \u06a9\u0627\u0645\u0644 \u0648 \u06af\u0627\u0645\u200c\u0628\u0647\u200c\u06af\u0627\u0645 \u0622\u0645\u0648\u0632\u0634 \u062f\u0647\u06cc\u0645.<\/p>\n<h2 style=\"text-align: justify;\"><span style=\"color: #3366ff;\"><b>\u0633\u0624\u0627\u0644\u0627\u062a \u0645\u062a\u062f\u0627\u0648\u0644<\/b><\/span><\/h2>\n<h3 style=\"text-align: justify;\"><span style=\"color: #0000ff;\"><b>\u06f1. \u062a\u0648\u0632\u06cc\u0639 CentOS 7 \u0686\u06cc\u0633\u062a\u061f<\/b><\/span><\/h3>\n<p style=\"text-align: justify;\">CentOS 7 \u06cc\u06a9\u06cc \u0627\u0632 \u062a\u0648\u0632\u06cc\u0639\u200c\u0647\u0627\u06cc \u0644\u06cc\u0646\u0648\u06a9\u0633 \u0628\u0631\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0633\u0627\u0632\u0645\u0627\u0646\u06cc \u0627\u0633\u062a \u0648 \u0628\u0647\u200c\u0646\u0648\u0639\u06cc \u0645\u0627\u0646\u0646\u062f \u0646\u0633\u062e\u0647 \u0631\u0627\u06cc\u06af\u0627\u0646 \u0644\u06cc\u0646\u0648\u06a9\u0633 Red Hat Enterprise \u0627\u0633\u062a.<\/p>\n<h3 style=\"text-align: justify;\"><span style=\"color: #0000ff;\"><b>\u06f2. \u0646\u0627\u0645 \u06a9\u0627\u0631\u0628\u0631\u06cc \u0648 \u0631\u0645\u0632\u0639\u0628\u0648\u0631 \u067e\u06cc\u0634\u200c\u0641\u0631\u0636 \u00abCentOS 7\u00bb \u0686\u06cc\u0633\u062a\u061f<\/b><\/span><\/h3>\n<p style=\"text-align: justify;\">\u0628\u0631\u0627\u06cc \u062a\u0648\u0632\u06cc\u0639\u200c\u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0628\u0647\u200c\u0637\u0648\u0631 \u067e\u06cc\u0634\u200c\u0641\u0631\u0636 \u0627\u062c\u0627\u0632\u0647 \u0648\u0631\u0648\u062f \u0628\u0647\u200c\u0639\u0646\u0648\u0627\u0646 root \u0631\u0627 \u0645\u06cc\u200c\u062f\u0647\u0646\u062f (\u0645\u0627\u0646\u0646\u062f RHEL \u06cc\u0627 CentOS \u06cc\u0627 Scientific Linux)\u060c \u0646\u0627\u0645\u200c \u06a9\u0627\u0631\u0628\u0631\u06cc root \u0648 \u0631\u0645\u0632\u0639\u0628\u0648\u0631 fln75g \u0627\u0633\u062a.<\/p>\n<p><script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"FAQPage\",\n  \"mainEntity\": [{\n    \"@type\": \"Question\",\n    \"name\": \"\u062a\u0648\u0632\u06cc\u0639 CentOS 7 \u0686\u06cc\u0633\u062a\u061f\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"CentOS 7 \u06cc\u06a9\u06cc \u0627\u0632 \u062a\u0648\u0632\u06cc\u0639\u200c\u0647\u0627\u06cc \u0644\u06cc\u0646\u0648\u06a9\u0633 \u0628\u0631\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0633\u0627\u0632\u0645\u0627\u0646\u06cc \u0627\u0633\u062a \u0648 \u0628\u0647\u200c\u0646\u0648\u0639\u06cc \u0645\u0627\u0646\u0646\u062f \u0646\u0633\u062e\u0647 \u0631\u0627\u06cc\u06af\u0627\u0646 \u0644\u06cc\u0646\u0648\u06a9\u0633 Red Hat Enterprise \u0627\u0633\u062a.\"\n    }\n  },{\n    \"@type\": \"Question\",\n    \"name\": \"\u0646\u0627\u0645 \u06a9\u0627\u0631\u0628\u0631\u06cc \u0648 \u0631\u0645\u0632\u0639\u0628\u0648\u0631 \u067e\u06cc\u0634\u200c\u0641\u0631\u0636 \u00abCentOS 7\u00bb \u0686\u06cc\u0633\u062a\u061f\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"\u0628\u0631\u0627\u06cc \u062a\u0648\u0632\u06cc\u0639\u200c\u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0628\u0647\u200c\u0637\u0648\u0631 \u067e\u06cc\u0634\u200c\u0641\u0631\u0636 \u0627\u062c\u0627\u0632\u0647 \u0648\u0631\u0648\u062f \u0628\u0647\u200c\u0639\u0646\u0648\u0627\u0646 root \u0631\u0627 \u0645\u06cc\u200c\u062f\u0647\u0646\u062f (\u0645\u0627\u0646\u0646\u062f RHEL \u06cc\u0627 CentOS \u06cc\u0627 Scientific Linux)\u060c \u0646\u0627\u0645\u200c \u06a9\u0627\u0631\u0628\u0631\u06cc root \u0648 \u0631\u0645\u0632\u0639\u0628\u0648\u0631 fln75g \u0627\u0633\u062a.\"\n    }\n  }]\n}\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0628\u0627 \u0645\u0627 \u0647\u0645\u0631\u0627\u0647 \u0628\u0627\u0634\u06cc\u062f \u062a\u0627 \u0645\u0631\u0627\u062d\u0644 \u0646\u0635\u0628 \u0648 \u06a9\u0627\u0646\u0641\u06cc\u06af \u0648\u0628\u200c\u0633\u0631\u0648\u0631 Nginx \u062f\u0631 CentOS 7 \u0631\u0627 \u067e\u0634\u062a \u0633\u0631 \u0628\u06af\u0630\u0627\u0631\u06cc\u0645.<\/p>\n","protected":false},"author":68,"featured_media":35206,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[295],"tags":[],"class_list":["post-27669","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/parspack.com\/blog\/wp-json\/wp\/v2\/posts\/27669","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/parspack.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/parspack.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/parspack.com\/blog\/wp-json\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/parspack.com\/blog\/wp-json\/wp\/v2\/comments?post=27669"}],"version-history":[{"count":4,"href":"https:\/\/parspack.com\/blog\/wp-json\/wp\/v2\/posts\/27669\/revisions"}],"predecessor-version":[{"id":49962,"href":"https:\/\/parspack.com\/blog\/wp-json\/wp\/v2\/posts\/27669\/revisions\/49962"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/parspack.com\/blog\/wp-json\/wp\/v2\/media\/35206"}],"wp:attachment":[{"href":"https:\/\/parspack.com\/blog\/wp-json\/wp\/v2\/media?parent=27669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/parspack.com\/blog\/wp-json\/wp\/v2\/categories?post=27669"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/parspack.com\/blog\/wp-json\/wp\/v2\/tags?post=27669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}