# fast **Repository Path**: tianyanwu/fast ## Basic Information - **Project Name**: fast - **Description**: 基于lor框架的一个demo:包含mysql的基本操作、html页面的动态数据交互 - **Primary Language**: Lua - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-03-20 - **Last Updated**: 2026-03-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # fast #### 介绍 基于lor框架的一个demo:包含mysql的操作、html页面的动态数据交互 #### 安装教程 需要的基础环境是:openResty+lor+MariaDB,openResty和lor的安装命令如下 1. openResty - CentOS 7 ``` # install epel, `luarocks` need it. wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm sudo rpm -ivh epel-release-latest-7.noarch.rpm # add openresty source sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo # install openresty and some compilation tools sudo yum install -y openresty openresty-resty curl git automake autoconf \ gcc pcre-devel openssl-devel libtool gcc-c++ luarocks cmake3 lua-devel sudo ln -s /usr/bin/cmake3 /usr/bin/cmake ``` - Ubuntu 18 ``` # add openresty source wget -qO - https://openresty.org/package/pubkey.gpg | sudo apt-key add - sudo apt-get update sudo apt-get -y install software-properties-common sudo add-apt-repository -y "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" sudo apt-get update # install openresty and some compilation tools sudo apt-get install -y openresty openresty-resty curl git luarocks\ check libpcre3 libpcre3-dev libjemalloc-dev \ libjemalloc1 build-essential libtool libssl1.0-dev automake autoconf pkg-config cmake ``` 2. lor ``` git clone https://github.com/sumory/lor.git cd lor sudo make install ``` 3. MariaDB 10.3 网上很多教程(https://www.huaweicloud.com/articles/b05399adcd675ea5808775f97b96e518.html),这里不再赘述 数据库的配置文件是:app/util/mysql_pool.lua ``` local options = { host = "127.0.0.1", port = "3306", user = "root", password = "1234", database = "fast" } ``` #### 启动方式 进入fast根目录,然后执行以下命令 - 启动 ``` sh start.sh ``` - 停止 ``` sh stop.sh ```