备注:
 
  此次安装使用的是openresty 的openresty-1.11.2.1(openresty-1.11.2.1.tar.gz,最新版本存在cjson 包的问题 )
  同时对于luarocks 使用源码安装(使用yum 会有包的问题,解决起来少为费事点,实际上通过配置环境变量
  也可以解决,就是费事,同时容易遗漏)
  
1. openresty 安装(需要的依赖按照提示安装即可)
wget https://openresty.org/download/openresty-1.11.2.1.tar.gz

tar zxvf openresty-1.11.2.1.tar.gz

cd openresty-1.11.2.1

./configure

gmake && gmake install 
2. luarocks(源码)
wget https://luarocks.github.io/luarocks/releases/luarocks-2.4.3.tar.gz
tar -xzvf luarocks-2.4.3.tar.gz
cd luarocks-2.4.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
sudo make install
3. lapis&&moonscript安装(lua 编译)
/usr/local/openresty/luajit/luarocks   install  moonscript
/usr/local/openresty/luajit/luarocks install lapis
4. 工具环境变量配置
ln -s  /usr/local/openresty/luajit/bin/luarocks /usr/bin/luarocks
ln -s /usr/local/openresty/luajit/bin/lapis /usr/bin/lapis
ln -s /usr/local/openresty/luajit/bin/moonc /usr/bin/moonc
ln -s /usr/local/openresty/luajit/bin/moon /usr/bin/moon
5. lapis 使用
// 目前站点放在 /usr/local/openresty/site/lualib 可以自定义

// create projeect
lapis new --lua (默认为moonscript 最好使用moonc 进行实时编译)
lapis server
6. 效果
 
 
 
7. 参考资料
http://moonscript.org/
http://leafo.net/lapis/reference/lua_getting_started.html
https://openresty.org/en/using-luarocks.html
https://openresty.org/en/download.html#source-code-releases
 
 
 
 

最新文章

  1. iOS开发之巧用Block和代理方法结合来传值
  2. 关于xml的使用。
  3. DEDE整站动态化或整站静态化设置方法,织梦栏目批量静态/动态方法
  4. java筛选法求素数
  5. mac 下搭建php 编程环境全过程
  6. 关于Repository模式
  7. 关于php中数据访问的几点补充
  8. 【FastJSON】解决FastJson中“$ref 循环引用”的问题
  9. NS3 日志(Logging)、命令行参数、Tracing系统概述(转载)
  10. 转载 《AngularJS》5个实例详解Directive(指令)机制
  11. js SVG
  12. java对图片的裁剪(包括来自网络的图片)
  13. g++ error: expected ‘)’ before ‘*’ token
  14. C++ : 类型的别名和对象的别名
  15. Bootstrap第一天
  16. nodeJS之事件events
  17. JS常用基础知识
  18. 多线程threading 的使用
  19. Chapter 4 Invitations——7
  20. MFC 显示图片

热门文章

  1. hdu3706单调队列
  2. Java中如何获取多维数组的长度
  3. 三十二 Python分布式爬虫打造搜索引擎Scrapy精讲—scrapy的暂停与重启
  4. anaconda的一些命令
  5. IOS-启动图和开屏广告图,类似网易
  6. java中的一些执行顺序,代码块,静态,构造,成员。。。。(转的)
  7. 一个好工具-everything-可以找到浏览器的所有缓存
  8. Hibernate Validator参数校验
  9. 在VC2015里包含了lib库,但没有设置对路径的出错
  10. 服务上部署jmeter远程机