First step: Install all the packages you use first
Install GCC Make libxml2-dev libxslt-dev libgd-dev libgeoip-Dev libgoogle-perftools-dev libatomic-ops-dev Libperl-dev
Step two: Download and unzip nginx-1.10.2.tar.gz
wget http://nginx.org/download/nginx-1.10.2.tar.gztar zxvf nginx-1.10 . 2. tar. gz
Step Three: Configure
./Configure--with-Select_module--with-Poll_module--with-Threads--with-file-AIO--with-IPv6--with-Http_ssl_module--with-Http_v2_module--with-Http_realip_module--with-Http_addition_module--with-Http_xslt_module--with-Http_xslt_module--with-Http_image_filter_module--with-Http_image_filter_module--with-Http_geoip_module--with-Http_geoip_module--with-Http_sub_module--with-Http_dav_module--with-Http_flv_module--with-Http_mp4_module--with-Http_gunzip_module--with-Http_gzip_static_module--with-Http_auth_request_module--with-Http_random_index_module--with-Http_secure_link_module--with-Http_degradation_module--with-Http_slice_module--with-Http_stub_status_module--with-Http_perl_module--with-Mail--with-Mail_ssl_module--with-Stream--with-Stream--with-Stream_ssl_module--with-Google_perftools_module--with-Cpp_test_module--with-Pcre--with-libatomic \
It's all contained.
Final make && make install done
Ubuntu16 Compile and install nginx-1.10.2 (full) fully self-equipped components