How To Install Openresty on CentOS 7/8

Screenshot From 2020 12 10 07 42 06

OpenResty is a full-fledged web platform which is mostly based on Nginx web server. OpenResty not only bring many enhanced features from Nginx core, but also LuaJIT and LUA libraries. Openresty also include high-quality 3rd-party Nginx modules which actually designed to help any developers to easily build scalable web app / services, or dynamic web gateways.

Here i’m teaching you on how to build and configuring Openresty on CentOS 7/8. I have tested this on $5 Digital Ocean cloud server with CentOS 7. Simply read the following guide:

First of all, don’t forget to add Openresty repository on your CentOS system. Simply change yum command to dnf if you are using CentOS 8. Please note, to perform this installation you should have full root access on your server. Ohh… of course, you can buy cheap VPS server for testing purpose.

$ wget
$ mv openresty.repo /etc/yum.repos.d/

After that, lets run yum index update command.

$ yum check-update

Install openresty and resty command-line utility package to your server

$ yum install openresty openresty-resty

Let’s start openresty web server and don’t forget to enabled it via systemctl

$ systemctl enable openresty.service
Created symlink from /etc/systemd/system/ to /usr/lib/systemd/system/openresty.service.
$ service openresty restart
Redirecting to /bin/systemctl restart openresty.service