首页 / 安装部署 / LuaJIT-2.1.0相关以及ngx_lua_waf防火墙配置相关

LuaJIT-2.1.0相关以及ngx_lua_waf防火墙配置相关

2018-01-20 14:44:41安装部署 阅读 3874
wget https://www.isres.com/file/LuaJIT-2.1.0-beta3.tar.gz
tar -zxvf LuaJIT-2.1.0-beta3.tar.gz
cd LuaJIT-2.1.0-beta3
make && make install

export LUAJIT_LIB=/usr/local/lib
export LUAJIT_INC=/usr/local/include/luajit-2.1
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH


# lua -v
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio

cd ../


wget https://www.isres.com/file/ngx_devel_kit.zip
unzip ngx_devel_kit.zip
wget https://www.isres.com/file/lua-nginx-module.zip
unzip lua-nginx-module.zip

如果已经安装有nginx 的nginx -V 看看还有什么第三方模块
configure arguments: --prefix=/usr/local/nginx --user=www --group=www --with-mail --with-mail_ssl_module --with-http_ssl_module --with-http_flv_module --with-http_dav_module --with-http_sub_module --with-http_realip_module --with-http_addition_module --with-http_gzip_static_module --with-http_stub_status_module --with-pcre --add-module=/usr/tmp/ngx_cache_purge-master/ --add-module=/usr/tmp/ngx_http_substitutions_filter_module-master

wget https://www.isres.com/file/ngx_cache_purge-2.3.tar.gz
tar -zxvf ngx_cache_purge-2.3.tar.gz
wget https://www.isres.com/file/ngx_http_substitutions_filter_module.tar.gz
tar -zxvf ngx_http_substitutions_filter_module.tar.gz

wget https://www.isres.com/file/nginx-1.15.5.tar.gz
tar -zxvf nginx-1.15.5.tar.gz && cd nginx-1.15.5/

./configure --prefix=/usr/local/nginx \
--user=www --group=www --with-mail --with-mail_ssl_module --with-http_ssl_module \
--with-http_flv_module --with-http_dav_module --with-http_sub_module --with-http_realip_module \
--with-http_addition_module --with-http_gzip_static_module --with-http_stub_status_module \
--with-pcre --add-module=/usr/tmp/ngx_cache_purge-2.3/ \
--add-module=/usr/tmp/ngx_http_substitutions_filter_module-0.6.4 \
--add-module=/usr/tmp/lua-nginx-module-master \
--add-module=/usr/tmp/ngx_devel_kit-master

make
make install

###本人已经有原来旧的改过的规则

cd /usr/local/nginx/
tar -zxvf waf.tar.gz
mv waf conf/


vim conf/nginx.conf

添加

lua_package_path "/usr/local/nginx/conf/waf/?.lua";
lua_shared_dict limit 10m;
init_by_lua_file  /usr/local/nginx/conf/waf/init.lua;
access_by_lua_file /usr/local/nginx/conf/waf/waf.lua;

cd conf/waf
vim config.lua

#logdir = "/usr/local/nginx/logs/hack/" 需要提前建目录
/usr/local/nginx/logs/hack
chown -R www:www /usr/local/nginx/logs/hack

nginx -t
service nginx restart

报错  error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No such file or directory

echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig
service nginx restart



ngx_lua_waf防火墙配置相关
https://github.com/loveshell/ngx_lua_waf

本文《LuaJIT-2.1.0相关以及ngx_lua_waf防火墙配置相关》由爱思考吧 isres.com 分享,转载请注明出处。本文网址:https://www.isres.com/bushu/8.html

本站主要收集测评能够节省时间和提升效率的软件工具并分享使用与学习的过程和感受,任何情况下用户都需遵守所使用软件资源的相关协议。与《LuaJIT-2.1.0相关以及ngx_lua_waf防火墙配置相关》有关的本站文章及资源仅供个人学习交流使用,相关资源请下载后24小时内删除,请勿用于其它用途,因此产生的任何问题由您自行承担。

猜你喜欢

  • centos7重置root密码,解决忘记密码的问题

    centos7重置root密码,解决忘记密码的问题

    重新重启,光标在界面上第一行 按e 。 输入rw single init=/bin/bash 后,按 ctrl+x 引导系统,不要按esc。 使用passwd命令重置密码,并使用touch /.au...

    2024-11-17 16:23:45 701
  • 解决conda不从清华源安装 pytorch-2.1.1-py3.9_cuda11.8_cudnn8.7.0_0.tar.bz2

    解决conda不从清华源安装 pytorch-2.1.1-py3.9_cuda11.8_cudnn8.7.0_0.tar.bz2

    故障介绍 在一次服务器不是实践中,发现以下命令运行时很久没完成,下不动。 conda install pytorch==2.1.1 torchvision==0.16.1 torchaudio==2...

    2024-10-21 22:25:29 1389
  • Centos7 Python3.10安装部署

    Python3.10需要openssl1.11,而默认的不是,如果忽略这个,之后在跑Python会报错 (Caused by SSLError("Can't connect to HTTPS URL...

    2023-04-27 13:35:04 1704
  • pytroch AI机器学习环境部署,RTX3080显卡

    pytroch AI机器学习环境部署,RTX3080显卡

    网上关于机器学习环境部署的文章资料很多,有些可能只是一部分过程,有些则写得很长很长,遇到一些比较好的但要专业知识才能看得懂。 个人曾经看了一个80分钟环境部署视频,事实上只需要一页文档就能说清楚的,视...

    2023-04-24 12:37:24 1600
  • 自用实践两台电脑共用一个音响的方案

    自用实践两台电脑共用一个音响的方案

    家里有两台电脑,其中有一台不常用的也只有打游戏联机的时候才开,不想单独配一个音箱,于是必须实践两台电脑共用一个音响的方案。 本次方案就是加一条音频线,连接两台电脑,效果如下: 一般主板都有音频输入和...

    2023-09-07 09:42:20 3623
  • 2024年linux tp3.2安装使用Composer

    2024年linux tp3.2安装使用Composer

    效果演示 [root@localhost ~]# ln -s /usr/local/php/bin/php /usr/bin/php [root@localhost ~]# php -v PHP 7...

    2024-10-15 13:13:03 514
  • ubuntu使用apt安装lnmp,类似centos的yum方法

    ubuntu使用apt安装lnmp,类似centos的yum方法

    效果演示 操作步骤 安装mysql5.7 自认为配置低,不想安装mysql8.0,所以选了mysql5.7 sudo apt update wget https://dev.mysql.com/ge...

    2024-09-12 18:02:02 794
  • 【实操】ubuntu安装python 3.10和pip3

    【实操】ubuntu安装python 3.10和pip3

    安装完成截图 安装步骤 sudo apt update apt install software-properties-common -y add-apt-repository ppa:deadsn...

    2024-10-09 19:05:42 926