【原创】Tengine+LUA+Nginx-GridFS+jemalloc编译安装

操作系统

ubuntu 14.04 LTS

Nginx-GridFS为nginx直接访问mongoDB的扩展模块,目前只支持到mongodb2.6.12

mongodb安装请自己百度

#安装依赖包保平安

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

完事抽身去,深藏功与名~~~

原创文章,作者:N24_Jerry,如若转载,请注明出处:http://www.178linux.com/61627

赞 (0)
N24_JerryN24_Jerry
上一篇 2016-11-30 14:08
下一篇 2016-11-30 16:31

相关推荐

  • 马哥教育网络班20期-第五周课程作业

    Table of Contents 1、显示/boot/grub/grub.conf中以至少一个空白字符开头的行; 2、显示/etc/rc.d/rc.sysinit文件中以#开头,后面跟至少一个空白字符,而后又有至少一个非空白字符的行; 3、打出netstat -tan命令执行结果中以‘LISTEN’,后或跟空白字符结尾的行; 4、添加用户bash, tes…

    Linux干货 2016-07-12
  • Linux之进程和计划任务

    进程的概念     内核的功用:进程管理、文件系统、网络功能、内存管理、驱动程序、 安全功能等     Process: 运行中的程序的一个副本,是被载入内存的一个指令集合进程ID(Process ID,PID)号码被用来标记各个进程    &nbs…

    Linux干货 2016-10-09
  • linux网络配置

    主要内容: ip地址以及子网划分 路由基本概念 网络配置工具:ifconfig,ip,netstat使用 网卡配置文件及修改 IP地址: 它们可唯一标识 IP 网络中的每台设备 v  每台主机(计算机、网络设备、外围设备)必须具有唯 一的地址 v IP地址由两部分组成:   &n…

    Linux干货 2016-09-07
  • 博客启动计划&我个人理解的Python优缺点

    很久没有写博客了,因为最近一直在使用Python。Python实在不是一门好的工作用语言(我的观点是所有的动态语言都不是好的工作用语言,不仅是Python),但是自己玩还是可以的。但,生活所迫,还是要继续用的呀(笑)。 所以呢,博客还是要写的,java还是最喜欢的,Python也是要学习的,当然其实更多是总结了。既然博客要启动了,这篇文字就权当测试吧,使用公…

    Linux干货 2015-03-13
  • 实验:配置静态路由1

    实验:配置静态路由1 IP地址规划如下: 注意,环境准备: 1、MAC地址不要有冲突,如果是复制的虚拟机,对于centos6需删除网卡定义文件rm -f /etc/udev/rules.d/70-persistent-net.rules 2、清空防火墙iptables -F(查看:iptables -vnL) 3、启用IP转发功能:echo 1 > /…

    2017-03-26
  • N22-第九周作业

    第九周    1、写一个脚本,判断当前系统上所有用户的shell是否为可登录shell(即用户的shell不是/sbin/nologin);分别这两类用户的个数;通过字符串比较来实现;    #!/bin/bash    #    decl…

    Linux干货 2016-10-24

评论列表(1条)

  • N24_yezi
    N24_yezi 2016-11-30 21:05

    兄弟,赞一个,替24期耀武扬威啊