一,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. PHP7做了哪些优化

    一  zval使用栈内存 在Zend引擎和扩展中,经常要创建一个PHP的变量,底层就是一个zval指针.之前的版本都是通过MAKE_STD_ZVAL动态的从堆上分配一个zval内存.而PHP7可以直接 ...

  2. [剑指Offer]66-构建乘积数组

    题目 给定一个数组A[0,1,...,n-1],请构建一个数组B[0,1,...,n-1],其中B中的元素B[i]=A[0]A[1]...A[i-1]A[i+1]...A[n-1].不能使用除法. 题 ...

  3. Python爬虫和函数调试

    一:函数调试 用之前学过的try···except进行调试 def gameover(setA,setB): if setA==3 or setB==3: return True else: retu ...

  4. php第七天-文件处理系统

    0x01 文件系统概述 1.1文件类型 在程序运行时,程序本身和数据一般都存在内存中,当程序运行结束后,存放在内存中的数据被释放. 如果需要长期保存程序运行所需的原始数据,或程序运行产生的结果,就必须 ...

  5. 【Unity 插件】Lean Pool 使用

    2020-09-11 Lean Pool 是一个轻量级的游戏对象池库,它可以轻松的帮助你的游戏提高性能.当然,Lean Pool也可以工作于普通的C#类. 目录: 1.Lean Pool使用 2.Le ...

  6. CountDownLatch、CyclicBarrier

    CountDownLatch CountDownLatch类位于java.util.concurrent包下,利用它可以实现类似计数器的功能.比如有一个任务A,它要等待其他4个任务执行完毕之后才能执行 ...

  7. dubbo学习(九)dubbo监控中心

    安装与配置 下载地址:https://github.com/apache/dubbo-admin/tree/master(包含管理控制台和监控中心) PS:  下载前要选择master分支以后再进行下 ...

  8. java安全编码指南之:敏感类的拷贝

    目录 简介 一个简单的SensitiveObject SensitiveObject的限制 对SensitiveObject的攻击 解决办法 简介 一般来说class中如果包含了私有的或者敏感的数据的 ...

  9. gRPC-Protocol语法指南

    语法指南 (proto3) Defining A Message Type Scalar Value Types Default Values Enumerations Using Other Mes ...

  10. mysql-18-function

    #函数 /* 存储过程:可以有0个或多个返回,适合批量插入.批量更新 函数:有且仅有一个返回,适合处理数据后返回一个结果 */ #一.创建语法 /* create function 函数名(参数列表) ...