Last active
August 3, 2018 03:04
-
-
Save Micka33/9217466 to your computer and use it in GitHub Desktop.
Download/install Nginx +some convenient modules (rtmp/lua5.1/upstream-fair/ssl/etc) on Ubuntu
This file contains 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
wget http://nginx.org/download/nginx-1.4.5.tar.gz | |
tar xzf nginx-1.4.5.tar.gz | |
wget http://zlib.net/zlib-1.2.8.tar.gz | |
tar xzf zlib-1.2.8.tar.gz | |
wget http://downloads.sourceforge.net/project/pcre/pcre/8.34/pcre-8.34.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fpcre%2Ffiles%2Fpcre%2F8.34%2F&ts=1393362418&use_mirror=kent | |
mv pcre-8.34.tar.bz2\?r\=http\:%2F%2Fsourceforge.net%2Fprojects%2Fpcre%2Ffiles%2Fpcre%2F8.34%2F pcre-8.34.tar.bz2 | |
tar xjf pcre-8.34.tar.bz2 | |
wget https://github.com/simpl/ngx_devel_kit/archive/v0.2.19.zip | |
unzip v0.2.19.zip | |
wget https://github.com/chaoslawful/lua-nginx-module/archive/v0.9.5rc2.zip | |
unzip v0.9.5rc2.zip | |
git clone http://github.com/wandenberg/nginx-push-stream-module.git | |
wget https://github.com/vkholodkov/nginx-upload-module/archive/2.2.zip | |
unzip 2.2.zip | |
wget https://github.com/masterzen/nginx-upload-progress-module/archive/master.zip | |
unzip master.zip | |
wget https://github.com/gnosek/nginx-upstream-fair/archive/master.zip | |
unzip master.zip.1 | |
wget https://github.com/arut/nginx-rtmp-module/archive/master.zip | |
unzip master.zip.2 | |
This file contains 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
cd nginx-1.4.5 | |
#lua-nginx-module is yet not compatible with lua5.2 | |
aptitude install liblua5.1-dev | |
#nginx_configure is looking for a liblua.so file. So we create a symbolic link for it. | |
ln -s /usr/lib/x86_64-linux-gnu/liblua5.1.so /usr/lib/x86_64-linux-gnu/liblua.so | |
# tell nginx's build system where to find Lua: | |
export LUA_LIB=/usr/lib/x86_64-linux-gnu/ | |
export LUA_INC=/usr/include/lua5.1/ | |
aptitude install libxml2 libxml2-dev | |
aptitude install libxslt libxslt-dev | |
aptitude install libgd2-xpm-dev | |
aptitude install libgeoip-dev | |
aptitude install libperl-dev | |
#needed to stream content | |
aptitude install ffmpeg | |
aptitude install libfaac-dev | |
aptitude install libx264-dev | |
aptitude install libmp3lame-dev | |
aptitude install mkvtoolnix | |
aptitude install gpac | |
./configure \ | |
--prefix=/usr/share/nginx \ | |
--conf-path=/etc/nginx/nginx.conf \ | |
--error-log-path=/var/log/nginx/error.log \ | |
--http-client-body-temp-path=/var/lib/nginx/body \ | |
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \ | |
--http-log-path=/var/log/nginx/access.log \ | |
--http-proxy-temp-path=/var/lib/nginx/proxy \ | |
--http-scgi-temp-path=/var/lib/nginx/scgi \ | |
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi \ | |
--lock-path=/var/lock/nginx.lock \ | |
--pid-path=/run/nginx.pid \ | |
--with-pcre-jit \ | |
--with-debug \ | |
--with-http_addition_module \ | |
--with-http_dav_module \ | |
--with-http_flv_module \ | |
--with-http_geoip_module \ | |
--with-http_gzip_static_module \ | |
--with-http_image_filter_module \ | |
--with-http_mp4_module \ | |
--with-http_perl_module \ | |
--with-http_random_index_module \ | |
--with-http_realip_module \ | |
--with-http_secure_link_module \ | |
--with-http_stub_status_module \ | |
--with-http_ssl_module \ | |
--with-http_sub_module \ | |
--with-http_xslt_module \ | |
--with-ipv6 \ | |
--with-sha1=/usr/include/openssl \ | |
--with-md5=/usr/include/openssl \ | |
--with-mail \ | |
--with-mail_ssl_module \ | |
--with-http_spdy_module \ | |
--with-pcre=`pwd`/../pcre-8.34 \ | |
--with-zlib=`pwd`/../zlib-1.2.8 \ | |
--add-module=`pwd`/../lua-nginx-module-0.9.5rc2 \ | |
--add-module=`pwd`/../nginx-push-stream-module \ | |
--add-module=`pwd`/../nginx-upload-module-2.2 \ | |
--add-module=`pwd`/../nginx-upload-progress-module-master \ | |
--add-module=`pwd`/../nginx-upstream-fair-master \ | |
--add-module=`pwd`/../nginx-rtmp-module-master \ | |
--add-module=`pwd`/../ngx_devel_kit-0.2.19 | |
make | |
sudo make install | |
#linking the binary to the bin directory | |
ln -s `pwd`/objs/nginx /bin/nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment