Skip to content

Instantly share code, notes, and snippets.

@haipeng
Created April 8, 2018 03:12
Show Gist options
  • Save haipeng/8dc508a942afbe9561fda8f2a18c2d29 to your computer and use it in GitHub Desktop.
Save haipeng/8dc508a942afbe9561fda8f2a18c2d29 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -e
pcre_version="8.42"
zlib_version="1.2.11"
openssl_version="1.0.2n"
nginx_version="1.12.2"
source_path=/usr/local/src
yum -y install gcc automake autoconf libtool make
yum install gcc gcc-c++
cd ${source_path}
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${pcre_version}.tar.gz
tar -zxvf pcre-${pcre_version}.tar.gz
cd pcre-${pcre_version}
./configure
make
make install
cd ${source_path}
wget http://zlib.net/zlib-${zlib_version}.tar.gz
tar -zxvf zlib-${zlib_version}.tar.gz
cd zlib-${zlib_version}
./configure
make
make install
cd ${source_path}
wget http://www.openssl.org/source/openssl-${openssl_version}.tar.gz
tar -zxvf openssl-${openssl_version}.tar.gz
cd ${source_path}
wget http://nginx.org/download/nginx-${nginx_version}.tar.gz
tar -zxvf nginx-${nginx_version}.tar.gz
cd nginx-${nginx_version}
./configure --sbin-path=/usr/local/nginx/nginx \
--conf-path=/usr/local/nginx/nginx.conf \
--pid-path=/usr/local/nginx/nginx.pid \
--with-http_ssl_module \
--with-pcre=${source_path}/pcre-${pcre_version} \
--with-zlib=${source_path}/zlib-${zlib_version} \
--with-openssl=${source_path}/openssl-${openssl_version}
make
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment