{"id":581,"date":"2020-02-22T16:46:08","date_gmt":"2020-02-22T08:46:08","guid":{"rendered":"https:\/\/cloudbool.com\/archive\/?p=581"},"modified":"2020-02-22T16:46:08","modified_gmt":"2020-02-22T08:46:08","slug":"debian-10-build-nginx-add-google-brotli-purge-http3","status":"publish","type":"post","link":"https:\/\/cloudbool.com\/archive\/debian-10-build-nginx-add-google-brotli-purge-http3.html","title":{"rendered":"Debian 10\u91cd\u65b0\u6253\u5305Nginx\uff0c\u65b0\u589eGoogle\u3001Purge\u3001Brotli\u53caHTTP3\u7b49\u6a21\u5757"},"content":{"rendered":"\n<p>\u5bf9\u4e8e\u4e00\u4e2a\u8ffd\u6c42\u8f6f\u4ef6\u65b0\u7248\u672c\u53ca\u559c\u6b22\u6298\u817e\u7684\u4eba\u6765\u8bf4\uff0c\u6bcf\u6b21\u6709\u4e86\u65b0\u7248\u672c\u4e0d\u5347\u7ea7\u5230\u6700\u65b0\u7684\u7248\u672c\u603b\u662f\u6709\u70b9\u4e0d\u8212\u670d\uff0c\u4e00\u8f6c\u773cDebian 10\u90fd\u53d1\u5e03\u534a\u5e74\u591a\u4e86\uff0c\u670d\u52a1\u5668\u4e0a\u4e5f\u5347\u7ea7\u5230\u4e86Debian 10\u6709\u4e00\u6bb5\u65f6\u95f4\u4e86\uff0c\u4e00\u76f4\u7528\u7684Nginx\u5b98\u65b9\u6e90\u91cc\u81ea\u5e26\u7684Nginx\u7248\u672c\uff0c\u6700\u8fd1\u6709\u70b9\u65f6\u95f4\uff0c\u60f3\u6298\u817e\u4e0bHTTP3\uff0c\u987a\u5e26\u60f3\u628aNginx\u7684Purge\u53caBrotli\u7b49\u6a21\u5757\u4e5f\u7ed9\u52a0\u4e0a\uff0c\u4e8e\u662f\u5c31\u6709\u4e86\u8fd9\u7bc7\u6587\u7ae0\u3002<\/p>\n\n\n<!--more-->\n\n\n<h1 class=\"wp-block-heading\">\u5199\u5728\u6700\u5f00\u59cb<\/h1>\n\n\n<p>\u867d\u7136Nginx\u5b98\u65b9\u63d0\u4f9b\u7f16\u8bd1\u597d\u7684Nginx\uff0c\u7248\u672c\u4e5f\u8db3\u591f\u65b0\uff0c\u4e5f\u81ea\u5e26\u4e86\u90e8\u5206\u6a21\u5757\uff0c\u4f46\u662f\u6709\u4e9b\u6211\u9700\u8981\u7684\u6a21\u5757\u5374\u5e76\u6ca1\u6709\uff0c\u6bd4\u5982\u8bf4Purge\u3001Brotli\u53ca\u521a\u901a\u8fc7\u7684HTTP3\uff0c\u60f3\u8981\u4f7f\u7528\u8fd9\u4e9b\u6a21\u5757\uff0c\u53ea\u80fd\u81ea\u5df1\u7f16\u8bd1\u4e86\u3002<\/p>\n\n\n<p>\u672c\u6587\u5185\u5bb9\u57fa\u4e8eDebian 10 64\u4f4d\u7cfb\u7edf\uff0c\u4f7f\u7528\u7684\u662froot\u8d26\u6237\uff0c\u6574\u4e2a\u8fc7\u7a0b\u8d70\u5b8c\u4f1a\u751f\u6210\u4e00\u4e2a\u53ef\u4ee5\u968f\u610f\u590d\u5236\u5b89\u88c5\u7684Deb\u8f6f\u4ef6\u5305\u3002<\/p>\n\n\n<p>\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u4f1a\u5b89\u88c5\u5927\u91cf\u7684\u8f6f\u4ef6\u5305\uff0c\u5176\u4e2d\u8bbe\u8ba1\u76f8\u5173\u7684\u7f16\u8bd1\u8f6f\u4ef6\uff0c\u4ee5\u53ca\u7f16\u8bd1Nginx\u672c\u8eab\u6240\u9700\u8981\u7684\u4f9d\u8d56\uff0c\u8fd8\u6709Nginx\u6a21\u5757\u7f16\u8bd1\u6240\u9700\u8981\u7684\u4e1c\u897f\uff0c\u5982\u679c\u8fd9\u4e9b\u8f6f\u4ef6\u5305\u5168\u90e8\u5b89\u88c5\u5230\u6b63\u5f0f\u670d\u52a1\u5668\u4e0a\uff0c\u8fd9\u80af\u5b9a\u4e0d\u5408\u9002\uff0c\u5efa\u8bae\u662f\u5355\u72ec\u627e\u4e00\u53f0\u5e72\u51c0\u7684\u6d4b\u8bd5\u670d\u52a1\u5668\u6765\u505a\u8fd9\u4e9b\u4e8b\u3002<\/p>\n\n\n<p>\u81f3\u4e8e\u6d4b\u8bd5\u670d\u52a1\u5668\uff0c\u6211\u63a8\u8350\u4f7f\u7528<a href=\"https:\/\/cloudbool.com\/archive\/vultr.html\">Vultr<\/a>\u7684\u670d\u52a1\u5668\uff0c\u6709\u5982\u4e0b\u597d\u5904\uff1a<\/p>\n\n\n<ul class=\"wp-block-list\"><li>\u6309\u91cf\u4ed8\u8d39\uff0c\u9700\u8981\u7684\u65f6\u5019\u5f00\u542f\uff0c\u7f16\u8bd1\u5b8c\u6210\u76f4\u63a5Destory\u5373\u53ef\u505c\u6b62\u6536\u8d39\uff0c\u7279\u522b\u9002\u5408\u8fd9\u79cd\u4e34\u65f6\u7528\u9014<\/li><li>\u53ef\u4ee5\u7075\u6d3b\u8c03\u6574\u914d\u7f6e\uff0c\u5185\u5b58\u592a\u5c0f\u53ef\u80fd\u4f1a\u5bfc\u81f4\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u5931\u8d25\uff0cVultr\u53ef\u4ee5\u968f\u65f6\u8c03\u6574\u914d\u7f6e\u5927\u5c0f\u52a0\u5feb\u7f16\u8bd1\u901f\u5ea6<\/li><li>Vutlr\u7684\u670d\u52a1\u5668\u5728\u56fd\u5916\uff0c\u4e0b\u8f7d\u8f6f\u4ef6\u5305\u53ca\u4eceGithub\u514b\u9686\u6e90\u7801\u7684\u65f6\u5019\u901f\u5ea6\u5feb\uff0c\u4e0d\u50cf\u56fd\u5185\u673a\u5668\uff0c\u76f4\u8fde\u60c5\u51b5\u4e0b\u8981\u4e48\u9f9f\u901f\u8981\u4e48\u5230\u4e00\u534a\u5c31\u65ad\u5f00\u4e86<\/li><li>\u652f\u6301\u521b\u5efa\u5feb\u7167\uff0c\u641e\u5b9a\u7f16\u8bd1\u73af\u5883\u4e4b\u540e\uff0c\u53ef\u4ee5\u6253\u4e2a\u5feb\u7167\uff0c\u4e0b\u6b21\u8f6f\u4ef6\u7248\u672c\u6709\u66f4\u65b0\u7684\u65f6\u5019\u53ef\u4ee5\u66f4\u65b0\u5bf9\u5e94\u7684\u8f6f\u4ef6\u5305\u7136\u540e\u76f4\u63a5\u6253\u5305\uff0c\u7701\u53bb\u914d\u7f6e\u73af\u5883\u7684\u65f6\u95f4<\/li><\/ul>\n\n\n<p>\u6211\u5c31\u662f\u4f7f\u7528\u7684\u662fVultr\u76841\u6838CPU1G\u5185\u5b5825G SSD\u786c\u76d8\u7684\u914d\u7f6e\uff0c\u5efa\u8bae\u5185\u5b58\u4e0d\u8981\u5c0f\u4e8e1G\uff0c\u4e0d\u7136\u53ef\u80fd\u5bfc\u81f4\u7f16\u8bd1\u51fa\u9519\u3002<\/p>\n\n\n<p>\u5173\u4e8eVultr\u7684\u66f4\u591a\u4ecb\u7ecd\uff0c\u53ef\u4ee5\u79fb\u6b65\u8fd9\u91cc\uff1a<a href=\"https:\/\/cloudbool.com\/archive\/vultr.html\">Vultr-\u6708\u4ed82.5\u7f8e\u5143\u8d77\u9ad8\u6027\u4ef7\u6bd4VPS \u65b0\u6ce8\u518c\u8d60\u900150\u7f8e\u5143<\/a><\/p>\n\n\n<h1 class=\"wp-block-heading\">\u6dfb\u52a0Nginx\u53ca\u4e0b\u8f7dNginx\u6e90\u4ee3\u7801<\/h1>\n\n\n<p>\u56e0\u4e3a\u662f\u91cd\u65b0\u6253\u5305\uff0c\u6ca1\u5fc5\u8981\u81ea\u5df1\u53bb\u5199makefile\u7b49\uff0cNginx\u5b98\u65b9\u5df2\u7ecf\u4e3a\u6211\u4eec\u505a\u597d\u4e86\u8fd9\u4e9b\u4e8b\uff0c\u6211\u4eec\u53ea\u9700\u8981\u6dfb\u52a0Nginx\u7684\u8f6f\u4ef6\u6e90\u7136\u540e\u6839\u636e\u6211\u4eec\u7684\u9700\u8981\u4fee\u6539\u5bf9\u5e94\u7684\u6587\u4ef6\uff0c\u5373\u53ef\u65b9\u4fbf\u6253\u5305\u51fa\u6211\u4eec\u6240\u9700\u8981\u7684\u5b89\u88c5\u5305\u3002<\/p>\n\n\n<p>\u9996\u5148\uff0c\u6dfb\u52a0Nginx\u7684\u8f6f\u4ef6\u6e90\u53ca\u5bf9\u5e94\u7684key\u7b49\uff0c\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>apt update\napt upgrade\napt install curl gnupg2 ca-certificates lsb-release\necho \"deb http:\/\/nginx.org\/packages\/debian `lsb_release -cs` nginx\"     | tee \/etc\/apt\/sources.list.d\/nginx.list\necho \"deb-src http:\/\/nginx.org\/packages\/debian `lsb_release -cs` nginx\"     | tee \/etc\/apt\/sources.list.d\/nginx.list\ncurl -fsSL https:\/\/nginx.org\/keys\/nginx_signing.key | apt-key add -\n<\/code><\/pre>\n\n\n<p>\u5230\u8fd9\u4e00\u6b65\u5c31\u5b8c\u6210\u4e86\u6dfb\u52a0Nginx\u5b98\u65b9\u6e90\u7684\u64cd\u4f5c\uff0c\u6ce8\u610f\uff0c\u4e0a\u9762\u6709\u4e24\u884c<strong><em>echo<\/em><\/strong>\uff0c\u7b2c\u4e00\u884c\u662f\u6dfb\u52a0\u6e90\uff0c\u7b2c\u4e8c\u884c\u662f\u52a0\u4e0a\u6e90\u4ee3\u7801\uff0c\u65b9\u4fbf\u540e\u9762\u6211\u4eec\u901a\u8fc7<strong><em>apt-get<\/em><\/strong>\u4e0b\u8f7dNginx\u7684\u6e90\u4ee3\u7801\u3002<\/p>\n\n\n<p>\u56e0\u4e3a\u6211\u66f4\u504f\u5411\u4e8e\u7a33\u5b9a\u7248\uff0c\u6240\u4ee5\u6211\u9009\u62e9\u7684\u662fstable\u7248\uff0c\u5982\u679c\u60f3\u8981\u5c1d\u9c9c\u7684\uff0c\u53ef\u4ee5\u9009\u62e9mainline\u7248\u3002stable\u7248\u76ee\u524d\u7684\u7248\u672c\u53f7\u4f4d1.16.1\u3002<\/p>\n\n\n<p>\u8fd9\u90e8\u4efd\u5185\u5bb9\u53ef\u4ee5\u79fb\u6b65\u8fd9\u91cc\uff0c\u53c2\u8003Nginx\uff1ahttps:\/\/nginx.org\/en\/linux_packages.html<\/p>\n\n\n<h1 class=\"wp-block-heading\">\u914d\u7f6e\u7cfb\u7edf\u73af\u5883<\/h1>\n\n\n<p>\u9996\u5148\uff0c\u5b89\u88c5\u5b98\u65b9\u6e90\u7684Nginx\uff0c\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>apt update\napt install nginx\n<\/code><\/pre>\n\n\n<p>\u7136\u540e\u521b\u5efa\u5bf9\u5e94\u7684\u6587\u4ef6\u5939\uff0c\u53ca\u4e0b\u8f7dNginx\u7684\u6e90\u4ee3\u7801\uff0c\u5e76\u4e14\u5b89\u88c5Nginx\u672c\u8eab\u7684\u4f9d\u8d56\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p ~\/new\/nginx_rebulid\/\ncd ~\/new\/nginx_rebulid\/\napt-get source nginx #\u4f7f\u7528apt-get\u547d\u4ee4\u4e0b\u8f7d\u6e90\u4ee3\u7801\napt-get build-dep nginx #\u5b89\u88c5\u5bf9\u5e94\u7684\u4f9d\u8d56\n<\/code><\/pre>\n\n\n<p>\u4e0a\u9762\u6211Nginx\u7684\u4fdd\u5b58\u76ee\u5f55\u5728<strong>~\/new\/nginx_rebulid\/<\/strong>\u3002<\/p>\n\n\n<p>\u7136\u540e\u5b89\u88c5\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u6240\u9700\u8981\u7684\u7f16\u8bd1\u8f6f\u4ef6\u5305\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>apt install build-essential ca-certificates zlib1g-dev libpcre3 libpcre3-dev tar unzip libssl-dev wget curl git cmake\n<\/code><\/pre>\n\n\n<h1 class=\"wp-block-heading\">\u51c6\u5907\u6240\u8981\u7f16\u8bd1\u7684Nginx\u6a21\u5757<\/h1>\n\n\n<p>\u6211\u8fd9\u91cc\u53ea\u662f\u6839\u636e\u6211\u81ea\u5df1\u6240\u9700\u8981\u7684\u6a21\u5757\u8fdb\u884c\u7f16\u8bd1\uff0c\u5982\u679c\u4f60\u9700\u6c42\u8ddf\u6211\u4e0d\u4e00\u6837\uff0c\u53ef\u4ee5\u6839\u636e\u4f60\u5b9e\u9645\u7684\u60c5\u51b5\u6765\u5904\u7406\u3002<\/p>\n\n\n<p>\u9700\u8981\u8bf4\u660e\u7684\u662f\uff0c\u6211\u559c\u6b22\u628a\u81ea\u5df1\u7684\u6e90\u4ee3\u7801\u653e\u5230<strong>\/usr\/local\/src\/<\/strong>\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u559c\u597d\u6765\u653e\u7f6e\uff0c\u53ea\u8981\u524d\u540e\u8def\u5f84\u4e00\u81f4\u5373\u53ef\u3002<\/p>\n\n\n<p>\u76f8\u5173\u547d\u4ee4\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>cd \/usr\/local\/src\/\ngit clone https:\/\/github.com\/cuber\/ngx_http_google_filter_module #Google\u76f8\u5173\uff0c\u6211\u4e0d\u592a\u65b9\u4fbf\u8bf4\u7528\u6765\u5e72\u561b\u7684\ngit clone https:\/\/github.com\/yaoweibin\/ngx_http_substitutions_filter_module #\u8ddf\u4e0a\u8ff0\u4e00\u6837\ngit clone https:\/\/github.com\/google\/ngx_brotli.git #brolti\nwget http:\/\/labs.frickle.com\/files\/ngx_cache_purge-2.3.tar.gz\ntar zxvf ngx_cache_purge-2.3.tar.gz #purge\u6a21\u5757\ngit clone --recursive https:\/\/github.com\/cloudflare\/quiche #HTTP3\u6a21\u5757\ncd \/usr\/local\/src\/ngx_brotli &amp;&amp; git submodule update --init\ncd \/usr\/local\/src\/ngx_http_google_filter_module &amp;&amp; git checkout -b dev origin\/dev\n<\/code><\/pre>\n\n\n<p>\u60f3\u77e5\u9053\u4e0a\u8ff0\u6a21\u5757\u7684\u5177\u4f53\u7528\u5904\u7684\uff0c\u53ef\u4ee5\u8fdb\u5165\u5bf9\u5e94\u7684\u4e3b\u9875\u8fdb\u884c\u67e5\u770b\uff0c\u6709\u4e9b\u5185\u5bb9\u6211\u4e0d\u592a\u65b9\u4fbf\u8bf4\uff0c\u4f60\u61c2\u7684\u3002<\/p>\n\n\n<h1 class=\"wp-block-heading\">\u4e3aNginx\u7684\u7f16\u8bd1\u51c6\u5907<\/h1>\n\n\n<p>\u5728\u8fdb\u884c\u7f16\u8bd1\u4e4b\u524d\uff0c\u8fd8\u9700\u8981\u505a\u4e00\u4e9b\u51c6\u5907\uff0c\u4e0b\u9762\u662f\u5177\u4f53\u6b65\u9aa4\u3002<\/p>\n\n\n<p>\u4e3aNginx\u6253\u8865\u4e01\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>cd ~\/new\/nginx_rebulid\/nginx-1.16.1\/\npatch -p1 &lt; \/usr\/local\/src\/quiche\/extras\/nginx\/nginx-1.16.patch\n<\/code><\/pre>\n\n\n<p>\u66f4\u6539Nginx\u7684rules\u6587\u4ef6\uff0c\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>vim debian\/rules\n<\/code><\/pre>\n\n\n<p>\u8fd9\u91cc\u8981\u4fee\u6539\u7684\u5176\u5b9e\u5c31\u4e24\u70b9\uff0c\u5c31\u662f\u4e0a\u8ff0\u6587\u4ef6\u7684\u4e24\u4e2a<strong>CFLAGS<\/strong>\u540e\u9762\u7684\u5185\u5bb9\uff0c\u4e0b\u9762\u662f\u6211\u6839\u636e\u5b9e\u9645\u9700\u6c42\u4fee\u6539\u4e4b\u540e\u7684<strong>\u90e8\u5206<\/strong>\u6587\u4ef6\u5185\u5bb9\uff0c\u5982\u679c\u4e0d\u77e5\u9053\u600e\u4e48\u4fee\u6539\u7684\uff0c\u53ef\u4ee5\u53c2\u8003\u4e0b\u6211\u7684\uff0c\u6ce8\u610f\uff0c\u8fd9\u53ea\u662f\u90e8\u5206\u5185\u5bb9\uff0c\u4e0d\u80fd\u5220\u9664\u522b\u7684\u5185\u5bb9\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>config.status.nginx: config.env.nginx\n        cd $(BUILDDIR_nginx) &amp;&amp; \\\n        CFLAGS=\"\" .\/configure --prefix=\/etc\/nginx --sbin-path=\/usr\/sbin\/nginx --modules-path=\/usr\/lib\/nginx\/modules --conf-path=\/etc\/nginx\/nginx.conf --error-log-path=\/var\/log\/nginx\/error.log --http-log-path=\/var\/log\/nginx\/access.log --pid-path=\/var\/run\/nginx.pid --lock-path=\/var\/run\/nginx.lock --http-client-body-temp-path=\/var\/cache\/nginx\/client_temp --http-proxy-temp-path=\/var\/cache\/nginx\/proxy_temp --http-fastcgi-temp-path=\/var\/cache\/nginx\/fastcgi_temp --http-uwsgi-temp-path=\/var\/cache\/nginx\/uwsgi_temp --http-scgi-temp-path=\/var\/cache\/nginx\/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_realip_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --add-module=\/usr\/local\/src\/ngx_http_google_filter_module --add-module=\/usr\/local\/src\/ngx_http_substitutions_filter_module  --add-module=\/usr\/local\/src\/ngx_brotli --with-http_v3_module --with-openssl=\/usr\/local\/src\/quiche\/deps\/boringssl --with-quiche=\/usr\/local\/src\/quiche --add-module=\/usr\/local\/src\/ngx_cache_purge-2.3\n        touch $@\nconfig.status.nginx_debug: config.env.nginx_debug\n        cd $(BUILDDIR_nginx_debug) &amp;&amp; \\\n        CFLAGS=\"\" .\/configure --prefix=\/etc\/nginx --sbin-path=\/usr\/sbin\/nginx --modules-path=\/usr\/lib\/nginx\/modules --conf-path=\/etc\/nginx\/nginx.conf --error-log-path=\/var\/log\/nginx\/error.log --http-log-path=\/var\/log\/nginx\/access.log --pid-path=\/var\/run\/nginx.pid --lock-path=\/var\/run\/nginx.lock --http-client-body-temp-path=\/var\/cache\/nginx\/client_temp --http-proxy-temp-path=\/var\/cache\/nginx\/proxy_temp --http-fastcgi-temp-path=\/var\/cache\/nginx\/fastcgi_temp --http-uwsgi-temp-path=\/var\/cache\/nginx\/uwsgi_temp --http-scgi-temp-path=\/var\/cache\/nginx\/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_realip_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --add-module=\/usr\/local\/src\/ngx_http_google_filter_module --add-module=\/usr\/local\/src\/ngx_http_substitutions_filter_module  --add-module=\/usr\/local\/src\/ngx_brotli --with-http_v3_module --with-openssl=\/usr\/local\/src\/quiche\/deps\/boringssl --with-quiche=\/usr\/local\/src\/quiche --add-module=\/usr\/local\/src\/ngx_cache_purge-2.3 --with-debug\n        touch $@\n<\/code><\/pre>\n\n\n<p>\u4fee\u6539\u5b8c\u4e86\u4e4b\u540e\uff0c\u5f53\u524d\u76ee\u5f55\u4e0b\u9762\u6267\u884c\u4e0b\u5217\u547d\u4ee4\u5373\u53ef\u5f00\u59cb\u8fdb\u884c\u7f16\u8bd1\u53ca\u6253\u5305\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>dpkg-buildpackage -b\n<\/code><\/pre>\n\n\n<p>\u5982\u679c\u8fc7\u7a0b\u6ca1\u6709\u95ee\u9898\uff0c\u5e94\u8be5\u80fd\u5728<strong>~\/new\/nginx_rebulid<\/strong>\u76ee\u5f55\u751f\u6210\u4e24\u4e2adeb\u5305\uff0c\u6bd4\u5982\u6211\u8fd9\u91cc\u751f\u6210\u7684\u662f<strong>nginx_1.16.1-1~buster_amd64.deb<\/strong>\u548c<strong>nginx-dbg_1.16.1-1~buster_amd64.deb<\/strong>\uff0c\u4e24\u4e2a\u90fd\u53ef\u4ee5\u76f4\u63a5\u5b89\u88c5\uff0c\u6211\u662f\u5efa\u8bae\u6b63\u5f0f\u73af\u5883\u5b89\u88c5\u524d\u8005\u3002<\/p>\n\n\n<p>\u5230\u8fd9\u4e00\u6b65\uff0c\u5373\u53ef\u628a\u751f\u6210\u7684deb\u5b89\u88c5\u5305\u968f\u610f\u590d\u5236\u5230\u522b\u7684\u673a\u5668\u6bd4\u5982\u8bf4\u751f\u4ea7\u670d\u52a1\u5668\u8fdb\u884c\u5b89\u88c5\uff0c\u5b89\u88c5\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>dpkg -i nginx_1.16.1-1~buster_amd64.deb\n<\/code><\/pre>\n\n\n<p>\u76f8\u5173\u8f93\u51fa\u5982\u4e0b\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>root@cloudbool:~# dpkg -i nginx_1.16.1-1~buster_amd64.deb\nSelecting previously unselected package nginx.\n(Reading database ... 31466 files and directories currently installed.)\nPreparing to unpack nginx_1.16.1-1~buster_amd64.deb ...\n----------------------------------------------------------------------\nThanks for using nginx!\nPlease find the official documentation for nginx here:\n* http:\/\/nginx.org\/en\/docs\/\nPlease subscribe to nginx-announce mailing list to get\nthe most important news about nginx:\n* http:\/\/nginx.org\/en\/support.html\nCommercial subscriptions for nginx are available on:\n* http:\/\/nginx.com\/products\/\n----------------------------------------------------------------------\nUnpacking nginx (1.16.1-1~buster) ...\nSetting up nginx (1.16.1-1~buster) ...\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/nginx.service \u2192 \/lib\/systemd\/system\/nginx.service.\nProcessing triggers for systemd (241-7~deb10u2) ...\nProcessing triggers for man-db (2.8.5-2) ...\n<\/code><\/pre>\n\n\n<p>\u5982\u679c\u7f16\u8bd1\u6253\u5305\u8fc7\u7a0b\u51fa\u9519\uff0c\u90a3\u5efa\u8bae\u6839\u636e\u5b9e\u9645\u7684\u9519\u8bef\u4fe1\u606f\u8fdb\u884c\u4e00\u6b65\u6b65\u8c03\u8bd5\uff0c\u5c31\u6211\u9047\u5230\u7684\u95ee\u9898\u6765\u8bf4\uff0c\u8981\u4e48\u662f\u6a21\u5757\u6ca1\u6709\u521d\u59cb\u5316\uff0c\u8981\u4e48\u5c31\u662frust\u6216\u8005cargo\u7248\u672c\u51fa\u73b0\u4e86\u95ee\u9898\uff0c\u6839\u636e\u9519\u8bef\u6392\u9664\u5373\u53ef\u3002<\/p>\n\n\n<h1 class=\"wp-block-heading\">\u62a5\u9519<\/h1>\n\n\n<p>\u672c\u9879\u76ee\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u53ef\u80fd\u4f1a\u9047\u5230\u7c7b\u4f3c\u5982\u4e0b\u62a5\u9519\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>cd \/usr\/local\/src\/quiche &amp;&amp; cargo build --release --no-default-features --features ffi\n   Compiling quiche v0.6.0 (\/usr\/local\/src\/quiche)\nerror: attributes are not yet allowed on `if` expressions\n    --&gt; src\/lib.rs:2700:13\n     |\n2700 |             #&#91;allow(unused_assignments)]\n     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nerror: aborting due to previous error\nerror: could not compile `quiche`.\nTo learn more, run the command again with --verbose.\nmake&#91;2]: *** &#91;objs\/Makefile:2137: \/usr\/local\/src\/quiche\/target\/release\/libquiche.a] Error 101\nmake&#91;2]: Leaving directory '\/root\/new\/nginx_rebulid\/nginx-1.16.1\/debian\/build-nginx'\nmake&#91;1]: *** &#91;Makefile:8: build] Error 2\nmake&#91;1]: Leaving directory '\/root\/new\/nginx_rebulid\/nginx-1.16.1\/debian\/build-nginx'\nmake: *** &#91;debian\/rules:52: build-arch.nginx] Error 2\ndpkg-buildpackage: error: debian\/rules build subprocess returned exit status 2<\/code><\/pre>\n\n\n<p>\u5982\u679c\u9047\u5230\u8fd9\u4e2a\u95ee\u9898\uff0c\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e24\u4e2a\u547d\u4ee4\u624b\u52a8\u5b89\u88c5rust\uff0c\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>curl --proto '=https' --tlsv1.2 -sSf https:\/\/sh.rustup.rs | sh\nsource $HOME\/.cargo\/env<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5bf9\u4e8e\u4e00\u4e2a\u8ffd\u6c42\u8f6f\u4ef6\u65b0\u7248\u672c\u53ca\u559c\u6b22\u6298\u817e\u7684\u4eba\u6765\u8bf4\uff0c\u6bcf\u6b21\u6709\u4e86\u65b0\u7248\u672c\u4e0d\u5347\u7ea7\u5230\u6700\u65b0\u7684\u7248\u672c\u603b\u662f\u6709\u70b9\u4e0d\u8212\u670d\uff0c\u4e00\u8f6c\u773cDebian  &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/cloudbool.com\/archive\/debian-10-build-nginx-add-google-brotli-purge-http3.html\"> <span class=\"screen-reader-text\">Debian 10\u91cd\u65b0\u6253\u5305Nginx\uff0c\u65b0\u589eGoogle\u3001Purge\u3001Brotli\u53caHTTP3\u7b49\u6a21\u5757<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"categories":[8],"tags":[145,158,76],"class_list":["post-581","post","type-post","status-publish","format-standard","hentry","category-tech","tag-brotli","tag-http3","tag-nginx"],"_links":{"self":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts\/581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/comments?post=581"}],"version-history":[{"count":0,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts\/581\/revisions"}],"wp:attachment":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/media?parent=581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/categories?post=581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/tags?post=581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}