一,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. JS语法_集合

    数组方法 forEach // no-log Array.prototype.forEach_ = function (cb) { let len = this.length for (let i = ...

  2. wireshark在ubuntu系统中的正确安装方法

    以前一直在使用wireshark这个网络工具,最近在用来抓包学习MQTT协议的时候,发现wireshark暂时还未加入对MQTT协议分析的原生支持,网上搜了一下,可以自己用插件的形式扩展wiresha ...

  3. django之安装和项目创建

    dos界面下安装django 自动下载和安装:cmd:pip3 install  django 手动安装: 1.登录django官网下载django 2.下载地址:https://www.django ...

  4. 软件工程与UML作业3(互评作业)

    博客班级 https://edu.cnblogs.com/campus/fzzcxy/2018SE1/ 作业要求 https://edu.cnblogs.com/campus/fzzcxy/2018S ...

  5. Docker实战(6): 导出docker镜像离线包

    前言 离线环境安装Docker 镜像,我已知两种情况,以下操作我将采用在可访问外网的机器上通过镜像迁移的方式来给离线环境安装. 环境:服务器node1可访问外网.服务器node2无法访问外网 两台机器 ...

  6. 安装Linux的CentOS操作系统 - 初学者系列 - 学习者系列文章

    Linux系统对于一些熟悉Windows操作系统的用户来说可能比较陌生,但是它也是一种多用户.多任务的操作系统,现在也发展成为了多种版本的操作系统了.如果想对该系统进行学习,请下载这个学习文档:htt ...

  7. Salesforce Javascript(一) Promise 浅谈

    本篇参看: https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise https ...

  8. golang 指针类型学习

    对于指针类型不安全编程,通过指针值以及偏移量操作slice私有属性 // 通过指针值获取切片 func TestGetPrivate(t *testing.T) { s := []int{1, 2, ...

  9. 本机浏览器无法访问linux的tomcat

    原因:Centos7的防火墙拦截了tomcat访问的8080端口  Redhat 等等linux firewall-cmd --permanent --zone=public --add-port=8 ...

  10. CentOS 正在连接 127.0.0.1:8118... 失败:拒绝连接。

    今天centos使用wget下载东西的时候出现了 看下是否开启了代理 yicunyiye@yicunyiye:~/redis$ export | grep -i proxy declare -x ft ...