cd /usr/local/openresty ls # bin COPYRIGHT luajit lualib nginx pod resty.index site cd site/lualib mkdir work cd work mkdir logs/ conf/ vim /conf/nginx/conf worker_processes 1; error_log logs/error.log; events { worker_connections 1024; } http { server { listen 8080; location / { default_type text/html; content_by_lua_block { ngx.say("<p>hello, world</p>") } } } }
wget http://luarocks.github.io/luarocks/releases/luarocks-3.1.3.tar.gz tar zxvf luarocks-3.1.3.tar.gzcd cd luarocks-3.1.3/ ./configure --prefix=/usr/local/openresty/luajit \ --with-lua=/usr/local/openresty/luajit/ \ --lua-suffix=jit \ --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 make && make install