一、yum安装

sudo yum-config-manager --add-repo https://openresty.org/yum/cn/centos/OpenResty.repo
sudo yum install openresty

如果安装时显示Require GeoIP, 需要先安装geoip后再安装openresty

yum install epel-release
yum --enablerepo=epel install geoip

    

二、案例:
访问/ 显示hello world
location / { default_type text/html; content_by_lua_block { ngx.say("HelloWorld") }


 

 

相关文章:

  • 2021-04-19
  • 2021-05-01
  • 2021-07-14
  • 2022-12-23
  • 2021-06-04
  • 2021-12-04
  • 2021-12-06
  • 2022-01-06
猜你喜欢
  • 2022-12-23
  • 2021-10-20
  • 2021-12-09
  • 2021-11-20
  • 2021-12-05
  • 2021-08-29
  • 2021-10-10
相关资源
相似解决方案