{"id":3315,"date":"2015-06-19T20:58:18","date_gmt":"2015-06-19T19:58:18","guid":{"rendered":"https:\/\/blog.ed.gs\/?p=3315"},"modified":"2015-06-19T20:58:18","modified_gmt":"2015-06-19T19:58:18","slug":"add-build-options-to-nginx-via-apt-get-ubuntu","status":"publish","type":"post","link":"https:\/\/ed.gs\/2015\/06\/19\/add-build-options-to-nginx-via-apt-get-ubuntu\/","title":{"rendered":"Add Build Options To Nginx Via Apt-Get Ubuntu"},"content":{"rendered":"

These instructions aren’t mine, but are a slightly modified version of the ones listed on serverfault.com<\/a> thanks to cwd<\/a> as a reminder for myself with upcoming Nginx updates.<\/p>\n

CD to a location you’re happy to work in with the source files:<\/p>\n

cd /usr/src<\/pre>\n

Install dpkg-dev:<\/p>\n

sudo apt-get install dpkg-dev<\/pre>\n

Add repository:<\/p>\n

sudo add-apt-repository ppa:nginx/stable<\/pre>\n

Edit \/etc\/apt\/sources.list.d\/nginx-stable-*.list, add uncomment dpkg-src:<\/p>\n

deb-src http://ppa.launchpad.net/nginx/stable/ubuntu release-name-here main<\/pre>\n

note: (the previous step may have already been automatically performed on Ubuntu >= 12.04 – also make sure that you change release-name-here to reflect your version, the most important part is to uncomment the deb-src field as it will use that to download the source in the upcoming step)<\/p>\n

Resynchronize the package index files:<\/p>\n

sudo apt-get update<\/pre>\n

Get sources:<\/p>\n

apt-get source nginx<\/pre>\n

Build dependencies:<\/p>\n

sudo apt-get build-dep nginx<\/pre>\n

Edit nginx-*(version-here)\/debian\/rules (update the section you want to install, be it light\/full\/common e.g. extras_configure_flags :=):<\/p>\n

--with-threads<\/pre>\n

Build package:<\/p>\n

cd nginx-*(version-here) && dpkg-buildpackage -b<\/pre>\n

Install packages (change the deb version and OS name as needed):<\/p>\n

dpkg --install nginx-common_1.2.4-2ubuntu0ppa1~precise_all.deb\ndpkg --install nginx-full_1.2.4-2ubuntu0ppa1~precise_amd64.deb<\/pre>\n","protected":false},"excerpt":{"rendered":"

These instructions aren’t mine, but are a slightly modified version of the ones listed on serverfault.com thanks to cwd as a reminder for myself with upcoming Nginx updates. CD to a location you’re happy to work in with the source files: cd /usr/src Install dpkg-dev: sudo apt-get install dpkg-dev Add repository: sudo add-apt-repository ppa:nginx/stable Edit […]<\/p>\n","protected":false},"author":2,"featured_media":3404,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false},"categories":[13,28,32,41,46],"tags":[],"yoast_head":"\nAdd Build Options To Nginx Via Apt-Get Ubuntu - E<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ed.gs\/2015\/06\/19\/add-build-options-to-nginx-via-apt-get-ubuntu\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Add Build Options To Nginx Via Apt-Get Ubuntu - E\" \/>\n<meta property=\"og:description\" content=\"These instructions aren’t mine, but are a slightly modified version of the ones listed on serverfault.com thanks to cwd as a reminder for myself with upcoming Nginx updates. CD to a location you’re happy to work in with the source files: cd /usr/src Install dpkg-dev: sudo apt-get install dpkg-dev Add repository: sudo add-apt-repository ppa:nginx/stable Edit […]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ed.gs\/2015\/06\/19\/add-build-options-to-nginx-via-apt-get-ubuntu\/\" \/>\n<meta property=\"og:site_name\" content=\"E\" \/>\n<meta property=\"article:published_time\" content=\"2015-06-19T19:58:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/static.ed.gs\/wp-content\/uploads\/2015\/06\/pexels-photo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2048\" \/>\n\t<meta property=\"og:image:height\" content=\"1365\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ed\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ed\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ed.gs\/2015\/06\/19\/add-build-options-to-nginx-via-apt-get-ubuntu\/\",\"url\":\"https:\/\/ed.gs\/2015\/06\/19\/add-build-options-to-nginx-via-apt-get-ubuntu\/\",\"name\":\"Add Build Options To Nginx Via Apt-Get Ubuntu - E\",\"isPartOf\":{\"@id\":\"https:\/\/ed.gs\/#website\"},\"datePublished\":\"2015-06-19T19:58:18+00:00\",\"dateModified\":\"2015-06-19T19:58:18+00:00\",\"author\":{\"@id\":\"https:\/\/ed.gs\/#\/schema\/person\/d775615f2296ad0129fa3ea66346c628\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ed.gs\/2015\/06\/19\/add-build-options-to-nginx-via-apt-get-ubuntu\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ed.gs\/#website\",\"url\":\"https:\/\/ed.gs\/\",\"name\":\"E\",\"description\":\"automation, consultancy, project management, web\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ed.gs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/ed.gs\/#\/schema\/person\/d775615f2296ad0129fa3ea66346c628\",\"name\":\"Ed\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/ed.gs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4fe1dfaed09e6bdceb557d3008f5cc47?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4fe1dfaed09e6bdceb557d3008f5cc47?s=96&d=mm&r=g\",\"caption\":\"Ed\"},\"url\":\"https:\/\/ed.gs\/author\/ed\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Add Build Options To Nginx Via Apt-Get Ubuntu - E","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ed.gs\/2015\/06\/19\/add-build-options-to-nginx-via-apt-get-ubuntu\/","og_locale":"en_GB","og_type":"article","og_title":"Add Build Options To Nginx Via Apt-Get Ubuntu - E","og_description":"These instructions aren’t mine, but are a slightly modified version of the ones listed on serverfault.com thanks to cwd as a reminder for myself with upcoming Nginx updates. CD to a location you’re happy to work in with the source files: cd /usr/src Install dpkg-dev: sudo apt-get install dpkg-dev Add repository: sudo add-apt-repository ppa:nginx/stable Edit […]","og_url":"https:\/\/ed.gs\/2015\/06\/19\/add-build-options-to-nginx-via-apt-get-ubuntu\/","og_site_name":"E","article_published_time":"2015-06-19T19:58:18+00:00","og_image":[{"width":2048,"height":1365,"url":"https:\/\/static.ed.gs\/wp-content\/uploads\/2015\/06\/pexels-photo.jpg","type":"image\/jpeg"}],"author":"Ed","twitter_misc":{"Written by":"Ed","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/ed.gs\/2015\/06\/19\/add-build-options-to-nginx-via-apt-get-ubuntu\/","url":"https:\/\/ed.gs\/2015\/06\/19\/add-build-options-to-nginx-via-apt-get-ubuntu\/","name":"Add Build Options To Nginx Via Apt-Get Ubuntu - E","isPartOf":{"@id":"https:\/\/ed.gs\/#website"},"datePublished":"2015-06-19T19:58:18+00:00","dateModified":"2015-06-19T19:58:18+00:00","author":{"@id":"https:\/\/ed.gs\/#\/schema\/person\/d775615f2296ad0129fa3ea66346c628"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ed.gs\/2015\/06\/19\/add-build-options-to-nginx-via-apt-get-ubuntu\/"]}]},{"@type":"WebSite","@id":"https:\/\/ed.gs\/#website","url":"https:\/\/ed.gs\/","name":"E","description":"automation, consultancy, project management, web","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ed.gs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/ed.gs\/#\/schema\/person\/d775615f2296ad0129fa3ea66346c628","name":"Ed","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/ed.gs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4fe1dfaed09e6bdceb557d3008f5cc47?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4fe1dfaed09e6bdceb557d3008f5cc47?s=96&d=mm&r=g","caption":"Ed"},"url":"https:\/\/ed.gs\/author\/ed\/"}]}},"_links":{"self":[{"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/posts\/3315"}],"collection":[{"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/comments?post=3315"}],"version-history":[{"count":0,"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/posts\/3315\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/media\/3404"}],"wp:attachment":[{"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/media?parent=3315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/categories?post=3315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/tags?post=3315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}