Install OpenResty and centosopenresty on CentOS
1. Add the openresty resource library to the CentOS System
Sudo yum-config-manager -- add-repo https://openresty.org/yum/cn/centos/OpenResty.repo
2. Install openresty
Sudo yum install openresty
OpenResty is a high-performance Web platform based on Nginx and Lua. It integrates a large number of excellent Lua libraries, third-party modules, and most dependencies. It is used to easily build dynamic Web applications, Web Services, and dynamic gateways that can handle ultra-high concurrency and high scalability.
OpenResty integrates a variety of well-designed Nginx modules (mainly developed by the OpenResty Team) to effectively turn Nginx into a powerful universal Web application platform. In this way, Web developers and System Engineers can use the Lua script language to mobilize various C and Lua modules supported by Nginx, quickly constructs a high-performance Web application system that is competent for concurrent connections between a single machine of 10 K or more.
The goal of OpenResty is to allow your Web services to run directly inside the Nginx service and make full use of the non-blocking I/O model of Nginx, not only for HTTP client requests, it even provides consistent high-performance responses to remote backend such as MySQL, PostgreSQL, Memcached, and Redis.
You can add the openresty resource library in your CentOS system, so that you can easily install our package and update it later (using the yum update command ). To add a resource library, you only need to create a file named/etc/yum. repos. d/OpenResty. repo. The content is as follows:
[Openresty]
Name = Official OpenResty Repository
Baseurl = Signature/
Skip_if_unavailable = True
Gpgcheck = 1
Gpgkey = https://copr-be.cloud.fedoraproject.org/results/openresty/openresty/pubkey.gpg
Enabled = 1
Enabled_metadata = 1
You can also directly run sudo yum-config-manager -- add-repo https://openresty.org/yum/centos/OpenResty.repo to add the file.
Users in mainland China can change the baseurl to the following link, which is faster.
Baseurl = https://openresty.org/yum/openresty/openresty/epel-?releasever-#basearch/
Or run sudo yum-config-manager -- add-repo https://openresty.org/yum/cn/centos/OpenResty.repo to add the corresponding file.
List all packages in the openresty resource library:
Sudo yum -- disablerepo = "*" -- enablerepo = "openresty" list available
Then you can install a package, such as installing openresty, like this:
Sudo yum install openresty