{"id":566,"date":"2020-10-19T01:00:54","date_gmt":"2020-10-18T17:00:54","guid":{"rendered":"https:\/\/dell755.cith.ddnsfree.com:5444\/?p=566"},"modified":"2020-11-14T18:12:01","modified_gmt":"2020-11-14T10:12:01","slug":"centos-%e5%ae%89%e8%a3%85-nginx","status":"publish","type":"post","link":"https:\/\/blog.cithwu.com\/wp5444\/centos-%e5%ae%89%e8%a3%85-nginx\/","title":{"rendered":"Centos \u5b89\u88c5 Nginx"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Install the prerequisites:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum install yum-utils<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><sub>To set up the yum repository, create the file named \/etc\/yum.repos.d\/nginx.repo with the following contents:<\/sub><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;nginx-stable]\nname=nginx stable repo\nbaseurl=http:\/\/nginx.org\/packages\/centos\/$releasever\/$basearch\/\ngpgcheck=1\nenabled=1\ngpgkey=https:\/\/nginx.org\/keys\/nginx_signing.key\nmodule_hotfixes=true\n\n&#91;nginx-mainline]\nname=nginx mainline repo\nbaseurl=http:\/\/nginx.org\/packages\/mainline\/centos\/$releasever\/$basearch\/\ngpgcheck=1\nenabled=0\ngpgkey=https:\/\/nginx.org\/keys\/nginx_signing.key\nmodule_hotfixes=true\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><sub>To install nginx, run the following command:<\/sub><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum install nginx<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><sub>When prompted to accept the GPG key, verify that the fingerprint matches 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62, and if so, accept it.<\/sub><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/nginx.org\/en\/linux_packages.html\">https:\/\/nginx.org\/en\/linux_packages.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Install the prer&#46;&#46;&#46;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[20],"class_list":["post-566","post","type-post","status-publish","format-standard","hentry","category-linux","tag-centos-yum-install-nginx"],"_links":{"self":[{"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/posts\/566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/comments?post=566"}],"version-history":[{"count":3,"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/posts\/566\/revisions"}],"predecessor-version":[{"id":573,"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/posts\/566\/revisions\/573"}],"wp:attachment":[{"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/media?parent=566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/categories?post=566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/tags?post=566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}