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

Linux学习之Ubuntu 20.04在github下载源码安装Openresty 1.19.3.1

参考的博文:《在 Ubuntu 上使用源码安装 OpenResty》
《OpenResty 安装安装详解-Ubuntu》
《Linux学习之CentOS 7源码安装openresty》

https://openresty.org/en/download.html是官网下载网址,页面往下拉有下载的链接。
在这里插入图片描述

https://github.com/openresty/openresty是github上的链接。
在这里插入图片描述
可以点击上图中tags进入有不同版本的页面。
在这里插入图片描述

sudo cat /etc/issue可以看到操作系统的版本是Ubuntu 20.04.4 LTSsudo lsb_release -r可以看到版本是20.04sudo uname -r可以看到内核版本是5.5.19sudo make -v可以看到版本是GNU Make 4.2.1
在这里插入图片描述

sudo apt-get install -y libpcre3-dev libssl-dev perl build-essential curl zlib1g-dev libreadline-dev libncurses5-dev libpcre3-dev安装依赖包。
在这里插入图片描述

安装完成之后如下:
在这里插入图片描述

sudo wget https://github.com/openresty/openresty/archive/refs/tags/v1.19.3.1.tar.gz下载源码压缩包。
在这里插入图片描述

sudo mkdir /openrestycode新建一个/openrestycode放置解压出来的源码。
在这里插入图片描述
sudo tar zxf v1.19.3.1.tar.gz -C /openrestycode/把源码解压到/openrestycode里边,然后使用ls -l /openrestycode看一下/openrestycode里边的文件。
在这里插入图片描述

cd /openrestycode/openresty-1.19.3.1/进入到/openrestycode/openresty-1.19.3.1/里边,ls -l看一下当前目录的文件信息。
在这里插入图片描述

sudo make执行。
在这里插入图片描述
发现报错如下:

rm: cannot remove '*.tar.bz2': No such file or directory
./util/mirror-tarballs: line 891: unix2dos: command not found
make: *** [Makefile:4: all] Error 1

在这里插入图片描述

sudo apt-get install dos2unix安装。
在这里插入图片描述

sudo make再次执行,发现又报错:

rm: cannot remove '*.tar.bz2': No such file or directory
unix2dos: converting file README-windows.txt to DOS format...
./util/mirror-tarballs: line 913: hg: command not found
make: *** [Makefile:4: all] Error 1

在这里插入图片描述

sudo apt-get install -y apt-file安装apt-file
在这里插入图片描述

sudo apt-file update更新。
在这里插入图片描述

sudo apt-file search hg输出了Finding relevant cache files to search ...E: The cache is empty. You need to run "apt-file update" first.
在这里插入图片描述

上边使用sudo apt-file search hg解决不了我的问题,我只能使用sed -n '913p' ./util/mirror-tarballs' ./util/mirror-tarballs看一下./util/mirror-tarballs第913行是什么内容,然后把hg clone粘贴到百度上查找一下,结果看到了博文《【ubuntu】hg clone使用》。
在这里插入图片描述

想要使用sudo apt-get install mercurial安装mercurial却又提示E: You don't have enough free space in /var/cache/apt/archives/.
在这里插入图片描述
有看一篇博文《ubuntu “you don‘t have enough free space in /var/cache/apt/archives‘错误解决》,找到一个大型文件删除了。

sudo apt-get install -y mercurial免确认安装mercurial
在这里插入图片描述

安装完成如下:
在这里插入图片描述

cd /openrestycode/openresty-1.19.3.1/进入到源码目录里边,sudo make再次执行编译。
在这里插入图片描述

完成之后如下:
在这里插入图片描述
cd openresty-1.19.3.1/进入到目录。
在这里插入图片描述

sudo ./configure --with-http_gzip_static_module --with-http_v2_module --with-http_stub_status_module --with-luajit --with-http_iconv_module进行配置。
在这里插入图片描述

完成如下如所示:
在这里插入图片描述

sudo make进行编译。
在这里插入图片描述

完成如下图所示:
在这里插入图片描述

sudo make install进行安装。
在这里插入图片描述

安装完成之后如下图:
在这里插入图片描述

此文章为8月Day 25学习笔记,内容来源于极客时间《Linux 实战技能 100 讲》。

http://www.lryc.cn/news/144545.html

相关文章:

  • bootloader串口更新程序[瑕疵学习板]
  • 浅谈视频汇聚平台EasyCVR视频平台在城市安全综合监测预警台风天气中的重要作用
  • GaussDB技术解读系列:高级压缩之OLTP表压缩
  • 管理类联考——英语二——实战篇——大作文——图表——静态图表——第一段
  • https 的ssl证书过期处理解决方案(lighthttpd)
  • 【java】【idea2023版】Springboot模块没有.iml文件的问题
  • Qt QScrollArea使用
  • Unity3d:GameFramework解析:实体,对象池,资源管理,获取计数,引用计数,自动释放
  • Django基础6——数据模型关系
  • 【chrome扩展开发】如何在项目中判断插件是否已安装
  • Centos 7.6 安装mongodb
  • Ubuntu下安装nginx服务,实现通过URL读取ubuntu下图片
  • 本地部署 Stable Diffusion(Mac 系统)
  • 浪潮云海护航省联社金融上云,“一云多芯”赋能数字农业
  • MyCat的XA事务研究及字符集问题
  • 9、监测数据采集物联网应用开发步骤(7)
  • 微信小程序开发教学系列(9)- 小程序页面优化
  • 如何将储存在Mac或PC端的PDF文件传输到移动设备呢?
  • 一图看懂架构划分原则:技术划分 OR 领域划分?
  • 从零开始的Hadoop学习(二)| Hadoop介绍、优势、组成、HDFS架构
  • 问道管理:逾4600股飘红!汽车板块爆了,多股冲击涨停!
  • Java 语言实现选择排序算法
  • 【C语言每日一题】05. 输出保留12位小数的浮点数
  • 科大讯飞永久免费GPT入口来了!!!
  • 亚马逊反馈和评论的区别
  • Linux 查看当前文件夹下的文件大小
  • 玩转 PI 系列-看起来像服务器的 ARM 开发板矩阵-Firefly Cluster Server
  • 《Flink学习笔记》——第六章 Flink的时间和窗口
  • nano主板扩大swap交换交换空间大小 /windows里远程传输文件/ssh远程登陆访问GUI界面报错
  • 7个用于机器学习和数据科学的基本 Python 库