【原创】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

相关推荐

  • N22+北京+张zhangzhang+第三周作业

    1、列出当前系统上所有已经登录的用户的用户名,注意:同一个用户登录多次,则只显示一次即可。 who | cut -d" " -f1 | sort -u 2、取出最后登录到当前系统的用户的相关信息。 id `who | cut -d" " -f1 | tail -1` 3、取出当前系统上被用户当作其默认shell的最多的…

    Linux干货 2016-09-05
  • 第六周:vim编辑器和cron计划任务的使用练习

    查看vim编辑器的使用介绍另见:http://afterdawn.blog.51cto.com/7503144/1855557 at及cront计划任务介绍见:http://afterdawn.blog.51cto.com/7503144/1864365 1、复制/etc/rc.d/rc.sysinit文件至/tmp目录,将/tmp/rc.sysinit文件…

    Linux干货 2016-10-26
  • Leetcode 编程训练

    Leetcode这个网站上的题都是一些经典的公司用来面试应聘者的面试题,很多人通过刷这些题来应聘一些喜欢面试算法的公司,比如:Google、微软、Facebook、Amazon之类的这些公司,基本上是应试教育的功利主义。 我做这些题目的不是为了要去应聘这些公司,而是为了锻炼一下自己的算法和编程能力。因为我开始工作的时候基本没有这样的训练算法和编程的网站,除了…

    Linux干货 2016-08-15
  • 组管理与grep匹配

    1、复制/etc/skel目录为/home/tuser1,要求/home/tuser1及其内部文件的属组和其它用户均没有任何访问权限。     ~]# cp -r /etc/skel /home/tuser1     ~]# chmod -R 700 /home/tuser1 2…

    Linux干货 2016-10-17
  • hbase安装配置(整合到hadoop)

    1.  快速单击安装 在单机安装Hbase的方法。会引导你通过shell创建一个表,插入一行,然后删除它,最后停止Hbase。只要10分钟就可以完成以下的操作。 1.1下载解压最新版本 选择一个 Apache 下载镜像:http://www.apache.org/dyn/closer.cgi/hbase/,下载 HBase Re…

    Linux干货 2015-04-13
  • Linux发行版的基础目录名称、命名法则及功能规定

    Linux发行版的基础目录名称、命名法则及功能规定 / 主层次的根,也是整个文件系统层次结构的根目录  /bin 存放系统的命令。  /boot 存放系统的启动文件,及其内核。  /dev 系统设备文件主目录。  /etc 系统主要配置文件主目录。  /home 普通用户家目录。  /lib 系统库…

    Linux干货 2016-10-31

评论列表(1条)

  • N24_yezi
    N24_yezi 2016-11-30 21:05

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