Linux 安装 tengine-2.1.0 ngnix

1、解压软件

[root@linux1 tengine-2.1.0]# tar -zxvf tengine-2.1.0.tar.gz

2、查看帮助文档

more README

  	$ ./configure
    $ make
    # make install

[root@linux1 tengine-2.1.0]# ./configure --help

3、./configure 报错 安装gcc

[root@linux1 tengine-2.1.0]# ./configure 
checking for OS
 + Linux 2.6.32-431.el6.x86_64 x86_64
checking for C compiler ... not found

./configure: error: C compiler cc is not found

4、安装gcc

[root@linux1 tengine-2.1.0]# yum install -y gcc

5、在运行./configure 报错缺少pcre库

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.

6、查找并安装PCRE库

查找
[root@linux1 tengine-2.1.0]# yum search pcre
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.ustc.edu.cn
 * extras: mirrors.aliyun.com
 * updates: mirrors.huaweicloud.com
============================================================== N/S Matched: pcre ==============================================================
pcre-devel.i686 : Development files for pcre
pcre-devel.x86_64 : Development files for pcre
pcre-static.x86_64 : Static library for pcre
pcre.x86_64 : Perl-compatible regular expression library
pcre.i686 : Perl-compatible regular expression library

  Name and summary matches only, use "search all" for everything.

安装

[root@linux1 tengine-2.1.0]# yum install -y pcre-devel.x86_64

7、继续./configure 报错缺少OpenSSL 库

./configure: error: SSL modules require the OpenSSL library.
You can either do not enable the modules, or install the OpenSSL library
into the system, or build the OpenSSL library statically from the source
with nginx by using --with-openssl=<path> option.

8、查找并安装OpenSSL库

查找
[root@linux1 tengine-2.1.0]# yum search openssl
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.ustc.edu.cn
 * extras: mirrors.aliyun.com
 * updates: mirrors.huaweicloud.com
============================================================ N/S Matched: openssl =============================================================
openssl-devel.i686 : Files for development of applications which will use OpenSSL
openssl-devel.x86_64 : Files for development of applications which will use OpenSSL
openssl-perl.x86_64 : Perl scripts provided with OpenSSL
openssl-static.x86_64 : Libraries for static linking of applications which will use OpenSSL
perl-Crypt-OpenSSL-Bignum.x86_64 : Perl interface to OpenSSL for Bignum
perl-Crypt-OpenSSL-RSA.x86_64 : Perl interface to OpenSSL for RSA
perl-Crypt-OpenSSL-Random.x86_64 : Perl interface to OpenSSL for Random
pyOpenSSL.x86_64 : Python wrapper module around the OpenSSL library
xmlsec1-openssl.i686 : OpenSSL crypto plugin for XML Security Library
xmlsec1-openssl.x86_64 : OpenSSL crypto plugin for XML Security Library
xmlsec1-openssl-devel.i686 : OpenSSL crypto plugin for XML Security Library
xmlsec1-openssl-devel.x86_64 : OpenSSL crypto plugin for XML Security Library
krb5-pkinit-openssl.x86_64 : The PKINIT module for Kerberos 5
m2crypto.x86_64 : Support for using OpenSSL in python scripts
nss_compat_ossl.i686 : Source-level compatibility library for OpenSSL to NSS porting
nss_compat_ossl.x86_64 : Source-level compatibility library for OpenSSL to NSS porting
openssl.x86_64 : A general purpose cryptography library with TLS implementation
openssl.i686 : A general purpose cryptography library with TLS implementation
openssl098e.i686 : A compatibility version of a general cryptography and TLS library
openssl098e.x86_64 : A compatibility version of a general cryptography and TLS library
perl-Crypt-SSLeay.x86_64 : Crypt::SSLeay - OpenSSL glue that provides LWP https support
perl-Net-SSLeay.x86_64 : Perl extension for using OpenSSL
qca-ossl.i686 : OpenSSL plugin for the Qt Cryptographic Architecture v2
qca-ossl.x86_64 : OpenSSL plugin for the Qt Cryptographic Architecture v2

  Name and summary matches only, use "search all" for everything.

安装
[root@linux1 tengine-2.1.0]# yum install -y openssl-devel.x86_64

9、 ./configure 检查通过
10、make 编译
11、make install 安装
12、安装完成

13、进入Nginx的安装目录

cd  /usr/local/nginx
./sbin/nginx  运行Nginx

14、访问Nginx

192.168.180.101:80
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值