Last active
September 22, 2017 14:54
-
-
Save giupo/73ac8fc24fe6fe8eac569ea7e6179c2f to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
PREFIX=`pwd`/repec | |
export CFLAGS="-I${PREFIX}/include" | |
export CXXFLAGS="-I${PREFIX}/include" | |
NCPU=`grep -c ^processor /proc/cpuinfo` | |
if [ ! -d "$(pwd)/pcre-8.4.1" ]; then | |
wget https://ftp.pcre.org/pub/pcre/pcre-8.41.tar.gz | |
tar xf pcre-8.41.tar.gz | |
cd pcre-8.41 | |
./configure --prefix=$PREFIX | |
LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH make -j $NCPU | |
LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH make install | |
cd .. | |
fi | |
if [ ! -d "$(pwd)/zlib-1.2.11" ]; then | |
wget http://zlib.net/zlib-1.2.11.tar.gz | |
tar xf zlib-1.2.11.tar.gz | |
cd zlib-1.2.11 | |
./configure --prefix=$PREFIX | |
LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH make -j $NCPU | |
LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH make install | |
cd .. | |
fi | |
if [ ! -d "$(pwd)/openssl-1.0.2k" ]; then | |
wget http://www.openssl.org/source/openssl-1.0.2k.tar.gz | |
tar -zxf openssl-1.0.2k.tar.gz | |
cd openssl-1.0.2k | |
./config --prefix=$PREFIX | |
LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH make -j $NCPU | |
LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH make install | |
cd .. | |
fi | |
if [ ! -d "$(pwd)/nginx-1.13.5" ]; then | |
wget http://nginx.org/download/nginx-1.13.5.tar.gz | |
tar xf nginx-1.13.5.tar.gz | |
cd nginx-1.13.5 | |
./configure --prefix=$PREFIX \ | |
--sbin-path=$PREFIX/nginx/nginx \ | |
--conf-path=$PREFIX/nginx/nginx.conf \ | |
--pid-path=$PREFIX/nginx/nginx.pid \ | |
--with-pcre=../pcre-8.41 \ | |
--with-zlib=../zlib-1.2.11 \ | |
--with-openssl=../openssl-1.0.2k \ | |
--with-http_ssl_module \ | |
--with-stream \ | |
--with-mail=dynamic | |
LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH make -j $NCPU | |
LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH make install | |
cd .. | |
fi | |
if [ ! -d "$(pwd)/Python-3.6.2" ]; then | |
wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xz | |
tar xf Python-3.6.2.tar.xz | |
cd Python-3.6.2 | |
./configure --prefix=$PREFIX | |
LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH make -j $NCPU | |
LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH make install | |
cd .. | |
fi | |
export PATH=$PREFIX/bin:$PATH | |
pip3 install uwsgi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment