Last active
March 27, 2018 08:07
-
-
Save bcambel/ea697c60ff8f45312745959ec6938785 to your computer and use it in GitHub Desktop.
Open Resty Install script on Ubuntu 16.04
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.11.2.2" | |
wget https://openresty.org/download/openresty-${VERSION}.tar.gz | |
wget https://openresty.org/download/openresty-${VERSION}.tar.gz.asc | |
gpg --keyserver pgpkeys.mit.edu --recv-key A0E98066 | |
gpg openresty-${VERSION}.tar.gz.asc | |
gpg openresty-${VERSION}.tar.gz.asc | |
tar -xvf openresty-${VERSION} | |
cd openresty-${VERSION} | |
sudo apt-get install build-essential libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl -y | |
./configure -j2 --with-pcre-jit --with-ipv6 | |
make -j2 | |
sudo make install | |
sudo ufw allow http | |
cat > /usr/local/openresty/nginx/conf/nginx.conf <<- EOM | |
user www-data; | |
worker_processes auto; | |
pid /run/openresty.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay on; | |
keepalive_timeout 65; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE | |
ssl_prefer_server_ciphers on; | |
access_log /var/log/openresty/access.log; | |
error_log /var/log/openresty/error.log; | |
gzip on; | |
gzip_disable "msie6"; | |
include ../sites/*; | |
} | |
EOM | |
sudo mkdir /var/log/openresty | |
sudo systemctl daemon-reload | |
sudo systemctl start openresty | |
sudo systemctl enable openresty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
wget https://openresty.org/download/openresty-${VERSION}.tar.gz
gives the following error