Nginx之oepnresty编译安装

Nginx 是俄罗斯人发明的, Lua 是巴西几个教授发明的,中国人章亦春把 LuaJIT VM 嵌入到 Nginx 中,
实现了 OpenResty 这个高性能服务端解决方案

所以中国人最强!

1.安装工具;

yum -y install gcc pcre-devel openssl-devel perl

2.创建不用登录的账户;

useradd -r -s /sbin/nologin nginx

3.切换到安装目录;

cd /usr/local/src

4.安装软件包和解压;

wget https://openresty.org/download/openresty-1.17.8.2.tar.gz
tar xf openresty-1.17.8.2.tar.gz
其他版本查看官网;https://openresty.org/en/download.html

在这里插入图片描述

5, 切换到安装目录
cd openresty-1.17.8.2/
[root@Centos8 openresty-1.17.8.2]#./configure \

–prefix=/apps/openresty
–user=nginx
–group=nginx
–with-http_ssl_module
–with-http_v2_module
–with-http_realip_module
–with-http_stub_status_module
–with-http_gzip_static_module
–with-pcre
–with-stream
–with-stream_ssl_module
–with-stream_realip_module

脚本;

 --prefix=/apps/openresty \
 --user=nginx \
 --group=nginx \
 --with-http_ssl_module \
 --with-http_v2_module \
 --with-http_realip_module \
 --with-http_stub_status_module \
 --with-http_gzip_static_module \
 --with-pcre \
 --with-stream \
 --with-stream_ssl_module \
 --with-stream_realip_module

6.编译安装

[root@Centos8 openresty-1.17.8.2]#make && make install

7.设置软链接

[root@Centos8 openresty-1.17.8.2]#ln -s /apps/openresty/bin/* /usr/bin/

8.查看版本

[root@Centos8 openresty-1.17.8.2]#openresty -v

在这里插入图片描述
9.启动软件

[root@Centos8 openresty-1.17.8.2]#openresty

10.访问网页测试
在这里插入图片描述
安装完成

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值