tar 源码包管理-源码包安装方法

一、源码安装 nginx

1. 编译环境如 gcc 和 gcc-c++编译器,make

2. 准备软件 : nginx-1.18.0.tar.gz

部署 Nginx

安装 nginx 源码编译,需要的依赖包:

[root@tiehao ~]# yum -y install gcc gcc-c++ make zlib-devel pcre pcre-devel openssl-devel

软件包说明:

gcc c 语言编译器。

gcc-c++ c++ 语言编译器。

make 用于 configure 和 make 编译的工具。

zlib :nginx 提供 gzip 压缩 模块,需要 zlib 库支持。

pcre 包作用是让 nginx 支持正则表达式,地址重写 rewrite

openssl-devel :让 nginx 提供 ssl 功能。

重点,重点、重点如果文件夹里面没有configure文件,需要步骤如下:

yum -y install autoconf

autoreconf  生成configure文件

开始安装:

源码编译 3 把斧:./configure , make ,make install

[root@tiehao ~]# tar xvf nginx-1.18.0.tar.gz

[root@tiehao ~]# cd nginx-1.18.0

[root@tiehao nginx-1.18.0]# ./configure --prefix=/usr/local/nginx

[root@ti

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值