码迷,mamicode.com
首页 > 其他好文 > 详细

Tengine+LUA+Nginx-GridFS+jemalloc编译安装

时间:2016-08-22 23:48:40      阅读:284      评论:0      收藏:0      [点我收藏+]

标签:tengine lua nginx-gridfs jemalloc

#安装依赖包保平安

apt-get install root-system-bin autoconf automake gcc c++ libgeoip-dev libxml++2.6-dev libxslt1-dev libxslt1.1 libgd-dev build-essential libyajl-dev git libreadline6 libreadline6-dev



#下载相关软件源码包

wget https://github.com/jemalloc/jemalloc/releases/download/4.2.1/jemalloc-4.2.1.tar.bz2

wget http://tengine.taobao.org/download/tengine-2.1.2.tar.gz

wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz

wget http://zlib.net/zlib-1.2.8.tar.gz

wget http://www.lua.org/ftp/lua-5.3.3.tar.gz

wget http://luajit.org/download/LuaJIT-2.0.4.tar.gz

wget https://openssl.org/source/openssl-1.0.2h.tar.gz


#解压

tar zxvf tengine-2.1.2.tar.gz

tar zxvf pcre-8.39.tar.gz 

tar zxvf zlib-1.2.8.tar.gz 

tar zxvf openssl-1.0.2h.tar.gz 

tar zxvf LuaJIT-2.0.4.tar.gz 

tar zxvf lua-5.3.3.tar.gz 

tar jxvf jemalloc-4.2.1



#下载nginx的gridfs插件

git clone https://github.com/barakav/gridfs-nginx-plugin.git

cd gridfs-nginx-plugin

git clone https://github.com/eagleas/mongo-c-driver.git

cd mongo-c-driver/

git checkout v0.7.1




#编译安装组件

cd lua-5.3.3/

make linux

make install


cd LuaJIT-2.0.4/

make

make install


cd jemalloc-4.2.1/

./configure

make

make install



#设置全局变量

vim /etc/profile

export LUAJIT_LIB=/usr/local/lib

export LUAJIT_INC=/usr/local/include/luajit-2.0

export JEMALLOC_INCLUDEDIR=/usr/local/include/jemalloc

export JEMALLOC_LIBDIR=/usr/local/lib


source /etc/profile



#建议安装目录

mkdir -p /opt/tengine/dso-path


#编译安装tengine

cd /opt/tengine-2.1.2


./configure --prefix=/opt/tengine \

--dso-path=/opt/tengine/dso-path \

--with-rtsig_module \

--with-select_module \

--with-file-aio \

--with-http_v2_module \

--with-http_realip_module \

--with-http_addition_module \

--with-http_geoip_module \

--with-http_sub_module \

--with-http_dav_module \

--with-http_flv_module \

--with-http_mp4_module \

--with-http_dyups_module \

--with-http_gunzip_module \

--with-http_gzip_static_module \

--with-http_auth_request_module \

--with-http_concat_module \

--with-http_sysguard_module \

--with-http_lua_module \

--add-module=../gridfs-nginx-plugin \

--with-pcre=../pcre-8.39 \

--with-zlib=../zlib-1.2.8 \

--with-jemalloc \

--with-openssl=../openssl-1.0.2h \


make

make install


本文出自 “天外飞猪啊~~~~~” 博客,转载请与作者联系!

Tengine+LUA+Nginx-GridFS+jemalloc编译安装

标签:tengine lua nginx-gridfs jemalloc

原文地址:http://zhusas.blog.51cto.com/603635/1841153

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!