tar zxvf LuaJIT-2.0.5.tar.gz cd LuaJIT-2.0.5 make && make install
安装Nginx并加载模块
1 2 3 4 5 6
tools]# tar xf nginx-1.20.1.tar.gz tools]#cd nginx-1.20.1/ nginx-1.20.1]# export LUAJIT_LIB=/usr/local/lib nginx-1.20.1]# export LUAJIT_INC=/usr/local/include/luajit-2.0 nginx-1.20.1]# ./configure --user=www --group=www --prefix=/application/nginx-1.20 --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_gzip_static_module --add-module=/server/tools/ngx_devel_kit-0.3.1/ --add-module=/server/tools/lua-nginx-module-0.10.10 nginx-1.20.1]# make && make install
报错:
1 2 3
如果不创建符号链接,可能出现以下异常: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No such file or directory nginx-1.20.1]# ln -s /usr/local/lib/libluajit-5.1.so.2 /lib64/libluajit-5.1.so.2
[root@opsany ~]# /usr/local/openresty/nginx/sbin/nginx -t nginx: the configuration file /usr/local/openresty-1.19.9.1/nginx/conf/nginx.conf syntax is ok nginx: configuration file /usr/local/openresty-1.19.9.1/nginx/conf/nginx.conf test is successful [root@opsany ~]# /usr/local/openresty/nginx/sbin/nginx