Last active
March 14, 2016 04:38
-
-
Save masbog/11290603 to your computer and use it in GitHub Desktop.
nginx-http_secure_link_module.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Nginx can serve FLV/MP4 files by pseudo-streaming way without any specific media-server software. | |
| # To do the custom build we use 2 modules: --with-http_secure_link_module --with-http_flv_module | |
| # This module "secure-link" helps you to protect links from stealing away. | |
| # | |
| # NOTE: this update latest version of nginx and pcre | |
| # this source from https://gist.github.com/mikhailov/3174601#file-0-nginx_setup-sh | |
| # and update by MasBog | |
| cd /usr/src && | |
| yum groupinstall 'Development Tools' -y && | |
| yum install zlib zlib-devel -y && | |
| curl -O http://nginx.org/download/nginx-1.9.9.tar.gz && | |
| tar xzvf ./nginx-1.9.9.tar.gz && rm -f ./nginx-1.9.9.tar.gz && | |
| curl -O http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz && | |
| tar xzvf pcre-8.38.tar.gz && rm -f ./pcre-8.38.tar.gz && | |
| curl -O http://www.openssl.org/source/openssl-1.0.1s.tar.gz && | |
| tar xzvf openssl-1.0.1s.tar.gz && rm -f openssl-1.0.1s.tar.gz && | |
| git clone https://github.com/FRiCKLE/ngx_cache_purge && | |
| git clone https://github.com/pagespeed/ngx_pagespeed && cd /usr/src/ngx_pagespeed/ && | |
| curl -O https://dl.google.com/dl/page-speed/psol/1.8.31.4.tar.gz && tar xzvf 1.8.31.4.tar.gz && rm -f 1.8.31.4.tar.gz && cd /usr/src/ && | |
| cd nginx-1.9.9 && ./configure --user=www-data --group=www-data --prefix=/opt/nginx --with-pcre=/usr/src/pcre-8.38 --with-openssl-opt=no-krb5 --with-openssl=/usr/src/openssl-1.0.1s --with-http_ssl_module --without-mail_pop3_module --without-mail_smtp_module --without-mail_imap_module --with-http_stub_status_module --with-http_secure_link_module --with-http_flv_module --with-http_mp4_module --add-module=/usr/src/ngx_cache_purge --add-module=/usr/src/ngx_pagespeed && | |
| make && make install |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
update with latest...