Last active
August 29, 2015 14:25
-
-
Save sysulq/5a7eef2a1fbdc0a89d9b to your computer and use it in GitHub Desktop.
install nginx
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
#!/bin/bash | |
version=1.9.3 | |
rtmpVersion=1.1.7 | |
pcreVersion=8.37 | |
if [ ! -e "nginx-$version.tar.gz" ]; then | |
wget http://nginx.org/download/nginx-$version.tar.gz | |
fi | |
if [ ! -d "nginx-$version" ]; then | |
tar xf nginx-$version.tar.gz | |
fi | |
if [ ! -e "v$rtmpVersion.tar.gz" ]; then | |
wget https://github.com/arut/nginx-rtmp-module/archive/v$rtmpVersion.tar.gz | |
fi | |
if [ ! -d "nginx-rtmp-module-$rtmpVersion" ]; then | |
tar xf v$rtmpVersion.tar.gz | |
fi | |
if [ ! -e "pcre-$pcreVersion.tar.gz" ]; then | |
wget http://jaist.dl.sourceforge.net/project/pcre/pcre/$pcreVersion/pcre-$pcreVersion.tar.gz | |
fi | |
if [ ! -d "pcre-$pcreVersion" ]; then | |
tar xf pcre-$pcreVersion.tar.gz | |
fi | |
cd nginx-$version/ \ | |
&& ./configure --prefix=/opt/nginx\ | |
--add-module=../nginx-rtmp-module-$rtmpVersion \ | |
--with-pcre=../pcre-$pcreVersion \ | |
--with-pcre-jit \ | |
--with-debug \ | |
&& make -j2 && sudo make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment