在linux下安装ngx_lua模块,iconv模块
来源:互联网 发布:淘宝哪家眼镜店好 编辑:程序博客网 时间:2024/06/05 10:18
1.下载LUAJIT2.0,ngx_lua,nginx等文件,地址如下:
LUAJIT2.0:http://luajit.org/download/LuaJIT-2.0.0.tar.gz
ngx_lua:https://github.com/chaoslawful/lua-nginx-module/archive/master.zip
nginx:http://nginx.org/download/nginx-1.2.6.tar.gz
2.解压缩以上的压缩包,并放到某个指定的目录,例如/root
3.安装LUAJIT2.0
例如LUAJIT2.0的压缩包解压缩到/root/LuaJIT-2.0.0了,
cd /root/LuaJIT-2.0.0[root@localhost ~]#make && make install执行以上shell命令后,你会在/usr/local/lib,/usr/local/include这个两个目录看到LuaJIT2.0的相关文件
4.安装nginx和ngx_lua模块
如果没有zlib库,则先安装zlib库,例如用yum install zlib-devel命令来安装
例如把nginx压缩包解压缩到/root/nginx-1.2.6,ngx_lua压缩包解压缩到/root/lua-nginx-module-master
[root@localhost ~]#cd /root/nginx-1.2.6[root@localhost ~]#export LUAJIT_LIB=/usr/local/lib[root@localhost ~]#export LUAJIT_INC=/usr/local/include/luajit-2.0[root@localhost ~]#./configure --with-ld-opt="-Wl,-rpath,$LUAJIT_LIB" --add-module=/root/lua-nginx-module-master --without-http_rewrite_module[root@localhost ~]#make -j2[root@localhost ~]#make install执行以上shell命令则将nginx安装到/usr/local/nginx下了,并且ngx_lua模块也添加到nginx了。
5.下载lua-iconv,luarocks等文件,地址如下:
https://github.com/downloads/ittner/lua-iconv/lua-iconv-7.tar.gz
http://luarocks.org/releases/luarocks-2.0.12.tar.gz
6.安装luarocks
之所以安装luarocks,是因为luarocks可以帮你安装许多lua的第三方库,非常方便,而且在安装luajit之后再源码编译安装lua-iconv比较费劲。
假如你把luarocks的压缩包解压缩到/root/luarocks-2.0.12,用以下命令来安装luarocks
[root@localhost ~]#cd /root/luarocks-2.0.12[root@localhost ~]#./configure --with-lua="/usr/local" --prefix="/usr/local" --lua-suffix="jit" --with-lua-include="/usr/local/include/luajit-2.0" --force-config[root@localhost ~]#make && make install由于没有安装Lua,在安装luarocks需要指定luajit的安装路径
7.安装lua-iconv模块
执行以下命令就能将lua-iconv模块安装好,可以在/usr/local/lib/lua/5.1目录看到一个iconv.so动态链接库
[root@localhost ~]#luarocks install lua-iconv
参考:
http://luajit.org/install.html
http://wiki.nginx.org/HttpLuaModule#Installation
https://gist.github.com/1125331
https://github.com/chaoslawful/lua-nginx-module/issues/8
https://github.com/ittner/lua-iconv
http://www.luarocks.org/
- 在linux下安装ngx_lua模块,iconv模块
- ngx_lua模块
- ngx_lua 模块
- ngx_lua 模块
- ngx_lua 模块
- 在linux下安装MySQLdb模块
- 在linux下安装MySQLdb模块
- php oauth 模块在linux下安装
- ngx_lua 模块API说明
- ngx_lua模块学习笔记
- ngx_lua模块API 浅析
- ngx_lua 模块开发 入门
- ngx_lua 模块API说明
- ngx_lua模块api
- Linux:在已安装nginx情况下安装nginx模块
- ngx_Lua模块中的重定向
- ngx_Lua模块中的重定向
- linux下安装MySQLdb模块
- 【D3D11游戏编程】学习笔记十:程序框架
- 关闭Windows Defender的方法
- 学习笔记之使用vi之移动光标(二)
- Yii Framework 开发教程(10) UI 组件 自定义组件
- IntelliJ Idea 常用快捷键列表
- 在linux下安装ngx_lua模块,iconv模块
- mysql_auto_increment设置初始值
- 游标加锁更新数据
- oraclevm 安装mac os x 10.8
- SET TRANSACTION READ ONLY 只读事务
- Sum of absolute differences
- 黑马程序员-网络编程
- 使用Silverlight Toolkit中的主题(Theme)
- 计算机视觉、模式识别、机器学习常用牛人主页链接