Skip to content

Instantly share code, notes, and snippets.

@henryyan
Created May 8, 2015 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henryyan/959295cd2381c17142f1 to your computer and use it in GitHub Desktop.
Save henryyan/959295cd2381c17142f1 to your computer and use it in GitHub Desktop.
安装tengine和lua\cjson
sudo yum -y install pcre-devel openssl openssl-devel
# tengine base
wget http://tengine.taobao.org/download/tengine-2.1.0.tar.gz
tar xzvf tengine-2.1.0.tar.gz
# install tengine
./configure
make
sudo make install
# install tengine output
Configuration summary
+ using system PCRE library
+ using system OpenSSL library
+ md5: using OpenSSL library
+ sha1: using OpenSSL library
+ using system zlib library
+ jemalloc library is disabled
nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/nginx/sbin/nginx"
nginx configuration prefix: "/usr/local/nginx/conf"
nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
nginx pid file: "/usr/local/nginx/logs/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx dso module path: "/usr/local/nginx/modules/"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"
# config
/usr/local/nginx
sudo mkdir conf.d
wget http://luajit.org/download/LuaJIT-2.0.3.tar.gz
tar xzvf LuaJIT-2.0.3.tar.gz
cd LuaJIT-2.0.3
make && sudo make install
# prepare install
git clone https://github.com/simpl/ngx_devel_kit.git
git clone https://github.com/chaoslawful/lua-nginx-module.git
wget http://www.kyne.com.au/~mark/software/download/lua-cjson-2.1.0.tar.gz
tar xzvf lua-cjson-2.1.0.tar.gz
# 打开Makefile在LUA_INCLUDE_DIR后面添加luajit-2.0
sudo make install
# install modules
export LUAJIT_LIB=/usr/local/lib
export LUAJIT_INC=/usr/local/include/luajit-2.0
# Here we assume Nginx is to be installed under /opt/nginx/.
./configure --prefix=/usr/local/nginx \
--with-ld-opt='-Wl,-rpath,/usr/local/lib' \
--add-module=/home/henryyan/cgi-proxy-tools/ngx_devel_kit \
--add-module=/home/henryyan/cgi-proxy-tools/lua-nginx-module
make -j2
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment