首页
关于
归档
Search
1
centos7 nginx编译安装lua模块
1,629 阅读
2
免费DV数字证书申请及ssl配置
1,479 阅读
3
开坑,mini php框架欢迎来填坑
1,274 阅读
4
vim molokai 配色方案
1,228 阅读
5
Deny Hosts 对ssh服务进行黑白名单过滤
1,123 阅读
rocky linux
技术分享
登录
Search
标签搜索
linux
nginx
php
ssl
lua
letsencrypt
denyhost
ssh
epoll
io
vim
molokai
光子社区
累计撰写
9
篇文章
累计收到
1
条评论
首页
栏目
rocky linux
技术分享
页面
关于
归档
搜索到
1
篇与
的结果
2025-08-06
rocky linux 源码编译nginx
下载源码包并解压新建目录,将下载的源码存放到该目录下(方便后续编译)mkdir ${dir} cd ${dir}下载nginx源码#下载nginx源码包 wget http://nginx.org/download/nginx-1.20.2.tar.gz tar -zxvf nginx-1.26.3.tar.gz安装相关依赖sudo dnf install gcc-c++ gcc krb5 krb5-devel zlib zlib-devel pcre pcre-devel perl-devel perl-ExtUtils-Embed设置nginx编译参数创建build.sh脚本vi build.sh脚本内容如下#!/bin/bash CURRDIR=`dirname "$0"` BASEDIR=`cd "$CURRDIR"; pwd` VERSION=1.26.3 cd $BASEDIR/nginx-$VERSION ./configure --with-cc-opt='-fPIE' --with-ld-opt='-pie' --prefix=/usr/local/nginx/nginx-1.26.3 \ --conf-path=/usr/local/nginx/nginx-1.26.3/conf/nginx.conf \ --sbin-path=/usr/local/nginx/nginx-1.26.3/sbin/nginx \ --pid-path=/usr/local/nginx/nginx-1.26.3/logs/nginx.pid \ --error-log-path=/usr/local/nginx/nginx-1.26.3/logs/error.log \ --http-log-path=/usr/local/nginx/nginx-1.26.3/logs/access.log \ --http-client-body-temp-path=/usr/local/nginx/nginx-1.26.3/client_body_temp \ --http-proxy-temp-path=/usr/local/nginx/nginx-1.26.3/proxy_temp \ --http-fastcgi-temp-path=/usr/local/nginx/nginx-1.26.3/fastcgi_temp \ --http-uwsgi-temp-path=/usr/local/nginx/nginx-1.26.3/uwsgi_temp \ --http-scgi-temp-path=/usr/local/nginx/nginx-1.26.3/scgi_temp \ --user=root \ --group=root \ --with-http_ssl_module \ --with-http_realip_module \ --with-http_flv_module \ --with-http_mp4_module \ --with-http_gunzip_module \ --with-http_gzip_static_module \ --with-http_secure_link_module \ --with-http_v2_module \ --with-http_stub_status_module \ --with-http_sub_module \ --with-http_perl_module \ --with-mail \ --with-mail_ssl_module \ --with-stream \ --with-stream_ssl_module \ --with-file-aio \ --with-ipv6 \ --with-perl_modules_path=/usr/local/nginx/nginx-1.26.3/modules make && make install chmod +s /usr/local/nginx/nginx-1.26.3/sbin/nginx执行构建sudo sh build.sh构建成功后,在/usr/local/nginx/nginx-1.26.3/sbin/nginx查看文件是否存在,并运行/usr/local/nginx/nginx-1.26.3/sbin/nginx -v 查看版本信息是否正确,以上nginx就构建完成了。
2025年08月06日
21 阅读
1 评论
1 点赞