Skip to content

Instantly share code, notes, and snippets.

@binhqd
Last active January 4, 2018 01:23
Show Gist options
  • Save binhqd/ee9c3087aa40f815508220d42022c388 to your computer and use it in GitHub Desktop.
Save binhqd/ee9c3087aa40f815508220d42022c388 to your computer and use it in GitHub Desktop.
Setup OpenResty
# switch to root user
sudo su
# Download openresty 1.13.6
cd /tmp
wget https://openresty.org/download/openresty-1.13.6.1.tar.gz
tar -xvf openresty-1.13.6.1.tar.gz
#install necessary libs
apt-get install build-essential libxslt1-dev libxml2-dev libgd2-xpm-dev libgeoip-dev libgoogle-perftools-dev libperl-dev libpng-dev zlib1g-dev
#install lib PCRE
apt-get install libpcre3 libpcre3-dev
#install latest OpenSSL
cd /tmp
wget https://www.openssl.org/source/openssl-1.0.2n.tar.gz
tar -xvf openssl-1.0.2n.tar.gz
cd openssl-1.0.2n
./config --prefix=/usr/
make
make install
cd /tmp/openresty-1.13.6.1
./configure --prefix=/opt/openresty-1.13.6 -j4 --with-http_image_filter_module
make
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment