1、首先要安装openresty,这个lor框架是基于openresty.从它官网下载最新openresty。
2、安装openresty前,先安装依赖。yum install readline-devel pcre-devel openssl-devel gcc
3、旧的openresty版本记得要带参数--with-luajit安装,./configure --with-lua枣娣空郅jit && make && make install ,如图,默认会安装好luajit和nginx
4、安装完openresty之后,然后安装lor,找到lor的gitbub地址,复制好。如图。
5、使用命令git clone https://github.com/sumory/lor.git下载lor。
6、进入lor目录,使用脚本衡痕贤伎sh install.sh 安装lor,lor将被安装到/usr/local/lor下。执行命令lord -h测试安装,发现报错。坑来了。
7、熟悉openresty的知道。原来lor调用了openresty的resty命令。那么简单了,做稍僚敉视个软链接ln -s /usr/local/openresty/bin/resty /usr/local/bin/,或者设置变量。另外还要调用openresty的nginx命令。同样做法。