lua之安装openresty

来源:互联网 发布:上海知行生物科技传销 编辑:程序博客网 时间:2024/05/16 08:38

Ubuntu安装lua

apt-get install -y lua5.2

去官网下载openresty

http://openresty.org/cn/download.html 下载tar -xzvf openresty-1.11.2.2.tar.gz -C /usr/local/cd /usr/local/openresty-1.11.2.2安装./configure --prefix=/opt/openresty \            --with-luajit \            --without-http_redis2_module \            --with-http_iconv_module \            --with-http_postgres_module(postgresql去掉我没装)之后make您可以使用下面的命令来编译:make如果您的电脑支持多核 make 工作的特性, 您可以这样编译:make -j2假设您是的机器是双核。make install

写了个启停脚本,弱智到爆。

#!/usr/bin/env bashbin1=/opt/openresty/bin/openrestypath1=/opt/openresty/nginx/conf/nginx.confif [ $1 ==  start ];then   /opt/openresty/bin/openresty -c /opt/openresty/nginx/conf/nginx.confelif [ $1 == reload ];then  /opt/openresty/bin/openresty -s reloadelif  [ $1 == stop ];then  /opt/openresty/bin/openresty -s quitfi

配置一些openresty

0 0
原创粉丝点击