Tips / Nginx

How to install OpenResty

OpenResty, also called “ngx_openresty”, is a web application server based on the Nginx core, it also contains lot of 3rd party Nginx modules and most of its system dependencies. OpenResty is not an Nginx fork, it’s just a software bundle. It has been mostly maintained by Yichun Zhang‎ and since 2011 it has been supported by CloudFlare.

Why OpenResty?

According to it’s author, OpenResty allows developers to build high-performance web applications using Lua programming language to script existing Nginx C modules, ideal to support high traffic apps.

Install OpenResty

Software requirements

  • perl 5.6.1+
  • libreadline
  • libpcre
  • libssl

Linux systems: ensure that ldconfig is in your PATH environment.

For Debian and Ubuntu distributions:

apt-get install libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl make

For Fedora and RedHat distributions:

yum install readline-devel pcre-devel openssl-devel

For FreeBSD users

You need to install the following ports:


Download OpenResty

Go to and get the lastest version. At this time, this is the last version:


Untar, build and install OpenResty

tar xzvf ngx_openresty-
cd ngx_openresty-
./configure --with-luajit
make install

Available configure options:

./configure --prefix=/opt/openresty 
--help to see more options

Need more information about OpenResty?

Official website:
Agentzh Github:

Popular search terms:

  • openresty
  • arm ngx_openresty
  • HowtoinstallOpenResty|NginxTips
  • install openresty

Esteban Borges

Linux Geek, Webperf Addict, Nginx Fan. CTO @Infranetworking