当前位置: 首页 > news >正文

Ubuntu22.04编译Nginx源码

执行如下命令

# ./configure --sbin-path=/usr/local/nginx/nginx --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid

输出结果,出现如下:

Configuration summary+ using system PCRE2 library+ OpenSSL library is not used+ using system zlib librarynginx path prefix: "/usr/local/nginx"nginx binary file: "/usr/local/nginx/sbin/nginx"nginx modules path: "/usr/local/nginx/modules"nginx configuration prefix: "/usr/local/nginx/conf"nginx configuration file: "/usr/local/nginx/conf/nginx.conf"nginx pid file: "/usr/local/nginx/logs/nginx.pid"nginx error log file: "/usr/local/nginx/logs/error.log"nginx http access log file: "/usr/local/nginx/logs/access.log"nginx http client request body temporary files: "client_body_temp"nginx http proxy temporary files: "proxy_temp"nginx http fastcgi temporary files: "fastcgi_temp"nginx http uwsgi temporary files: "uwsgi_temp"nginx http scgi temporary files: "scgi_temp"

需要安装openssl

sudo apt install libpcre3-dev
sudo apt install zlib1g-dev
apt-get install openssl libssl-dev

如果提示已经安装,可以忽略上述报告;

# make
# make install

执行过程中,报出如下:

objs/ngx_modules.o \
-lcrypt -lpcre2-8 -lz \
-Wl,-E
sed -e "s|%%PREFIX%%|/usr/local/nginx|" \-e "s|%%PID_PATH%%|/usr/local/nginx/nginx.pid|" \-e "s|%%CONF_PATH%%|/usr/local/nginx/nginx.conf|" \-e "s|%%ERROR_LOG_PATH%%|/usr/local/nginx/logs/error.log|" \< man/nginx.8 > objs/nginx.8
make[1]: Leaving directory '/data/nginx/nginx-1.25.2'

忽略即可;

安装成功后,在目录下

/usr/local/nginx

复制nginx到

# cp /usr/local/nginx/nginx /usr/bin/nginx
# nginx -V
nginx version: nginx/1.25.2
built by gcc 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
configure arguments: --sbin-path=/usr/local/nginx/nginx --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid
http://www.lryc.cn/news/133628.html

相关文章:

  • 视频上传,限制时长,获取视频时长
  • Open3D 进阶(5)变分贝叶斯高斯混合点云聚类
  • 5、css学习5(链接、列表)
  • Synchronized与Java线程的关系
  • 使用本地电脑搭建可以远程访问的SFTP服务器
  • 批量修改文件名怎么操作?
  • 【LeetCode】538.把二叉搜索树转换为累加树
  • linux 安装 kibana
  • STM32入门——IIC通讯
  • DTC 19服务学习2
  • 【腾讯云 TDSQL-C Serverless 产品体验】基于腾讯云轻量服务器以及 TDSQL-C 搭建 LNMP WordPress 博客系统
  • 【vue3】对axios进行封装,方便更改路由并且可以改成局域网ip访问(附代码)
  • Java IO流(三)线程模型
  • string(模拟实现与深拷贝)
  • 5.Vue_Element
  • 链路追踪jaeger
  • 神经网络基础-神经网络补充概念-42-梯度检验
  • <kernel>kernel 6.4 USB-之-hub_port_connect()分析
  • linux驱动学习3-外部中断
  • vue中的canvas插件
  • 分享图片 | 快速浏览网页资源,批量保存、一键分享图片
  • Programming abstractions in C阅读笔记:p123-p126
  • 自然语言处理从入门到应用——LangChain:链(Chains)-[通用功能:LLMChain、RouterChain和SequentialChain]
  • ElasticSearch-安装部署全过程
  • mathematica报错:Tag Plus is \ Protected
  • Python Django 模型概述与应用
  • Golang Gorm 更新字段 save update updates
  • springBoot 配置文件引入 redis 的相关参数说明
  • Docker的使用心得:简化开发与部署的利器
  • vue3 基于element plus对el-pagination进行二次封装