首页 技术 正文
技术 2022年11月17日
0 收藏 469 点赞 4,942 浏览 2519 个字

安装包下载:

openssl1.1.1

链接:https://pan.baidu.com/s/1-qCDhkLtlkT0fdwKdVuh2g
提取码:0ncc

pcre3.2.1

链接:https://pan.baidu.com/s/13Ctmc_3cIWUWJT6hboj1JQ
提取码:5vl9

tengine2.3.0

链接:https://pan.baidu.com/s/1QRqM97jlSjJNobUAAu8aSA
提取码:2v6p

安装zlib

apt-get install zlib*

安装pcre

tar zxvf nrpe-3.2.1.tar.gz
./configure --prefix=/usr/local/pcre
make && make install

覆盖原lib库文件:
echo "/usr/local/pcre/lib/" >> /etc/ld.so.conf
ldconfig -v|grep pcre

安装openssl

1、查看openssl的库文件
ldconfig -v|grep openssl2、编译安装
tar zxvf openssl-1.1.1c.tar.gz
./config --prefix=/usr/local/openssl
make && make install3、查看依赖文件
ldd /usr/bin/openssl
echo "/usr/local/openssl/lib/" >> /etc/ld.so.conf
cat /etc/ld.so.conf4、备份文件替换变量
mv /usr/bin/openssl /usr/bin/openssl.old
ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl5、查看版本
刷新版本库:
ldconfig -v|grep openssl
验证版本:
openssl version

安装Tengine

tar zxvf tengine-2.3.0.tar.gz

./configure --prefix=/usr/local/tengine --with-openssl=/usr/local/openssl --with-http_ssl_module --with-pcre=/usr/local/pcre-8.43 --with-http_v2_module --add-module=modules/ngx_backtrace_module --add-module=modules/ngx_debug_pool --add-module=modules/ngx_debug_timer --add-module=modules/ngx_http_concat_module --add-module=modules/ngx_http_footer_filter_module --add-module=modules/ngx_http_proxy_connect_module --add-module=modules/ngx_http_reqstat_module --add-module=modules/ngx_http_slice_module --add-module=modules/ngx_http_sysguard_module --add-module=modules/ngx_http_trim_filter_module --add-module=modules/ngx_http_upstream_check_module --add-module=modules/ngx_http_upstream_consistent_hash_module --add-module=modules/ngx_http_upstream_dynamic_module --add-module=modules/ngx_http_upstream_dyups_module --add-module=modules/ngx_http_upstream_keepalive_module --add-module=modules/ngx_http_upstream_session_sticky_module --add-module=modules/ngx_http_user_agent_module --add-module=modules/ngx_slab_stat --without-http_upstream_keepalive_module --with-luajit-inc=/usr/include/luajit-2.0 --add-module=/usr/local/src/nginx-module-vts
注意:标红的地方写解压出来的路径,不是安装的路径.

报错解决:

打开nginx源文件下的/usr/local/tengine-2.3.0/auto/lib/openssl/conf文件:
找到这么一段代码:
CORE_INCS="$CORE_INCS $OPENSSL/.openssl/include"
CORE_DEPS="$CORE_DEPS $OPENSSL/.openssl/include/openssl/ssl.h"
CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libssl.a"
CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libcrypto.a"
CORE_LIBS="$CORE_LIBS $NGX_LIBDL"
修改成以下代码:
CORE_INCS="$CORE_INCS $OPENSSL/include"
CORE_DEPS="$CORE_DEPS $OPENSSL/include/openssl/ssl.h"
CORE_LIBS="$CORE_LIBS $OPENSSL/lib/libssl.a"
CORE_LIBS="$CORE_LIBS $OPENSSL/lib/libcrypto.a"
CORE_LIBS="$CORE_LIBS $NGX_LIBDL"
然后再进行Nginx的编译安装即可
make && make install
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,087
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,562
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,412
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,185
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,821
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,905