tengine二进制

简介: 详细

1.基础依赖包安装

install -y wget gcc pcre-devel perl libpcre3-dev zlib1g.dev

2.最新版本源代码的下载

mkdir -p /Users/bot/data/src

cd /Users/bot/data/src

wget https://ftp.openssl.org/source/openssl-1.1.1k.tar.gz

tar -xzf openssl-*.tar.gz

wget https://tengine.taobao.org/download/tengine-2.3.3.tar.gz

tar -xzf tengine-*.tar.gz

cd /Users/bot/data/src/tengine-2.3.3

3.编译

./configure --prefix=/data/nginx --with-http_ssl_module --with-openssl=/data/src/openssl-1.1.1k --user=nginx --group=nginx --add-module=modules/ngx_http_upstream_session_sticky_module


安装

make && make install


# 添加相应用户

useradd nginx -M -s /sbin/nologin

chown -R nginx:nginx /data/nginx


# 配置端口绑定能力,否则绑定低于1024的端口号时会报权限错误

setcap cap_net_bind_service=+eip /data/nginx/sbin/nginx


#编译配置信息,相关目录后面配置可能会用到

Configuration summary

 + using system PCRE library

 + using OpenSSL library: /data/src/openssl-1.1.1k

 + using system zlib library

 + jemalloc library is disabled


 nginx path prefix: "/data/nginx"

 nginx binary file: "/data/nginx/sbin/nginx"

 nginx modules path: "/data/nginx/modules"

 nginx configuration prefix: "/data/nginx/conf"

 nginx configuration file: "/data/nginx/conf/nginx.conf"

 nginx pid file: "/data/nginx/logs/nginx.pid"

 nginx error log file: "/data/nginx/logs/error.log"

 nginx http access log file: "/data/nginx/logs/access.log"

 nginx http client request body temporary files: "client_body_temp"

 nginx http proxy temporary files: "proxy_temp"

 nginx http fastcgi temporary files: "fastcgi_temp"

 nginx http uwsgi temporary files: "uwsgi_temp"

 nginx http scgi temporary files: "scgi_temp"


5.编写服务启动文件

vi /usr/lib/systemd/system/nginx.service

[Unit]

Description=The nginx HTTP and reverse proxy server

After=network.target


[Service]

Type=forking

User=nginx

Group=nginx

PIDFile=/data/nginx/logs/nginx.pid

ExecStartPre=/usr/bin/rm -f /data/nginx/logs/nginx.pid

ExecStartPre=/data/nginx/sbin/nginx -t

ExecStart=/data/nginx/sbin/nginx -c /data/nginx/conf/nginx.conf

ExecReload=/bin/kill -s HUP $MAINPID

KillSignal=SIGQUIT

TimeoutStopSec=5

KillMode=process

PrivateTmp=true


[Install]

WantedBy=multi-user.target


# 重启systemd守护进程

systemctl daemon-reload


# 启动tengine服务

systemctl start nginx

systemctl status nginx


systemctl enable nginx



6.编译参数说明

./configure --help


 --help                             print this message


 --prefix=PATH                      set installation prefix

 --sbin-path=PATH                   set nginx binary pathname

 --modules-path=PATH                set modules path

 --conf-path=PATH                   set nginx.conf pathname

 --error-log-path=PATH              set error log pathname

 --pid-path=PATH                    set nginx.pid pathname

 --lock-path=PATH                   set nginx.lock pathname


 --user=USER                        set non-privileged user for

                                    worker processes

 --group=GROUP                      set non-privileged group for

                                    worker processes


 --build=NAME                       set build name

 --builddir=DIR                     set build directory


 --with-select_module               enable select module

 --without-select_module            disable select module

 --with-poll_module                 enable poll module

 --without-poll_module              disable poll module


 --without-procs                    disable procs module


 --with-threads                     enable thread pool support


 --with-file-aio                    enable file AIO support


 --with-http_ssl_module             enable ngx_http_ssl_module

 --with-http_v2_module              enable ngx_http_v2_module

 --with-http_realip_module          enable ngx_http_realip_module

 --with-http_addition_module        enable ngx_http_addition_module

 --with-http_xslt_module            enable ngx_http_xslt_module

 --with-http_xslt_module=dynamic    enable dynamic ngx_http_xslt_module

 --with-http_image_filter_module    enable ngx_http_image_filter_module

 --with-http_image_filter_module=dynamic

                                    enable dynamic ngx_http_image_filter_module

 --with-http_geoip_module           enable ngx_http_geoip_module

 --with-http_geoip_module=dynamic   enable dynamic ngx_http_geoip_module

 --with-http_sub_module             enable ngx_http_sub_module

 --with-http_dav_module             enable ngx_http_dav_module

 --with-http_flv_module             enable ngx_http_flv_module

 --with-http_mp4_module             enable ngx_http_mp4_module

 --with-http_gunzip_module          enable ngx_http_gunzip_module

 --with-http_gzip_static_module     enable ngx_http_gzip_static_module

 --with-http_auth_request_module    enable ngx_http_auth_request_module

 --with-http_random_index_module    enable ngx_http_random_index_module

 --with-http_secure_link_module     enable ngx_http_secure_link_module

 --with-http_degradation_module     enable ngx_http_degradation_module

 --with-http_slice_module           enable ngx_http_slice_module

 --with-http_stub_status_module     enable ngx_http_stub_status_module


 --without-http_charset_module      disable ngx_http_charset_module

 --without-http_gzip_module         disable ngx_http_gzip_module

 --without-http_ssi_module          disable ngx_http_ssi_module

 --without-http_ssl_module          disable ngx_http_ssl_module

 --without-http_userid_module       disable ngx_http_userid_module

 --without-http_access_module       disable ngx_http_access_module

 --without-http_auth_basic_module   disable ngx_http_auth_basic_module

 --without-http_mirror_module       disable ngx_http_mirror_module

 --without-http_autoindex_module    disable ngx_http_autoindex_module

 --without-http_geo_module          disable ngx_http_geo_module

 --without-http_map_module          disable ngx_http_map_module

 --without-http_split_clients_module disable ngx_http_split_clients_module

 --without-http_referer_module      disable ngx_http_referer_module

 --without-http_rewrite_module      disable ngx_http_rewrite_module

 --without-http_proxy_module        disable ngx_http_proxy_module

 --without-http_fastcgi_module      disable ngx_http_fastcgi_module

 --without-http_uwsgi_module        disable ngx_http_uwsgi_module

 --without-http_scgi_module         disable ngx_http_scgi_module

 --without-http_grpc_module         disable ngx_http_grpc_module

 --without-http_memcached_module    disable ngx_http_memcached_module

 --without-http_limit_conn_module   disable ngx_http_limit_conn_module

 --without-http_limit_req_module    disable ngx_http_limit_req_module

 --without-http_empty_gif_module    disable ngx_http_empty_gif_module

 --without-http_browser_module      disable ngx_http_browser_module

 --without-http_stub_status_module  disable ngx_http_stub_status_module

 --without-http_upstream_hash_module

                                    disable ngx_http_upstream_hash_module

 --without-http_upstream_ip_hash_module

                                    disable ngx_http_upstream_ip_hash_module

 --without-http_upstream_least_conn_module

                                    disable ngx_http_upstream_least_conn_module

 --without-http_upstream_random_module

                                    disable ngx_http_upstream_random_module

 --without-http_upstream_keepalive_module

                                    disable ngx_http_upstream_keepalive_module

 --without-http_upstream_zone_module

                                    disable ngx_http_upstream_zone_module


 --with-http_perl_module            enable ngx_http_perl_module

 --with-http_perl_module=dynamic    enable dynamic ngx_http_perl_module

 --with-perl_modules_path=PATH      set Perl modules path

 --with-perl=PATH                   set perl binary pathname


 --without-http-upstream-rbtree     disable using rbtree for upstream lookup


 --with-http_lua_module             enable ngx_http_lua_module (will also enable --with-md5 and --with-sha1)

 --with-luajit-inc=PATH             set LuaJIT headers path (where lua.h/lauxlib.h/... are located)

 --with-luajit-lib=PATH             set LuaJIT library path (where libluajit-5.1.{a,so} are located)

 --with-lua-inc=PATH                set Lua headers path (where lua.h/lauxlib.h/... are located)

 --with-lua-lib=PATH                set Lua library path (where liblua.{a,so} are located, only support Lua-5.1.x)

 --http-log-path=PATH               set http access log pathname

 --http-client-body-temp-path=PATH  set path to store

                                    http client request body temporary files

 --http-proxy-temp-path=PATH        set path to store

                                    http proxy temporary files

 --http-fastcgi-temp-path=PATH      set path to store

                                    http fastcgi temporary files

 --http-uwsgi-temp-path=PATH        set path to store

                                    http uwsgi temporary files

 --http-scgi-temp-path=PATH         set path to store

                                    http scgi temporary files


 --without-http                     disable HTTP server

 --without-http-cache               disable HTTP cache


 --with-mail                        enable POP3/IMAP4/SMTP proxy module

 --with-mail=dynamic                enable dynamic POP3/IMAP4/SMTP proxy module

 --with-mail_ssl_module             enable ngx_mail_ssl_module

 --without-mail_pop3_module         disable ngx_mail_pop3_module

 --without-mail_imap_module         disable ngx_mail_imap_module

 --without-mail_smtp_module         disable ngx_mail_smtp_module


 --with-stream                      enable TCP/UDP proxy module

 --with-stream=dynamic              enable dynamic TCP/UDP proxy module

 --with-stream_ssl_module           enable ngx_stream_ssl_module

 --with-stream_realip_module        enable ngx_stream_realip_module

 --with-stream_geoip_module         enable ngx_stream_geoip_module

 --with-stream_geoip_module=dynamic enable dynamic ngx_stream_geoip_module

 --with-stream_ssl_preread_module   enable ngx_stream_ssl_preread_module

 --with-stream_sni                  enable dynamic server block

 --without-stream_limit_conn_module disable ngx_stream_limit_conn_module

 --without-stream_access_module     disable ngx_stream_access_module

 --without-stream_geo_module        disable ngx_stream_geo_module

 --without-stream_map_module        disable ngx_stream_map_module

 --without-stream_split_clients_module

                                    disable ngx_stream_split_clients_module

 --without-stream_return_module     disable ngx_stream_return_module

 --without-stream_upstream_hash_module

                                    disable ngx_stream_upstream_hash_module

 --without-stream_upstream_least_conn_module

                                    disable ngx_stream_upstream_least_conn_module

 --without-stream_upstream_random_module

                                    disable ngx_stream_upstream_random_module

 --without-stream_upstream_zone_module

                                    disable ngx_stream_upstream_zone_module


 --with-google_perftools_module     enable ngx_google_perftools_module

 --with-cpp_test_module             enable ngx_cpp_test_module


 --add-module=PATH                  enable external module

 --add-dynamic-module=PATH          enable dynamic external module


 --with-compat                      dynamic modules compatibility


 --with-cc=PATH                     set C compiler pathname

 --with-cpp=PATH                    set C preprocessor pathname

 --with-cc-opt=OPTIONS              set additional C compiler options

 --with-ld-opt=OPTIONS              set additional linker options

 --with-cpu-opt=CPU                 build for the specified CPU, valid values:

                                    pentium, pentiumpro, pentium3, pentium4,

                                    athlon, opteron, sparc32, sparc64, ppc64


 --without-pcre                     disable PCRE library usage

 --with-pcre                        force PCRE library usage

 --with-pcre=DIR                    set path to PCRE library sources

 --with-pcre-opt=OPTIONS            set additional build options for PCRE

 --with-pcre-jit                    build PCRE with JIT compilation support


 --with-zlib=DIR                    set path to zlib library sources

 --with-zlib-opt=OPTIONS            set additional build options for zlib

 --with-zlib-asm=CPU                use zlib assembler sources optimized

                                    for the specified CPU, valid values:

                                    pentium, pentiumpro


 --with-libatomic                   force libatomic_ops library usage

 --with-libatomic=DIR               set path to libatomic_ops library sources


 --with-jemalloc                    force jemalloc library usage

 --with-jemalloc=DIR                set path to jemalloc library files


 --with-openssl=DIR                 set path to OpenSSL library sources

 --with-openssl-opt=OPTIONS         set additional build options for OpenSSL


 --with-debug                       enable debug logging

相关文章
|
机器学习/深度学习 缓存 网络安全
服务器中的conda环境
服务器中的conda环境
2021 1
|
存储 XML jenkins
iOS 底层原理38:自动化打包(一)Xcode + Shell脚本
iOS 底层原理38:自动化打包(一)Xcode + Shell脚本
4129 1
iOS 底层原理38:自动化打包(一)Xcode + Shell脚本
【PCIe 协议】听说你做 PCIe 很多年,还不知道 PCIe Hierarchy ID 是什么 ???
【PCIe 协议】听说你做 PCIe 很多年,还不知道 PCIe Hierarchy ID 是什么 ???
1530 0
【PCIe 协议】听说你做 PCIe 很多年,还不知道 PCIe Hierarchy ID 是什么 ???
|
监控 Linux 数据安全/隐私保护
问题记录:开机提示emergency mode(紧急模式)如何处理
在依赖Linux作为核心操作系统的环境中,系统的稳定和可靠性通常是我们理所当然的期待。然而,即使是最稳定的系统,有时也会在启动时出现异常,突然推到紧急模式的怀抱。这种模式,通常有被称为“Emergency Mode”,在Linux系统面临关键错误时作为一种安全网,但对于那些不熟悉如何应对此类问题的小伙伴来说,它可能带来困惑甚至恐慌。
问题记录:开机提示emergency mode(紧急模式)如何处理
|
11月前
|
人工智能 调度 芯片
Chiplet 技术:芯片终于不再“憋大招”,而是开始像搭积木一样干活了
Chiplet 技术:芯片终于不再“憋大招”,而是开始像搭积木一样干活了
509 0
|
8月前
|
机器学习/深度学习 传感器 算法
无线通信系统信道估计算法详解
信道估计是无线通信系统的核心技术之一,其目的是通过接收信号推断信道的冲激响应或频率响应,为相干解调、波束赋形、资源分配等功能提供信道状态信息(CSI)。在4G/5G/6G系统中,信道估计的精度直接影响通信质量(如误码率、吞吐量),而随着大规模MIMO、毫米波、超密集组网等技术的普及,信道估计的复杂度与实时性要求也日益提高。
|
10月前
|
数据采集 监控 API
1688商品列表API接口快速上手指南
本文介绍如何通过1688开放平台官方API,合规高效地获取店铺商品列表数据。以`item_search_shop`接口为例,详解请求参数、签名生成规则与调用限制,结合Python实战实现稳定采集。强调签名安全、频率控制与数据合规使用,助力B2B电商分析、选品监控等场景高效落地。(238字)
|
人工智能 自然语言处理 搜索推荐
产业园区运营升级新趋势,数字人激活园区展厅智慧展示新价值
随着“制造强国”“数字中国”战略推进,全国产业园区超8万家,正从规模扩张转向价值创造。传统展厅面临体验沉闷、成本高、同质化等问题。AI数字人作为智慧中枢,实现24小时讲解、智能交互、个性导览与系统联动,重塑园区“第一窗口”。当前,数字人已落地30余案例,助力园区迈向智能化、个性化、可持续的产业新生态。
369 0
|
算法 Java Python
【算法模板】DFS秒杀模板—附练习题(阳光号启航)(一)
【算法模板】DFS秒杀模板—附练习题(阳光号启航)(一)
1721 0
【算法模板】DFS秒杀模板—附练习题(阳光号启航)(一)
|
达摩院 Linux 测试技术
如何使用ModelScope魔搭开源代码训练一款语音合成模型
如何使用ModelScope魔搭开源代码训练一款语音合成模型
2994 0
如何使用ModelScope魔搭开源代码训练一款语音合成模型

热门文章

最新文章