#!/bin/bash
###this is design about tengine-2.2.2,
###designed in zq
###use the source code by the newer
cd /usr/local/src
##for ubuntu
#apt install libpcre3 libpcre3-dev zlib1g-dev openssl libssl-dev g++ gcc autoconf libtool zlib* openssl* openssl*
##for centos
yum install -y gcc gcc-c++ autoconf automake pcre pcre-devel openssl* zlib* libtool
wget https://github.com/jemalloc/jemalloc/releases/download/5.1.0/jemalloc-5.1.0.tar.bz2
tar jxvf jemalloc-5.0.0.tar.bz2
cd jemalloc-5.0.0
./configure --prefix=/usr/local/jemalloc
make && make install
useradd -s /sbin/nologin -M nginx
cd /usr/local/src
wget http://tengine.taobao.org/download/tengine-2.2.1.tar.gz
tar xzf tengine-2.2.1.tar.gz
cd tengine-2.2.1
./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-pcre --with-http_ssl_module --with-jemalloc=/usr/local/src/jemalloc-5.1.0/ --with-http_gzip_static_module --with-http_realip_module --with-http_stub_status_module --with-http_concat_module
./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-pcre --with-http_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-http_stub_status_module --with-http_concat_module
###如果没有安装pcre使用的是源码的话,可以用以下方式编译配置的时候,加入pcre的支持。
#--with-pcre=/usr/local/src/pcre-8.41
make&&make install
#我用了5.0.0版本的jemalloc,编译的时候,总是出现错误,c:119: undefined reference to `clock_gettime',这个是因为编译的时候,Makefile中缺少一些东西,导致编译不行。只需要在解压的tengine下的objs下的Makefile中 -lpthread -ldl -lcrypt /usr/local/src/pcre-8.41/.libs/libpcre.a -lssl -lcrypto -ldl -lz /usr/local/src/jemalloc-5.0.0//lib/libjemalloc.a -lpthread -lrt 这一行配置文件中添加-lrt即可。
install-tengine-2.2.2.zip_shell
版权申诉
11 浏览量
2022-09-15
01:21:15
上传
评论
收藏 1KB ZIP 举报
weixin_42651887
- 粉丝: 77
- 资源: 1万+
最新资源
- 基于python实现的多线程爬虫爬取电影天堂资源
- 基于MFC的教职工信息管理系统c++源码含代码注释.zip
- 毕业设计-基于Vue + Node的外卖系统设计与实现
- python烟花代码示例
- 中国各地级市工业三废数据(2006-2021年).xlsx
- 基于MFC的校园导航程序(使用最短路径dijkstra算法).rar
- Android Studio android APP 视频作为视图背景需要源代码或想了解其实现原理的可以私心我
- com.ZeroneGames.GreenProject.apk
- Python自动化开发入门教程
- 4399GameSem_116_13955_207551_6.apk
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈