Windows下安装配置orange 权限框架

工具:win32 cygwin
镜像源:http://mirrors.163.com/cygwin/x86
需要安装的工具:openssl、pcre、libcrypt、zlib、make、perl、 readline

参考:
http://blog.csdn.net/herro/article/details/16986477

openresty没有对Cygwin做兼容,我们需要自己来修改文件
Open bundle\lua-cjson and lua-rds-parser and  lua-Redis-parser three folder's Makefile for edit, Add those lines before “## ..... (Macports)”
bundle\lua-cjson的,lua-rds-parser的,lua-redis-parser的Makefile里,“## ***OSX (Macports)”上面加入:
[plain] view plain copy
ifeq ($(OS),Windows_NT)  
  LDFLAGS2 += -L../luajit-root/usr/local/openresty/luajit -lcyglua51  
endif  
change 
[plain] view plain copy
$(CC) $(LDFLAGS) -o $@ $^  
(cjson may be "$(CC) $(LDFLAGS) $(CJSON_LDFLAGS) -o $@ $(OBJS)")
to
$(CC) $(LDFLAGS) -o $@ $^ $(LDFLAGS2)  
(cjson may be 
$(CC) $(LDFLAGS) $(CJSON_LDFLAGS) -o $@ $(OBJS) $(LDFLAGS2)
Then run:
./configure --without-select_module --with-luajit  --with-http_stub_status_module
mv ./build/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 /usr/local/include  
cp ./build/LuaJIT-2.1-20170405/src/cyglua51.dll /lib/libluajit-5.1.a  
./configure --without-select_module --with-luajit --with-http_stub_status_module (must do this again)  
cp ./build/LuaJIT-2.1-20170405/src/cyglua51.dll ./build/luajit-root/usr/local/openresty/luajit  
make -j8  
make install
cp ./build/LuaJIT-2.1-20170405/src/cyglua51.dll /usr/local/openresty/nginx/sbin/ /usr/local/openresty/nginx/sbin/nginx -c /usr/local/openresty/nginx/conf/nginx.conf

export NGINX_HOME=/usr/local/openresty/nginx
export PATH=$PATH:$NGINX_HOME/sbin
source /etc/profilecd

cp ./usr/local/openresty/bin/resty /usr/local/bin/

使用脚本安装(推荐)
使用Makefile安装lor框架:
git clone https://github.com/sumory/lorcd lormake install
默认lor的运行时lua文件会被安装到/usr/local/lor下, 命令行工具lord被安装在/usr/local/bin下。
如果希望自定义安装目录, 可参考如下命令自定义路径:
make install LOR_HOME=/path/to/lor LORD_BIN=/path/to/lord
执行默认安装后, lor的命令行工具lord就被安装在了/usr/local/bin下, 通过which lord查看:
$ which lord/usr/local/bin/lord
lor的运行时包安装在了指定目录下, 可通过lord path命令查看。

使用
$ lord -hlor ${version}, a Lua web framework based on OpenResty.Usage: lord COMMAND [OPTIONS]Commands: new [name]             
Create a new application start                  
Starts the server stop                   Stops the server restart                
Restart the server version                Show version of lor help                   Show help tips
执行lord new lor_demo,则会生成一个名为lor_demo的示例项目,然后执行:
cd lor_demolord start



你可能感兴趣的:(一些神奇的工具)