Redhat7.4下安装nginx-1.14

本文介绍了在Redhat7.4操作系统中如何手动安装nginx-1.14,包括安装依赖包、解压源码、配置编译以及安装过程。首先使用yum安装必要的依赖,如pcre、gcc等,接着创建nginx用户,配置并编译源码,最后完成安装。
摘要由CSDN通过智能技术生成

 

1)yum直接安装依赖包
yum install pcre-devel pcre gcc gcc-c++ zlib-devel zlib openssl* -y   (安装依赖)
tar -zxvf nginx-1.14.1.tar.gz 
cd /software/nginx-1.14.1
adduser nginx   (添加系统用户)
./configure --prefix=/software/nginx --user=nginx --group=nginx --with-stream --with-http_ssl_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-http_flv_module   (根据自己需要安装相应模块和插件)
make   (编译)
make install   (安装)

2) 依赖包源码安装(默认安装的openssl、pcre等版本较低,可到官网下载较新稳定版源码去安装,安全性高点)
版本:redhat 7.4 ,zlib-1.2.8,pcre-8.34,nginx-1.14.0

[root@xsbfwbtest pcre-8.34]# ./configure
......
[root@xsbfwbtest pcre-8.34]# make
 cd . && /bin/sh /software/tools/pcre-8.34/missing automake-1.14 --gnu
/software/tools/pcre-8.34/missing: line 81: automake-1.14: command not found
WARNING: 'automake-1.14' is missing on your system.
         You should only need it if you modified 'Makefile.am' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'automake' program is part of the GNU Automake package:
         <http://www.gnu.org/software/automake>
         It also 
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值