{"id":614,"date":"2022-12-26T11:10:39","date_gmt":"2022-12-26T03:10:39","guid":{"rendered":"http:\/\/www.inhhh.com\/blog\/?p=614"},"modified":"2023-01-04T10:59:24","modified_gmt":"2023-01-04T02:59:24","slug":"setup-nginx","status":"publish","type":"post","link":"http:\/\/www.inhhh.com\/blog\/?p=614","title":{"rendered":"setup nginx"},"content":{"rendered":"\n<p><br><code>pcre \u5305\u4f5c\u7528\u662f\u8ba9nginx \u652f\u6301\u6b63\u5219\u8868\u8fbe\u5f0f\uff0c\u5730\u5740\u91cd\u5199 rewrite<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum -y install gcc \nyum -y install gcc-c++ \nyum -y install make \nyum -y install zlib-devel \nyum -y install pcre \nyum -y install pcre-devel \nyum -y install openssl-devel<\/code><\/pre>\n\n\n\n<p>\u5148\u5b89\u88c5nginx-rtmp-module<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/var\/www\/setup\/nginx-rtmp-module\ncd \/usr\/local\nmkdir nginx-rtmp-module\ncd \/usr\/local\/nginx-rtmp-module\ngit clone https:\/\/github.com\/arut\/nginx-rtmp-module.git\n<\/code><\/pre>\n\n\n\n<p>wget http:\/\/nginx.org\/download\/nginx-1.21.6.tar.gz<\/p>\n\n\n\n<p>tar zxvf nginx-1.21.6.tar.gz<\/p>\n\n\n\n<p>cd nginx-1.21.6\/<br>#.\/configure &#8211;prefix=\/usr\/local\/nginx \u2013add-module=\/usr\/local\/nginx-rtmp-module<br>#.\/configure &#8211;prefix=\/usr\/local\/nginx  &#8211;with-http_ssl_module &#8211;add-module=\/usr\/local\/nginx-rtmp-module<\/p>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/configure --prefix=\/usr\/local\/nginx --user=nginx --group=nginx --pid-path=\/var\/runtime\/nginx\/nginx.pid --lock-path=\/var\/runtime\/nginx\/nginx.lock --http-log-path=\/var\/log\/nginx\/access.log --error-log-path=\/var\/log\/nginx\/error.log --with-debug --with-http_dav_module --with-http_flv_module --with-http_ssl_module --with-http_xslt_module --with-http_realip_module --with-http_addition_module --with-http_stub_status_module --with-http_sub_module --with-http_random_index_module --with-http_degradation_module --with-http_secure_link_module --with-file-aio --with-mail --with-mail_ssl_module --with-http_gzip_static_module --with-zlib=zlib-1.2.11 --with-ld-opt=-Wl,-E --http-scgi-temp-path=\/var\/runtime\/nginx\/temp_scgi --http-uwsgi-temp-path=\/var\/runtime\/nginx\/temp_uwsgi --http-proxy-temp-path=\/var\/runtime\/nginx\/temp_proxy --http-fastcgi-temp-path=\/var\/runtime\/nginx\/temp_fastcgi --http-client-body-temp-path=\/var\/runtime\/nginx\/temp_client_body --add-module=\/usr\/local\/nginx-rtmp-module<\/code><\/pre>\n\n\n\n<p>make <\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>cd \/usr\/local\/nginx\/<br>.\/sbin\/nginx<\/p>\n\n\n\n<p>ln \/usr\/local\/nginx\/sbin\/nginx \/sbin\/nginx<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\/usr\/local\/niginx\/sbin\/nginx # \u542f\u52a8<br> \/usr\/local\/niginx\/sbin\/nginx -s reload # \u91cd\u8f7d<br>\/usr\/local\/niginx\/sbin\/nginx -s stop # \u5173\u95ed<br> \/usr\/local\/niginx\/sbin\/nginx -s quit # \u5173\u95ed\uff08\u5f53\u8bf7\u6c42\u88ab\u5904\u7406\u5b8c\u6210\u4e4b\u540e\u624d\u5173\u95ed\uff09<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>pcre \u5305\u4f5c\u7528\u662f\u8ba9nginx \u652f\u6301\u6b63\u5219\u8868\u8fbe\u5f0f\uff0c\u5730\u5740\u91cd\u5199 rewrite \u5148\u5b89\u88c5nginx-rtmp-modu<\/p>\n<div class=\"more-link\">\n\t\t\t\t <a href=\"http:\/\/www.inhhh.com\/blog\/?p=614\" class=\"link-btn theme-btn\"><span>Read More <\/span> <i class=\"fa fa-caret-right\"><\/i><\/a>\n\t\t\t<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58],"tags":[],"class_list":["post-614","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=614"}],"version-history":[{"count":4,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/614\/revisions"}],"predecessor-version":[{"id":637,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/614\/revisions\/637"}],"wp:attachment":[{"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=614"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}