0
0
0Boo2014-04-03 15:25:15
Nginx
0Boo, 2014-04-03 15:25:15

How to install nginx + LuaJIT on Debian Wheezy?

Tell me how to build nginx with LuaJIT. I rummaged through the entire Internet, and did not find a normal instruction, except perhaps on the Nginx website. All this is necessary for the thesis project.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
teet, 2014-04-03
@0Boo

here is how i installed on ubuntu 12.04:
first install LuaJIT 2.0

cd
git clone http://luajit.org/git/luajit-2.0.git
cd luajit-2.0
make
sudo make install
ln -s /usr/local/lib/libluajit-5.1.so.2.0.3 /usr/lib/libluajit-5.1.so.2

then install Lua
apt-get install -y lua5.1 liblua5.1-0 liblua5.1-0-dev
sudo ln -s /usr/lib/x86_64-linux-gnu/liblua5.1.so /usr/lib/liblua.so

then download ngx_devel_kit:
wget https://github.com/simpl/ngx_devel_kit/archive/v0.2.19.tar.gz
tar -xfz v0.2.19.tar.gz

then download ngx_lua:
wget https://github.com/chaoslawful/lua-nginx-module/archive/v0.9.6.tar.gz
tar -xfz v0.9.6.tar.gz

next download nginx
wget http://nginx.org/download/nginx-1.4.7.tar.gz
tar -xfz nginx-1.4.7.tar.gz
cd nginx-1.4.7

and finally collect:
export LUAJIT_LIB=/usr/lib
export LUAJIT_INC=/home/ubuntu/luajit-2.0/src
./configure --prefix=/opt/nginx --conf-path=/opt/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-http_ssl_module --add-module=/home/ubuntu/lua-nginx-module-0.9.6 --add-module=/home/ubuntu/ngx_devel_kit-0.2.19 
make -j2
make install

T
teet, 2014-04-03
@teet

according to this instruction:
wiki.nginx.org/HttpLuaModule#Installation
everything is assembled and working fine.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question