前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Centos编译安装Tengine

Centos编译安装Tengine

作者头像
治电小白菜
发布2021-04-13 16:18:11
1.1K0
发布2021-04-13 16:18:11
举报
文章被收录于专栏:技术综合

1. 安装相关依赖

代码语言:javascript
复制
yum install gcc gcc-c++ opensslopenssl-devel  zib-devel zib

2. 进入 /usr/local 目录

3. 编译pcre

代码语言:javascript
复制
wget https://sourceforge.net/projects/pcre/files/pcre/8.38/pcre-8.38.tar.gz

tar xzvf pcre-8.38.tar.gz

cd pcre-8.38

./configure && make -j4 && make install

4.编译Tegine

① Tegine报错:./configure: error: SSL modules require the OpenSSL library.
代码语言:javascript
复制
yum -y install openssl openssl-devel
② 编译
代码语言:javascript
复制
wget http://tengine.taobao.org/download/tengine-2.3.3.tar.gz

tar xzvf tengine-2.3.3.tar.gz

cd tengine-2.3.3

./configure && make && make install

5. 使用

在/usr/local/nginx目录下使用即可

代码语言:javascript
复制
cd /usr/local/nginx

/sbin/nginx -t # 测试配置
/sbin/nginx # 启动
/sbin/nginx -s reload # 重启
/sbin/nginx -s stop # 停止

6. 相关问题

① 报错nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)

将配置文件挂载就行 /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

② 配置http2
代码语言:javascript
复制
cd /usr/local/tengine-2.3.3
./configure --with-http_v2_module
make
make install
③ 发现一个坑,在配ssl时,会报缺少模块的错nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_module in ...

可以在配置的时候加上--with-http_ssl_module 比如./configure --prefix=/usr/local/nginx --with-http_ssl_module 具体参考https://www.cnblogs.com/ghjbk/p/6744131.html

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1. 安装相关依赖
  • 2. 进入 /usr/local 目录
  • 3. 编译pcre
  • 4.编译Tegine
    • ① Tegine报错:./configure: error: SSL modules require the OpenSSL library.
      • ② 编译
      • 5. 使用
      • 6. 相关问题
        • ① 报错nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)
          • ② 配置http2
            • ③ 发现一个坑,在配ssl时,会报缺少模块的错nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_module in ...
            相关产品与服务
            SSL 证书
            腾讯云 SSL 证书(SSL Certificates)为您提供 SSL 证书的申请、管理、部署等服务,为您提供一站式 HTTPS 解决方案。
            领券
            问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档