作者:mobiledu2502881573 | 来源:互联网 | 2023-10-10 18:53
安装Libgdsudoapt-getinstall-ylibgd-dev安装lua&luajitsudoaptinstall-ylua5.1liblua5.1-0-devlu
安装 Libgd
sudo apt-get install -y libgd-dev
安装 lua & luajit
sudo apt install -y lua5.1 liblua5.1-0-dev luajit libluajit-5.1-dev
环境变量设置
export LUAJIT_LIB=/usr/lib/x86_64-linux-gnu
export LUAJIT_INC=/usr/include/luajit-2.0
clone 最新版 lua_ngx
git clone https://github.com/openresty/lua-nginx-module.git
下载 Nginx 1.11.x
wget http://nginx.org/download/nginx-1.11.13.tar.gz
tar -xzf nginx-1.11.13.tar.gz
cd nginx-1.11.13/
配置编译Nginx
./configure --user=nginx --group=nginx \
--prefix=/usr/local/nginx \
--conf-path=/etc/nginx/nginx.conf \
--pid-path=/var/run/nginx.pid \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_image_filter_module \
--with-ld-opt="-Wl,-rpath,/usr/lib/x86_64-linux-gnu" \
--add-module=../lua-nginx-module
make -j2
make install