一,openresty的官网地址:

http://openresty.org/

说明:说一下openresty的安装方式:

从openresty的安装目录下,可以看到openresty编译安装了自己作了魔改的几个库: luajit,nginx,openssl,pcre,zlib

[root@localhost openresty]# pwd
/usr/local/openresty
[root@localhost openresty]# ls
bin COPYRIGHT luajit lualib nginx openssl pcre site zlib

如果编译源码方式安装,可能会有一些编译参数与二进制版不一致导致openresty的安装/运行中出现bug,

所以除非openresty内置nginx的编译参数不满足需求,否则强烈推荐采用官方打好的二进制包方式安装,

针对centos平台,当然是使用yum

说明:架构森林是一个专注架构的博客,地址:https://www.cnblogs.com/architectforest

对应的源码可以访问这里获取: https://github.com/liuhongdi/

说明:作者:刘宏缔 邮箱: 371125307@qq.com

二,查看本地centos的版本:

[root@localhost lib]# cat /etc/redhat-release
CentOS Linux release 8.1.1911 (Core)

三,安装yum-utils

[root@localhost liuhongdi]# yum install -y yum-utils

四,给yum 添加安装openresty的repo:

[root@localhost liuhongdi]# yum-config-manager --add-repo https://openresty.org/package/rhel/openresty.repo
添加仓库自:https://openresty.org/package/rhel/openresty.repo

说明:为何在这里使用rhel的repo?

因为centos8发布较晚,openresty当前还没有发布centos8的包,

所以我们使用可以通用的rhel的repo

五,安装openresty

[root@localhost liuhongdi]# yum install -y openresty

六,启动openresty

[root@localhost liuhongdi]# systemctl start openresty

七,测试安装后的效果:

通过浏览器访问:http://127.0.0.1/

如下图

八,安装openresty的命令行工具 resty:

[root@localhost conf]# yum install -y openresty-resty

九,查看当前安装的openresty的版本:

[root@localhost lib]# /usr/local/openresty/bin/openresty -V
nginx version: openresty/1.15.8.2
built by gcc 8.2.1 20180905 (Red Hat 8.2.1-3) (GCC)
built with OpenSSL 1.1.0k 28 May 2019
TLS SNI support enabled
configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt='-O2 -DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/zlib/include -I/usr/local/openresty/pcre/include -I/usr/local/openresty/openssl/include' --add-module=../ngx_devel_kit-0.3.1rc1 --add-module=../echo-nginx-module-0.61 --add-module=../xss-nginx-module-0.06 --add-module=../ngx_coolkit-0.2 --add-module=../set-misc-nginx-module-0.32 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.08 --add-module=../srcache-nginx-module-0.31 --add-module=../ngx_lua-0.10.15 --add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.33 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.19 --add-module=../redis2-nginx-module-0.15 --add-module=../redis-nginx-module-0.3.7 --add-module=../ngx_stream_lua-0.0.7 --with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib -L/usr/local/openresty/zlib/lib -L/usr/local/openresty/pcre/lib -L/usr/local/openresty/openssl/lib -Wl,-rpath,/usr/local/openresty/zlib/lib:/usr/local/openresty/pcre/lib:/usr/local/openresty/openssl/lib' --with-cc='ccache gcc -fdiagnostics-color=always' --with-pcre-jit --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_v2_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_auth_request_module --with-http_secure_link_module --with-http_random_index_module --with-http_gzip_static_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-threads --with-dtrace-probes --with-stream --with-stream_ssl_preread_module --with-http_ssl_module

centos8上安装openresty的更多相关文章

  1. 在Ubuntu上安装openResty #1

    在Ubuntu上安装openResty #1 OpenResty® 是一个基于 Nginx 与 Lua 的高性能 Web 平台,其内部集成了大量精良的 Lua 库.第三方模块以及大多数的依赖项.用于方 ...

  2. CentOS8上安装MySQL

    没有选择Win10上安装MySQL,个人感觉比较傻瓜式.同时相对Win10操作系统,个人更熟悉Unix/Linux操作系统,所以选择在CentOS8上安装MySQL数据库. 还是熟悉的yum安装,前提 ...

  3. 在CentOS8 上安装Python3

    从centos开始入手学习linux.感觉安装python很费劲,之前centos6因为python2和python3兼容的问题一直无法彻底解决,python3一旦安装影响到python2,cento ...

  4. centos8上安装ffmpeg4.2.2并做视频截图

    一,ffmpeg的作用: FFmpeg是一套可以用来记录.转换数字音频.视频,并能将其转化为流的开源计算机程序. 它提供了录制.转换以及流化音视频的完整解决方案.它包含了非常先进的音频/视频编解码库l ...

  5. CentOS8 上安装Docker

    从 2017 年 3 月开始 docker 在原来的基础上分为两个分支版本: Docker CE 和 Docker EE.Docker CE 即社区免费版,Docker EE 即企业版,强调安全,但需 ...

  6. centos8上安装mysql8

    一,下载并解压mysql8 1,mysql官网 https://www.mysql.com/ 2,下载到source目录 [root@yjweb source]# wget https://cdn.m ...

  7. centos8上配置openresty/nginx可访问php

    一,创建一个测试站的目录 [root@yjweb data]# mkdir dev [root@yjweb data]# cd dev [root@yjweb dev]# mkdir think_ww ...

  8. centos8上安装ImageMagick6.9.10并压缩图片生成webp缩略图

    一,ImageMagick的作用: ImageMagick 是一个用来创建.编辑.合成图片的软件. 它可以读取.转换.写入多种格式的图片. 功能包括:图片切割.颜色替换.各种效果的应用, 图片的旋转. ...

  9. Centos8上安装Mysql8.X

    一.下载Mysql 下载地址:https://dev.mysql.com/downloads/mysql/ 二.将压缩包通过ftp软件服务器的目标位置:并解压 1.我的是放在:/root/softwa ...

随机推荐

  1. Flash 0day(CVE-2018-4878)复现过程

    一.前言介绍 2018年2月1号,Adobe官方发布安全通报(APSA18-01),声明Adobe Flash 28.0.0.137及其之前的版本,存在高危漏洞(CVE-2018-4878). 从Ad ...

  2. python之ddt模块使用

    一.DDT(数据驱动)简介 Data-Driven Tests(DDT)即数据驱动测试,可以实现不同数据运行同一个测试用例(通过数据的不同来驱动测试结果的不同). ddt本质其实就是装饰器,一组数据一 ...

  3. 小BUG大原理 | 第一篇:重写WebMvcConfigurationSupport后SpringBoot自动配置失效

    一.背景 公司的项目前段时间发版上线后,测试反馈用户的批量删除功能报错.正常情况下看起来应该是个小BUG,可怪就怪在上个版本正常,且此次发版未涉及用户功能的改动.因为这个看似小BUG我了解到不少未知的 ...

  4. command三国杀开发日记20200915

    一句话进展 完善了程序结构,分离.c和.h 搭建了6个阶段函数 实现了玩家摸牌 封装实现了日志打印函数 日志打印 想要区分日志等级,包括DEBUG.INFO.WARN.ERRRO.PANIC,提供统一 ...

  5. Vue搭建组件库并发布到 npm

    https://www.jianshu.com/p/72d303449abc

  6. JS 数组, 对象的增查改删(多语法对比)

    数据结构横向对比, 增, 查, 改, 删 建议: 在用数据结构的时候, 优先考虑Map和Set(考虑数据的唯一性), 放弃传统的数组和Object, 特别是比较复杂的数据结构时 数组 Map与Arra ...

  7. 将ImageMagic库编译进nginx

    1.首先要将ImageMagick库的相应头文件加到环境变量中 export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/ImageMagick/include ...

  8. zookeeper(4) 网络

    zookeeper底层通过NIO进行网络传输,如果对NIO不是很熟悉,先参见java NIO.下面我们来逐步实现基于NIO的zookeeper实现,首先我们要定义应用层的通信协议. 传输协议 请求协议 ...

  9. java学习1day

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  10. 【原创】一层Nginx反向代理K8S化部署实践

    目录: 1)背景介绍 2)方案分析 3)实现细节 4)监控告警 5)日志收集 6)测试 一.背景介绍     如下图所示,传统方式部署一层Nginx,随着业务扩大,维护管理变得复杂,繁琐,耗时耗力和易 ...