lua之安装openresty

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 bash

bin1=/opt/openresty/bin/openresty
path1=/opt/openresty/nginx/conf/nginx.conf
if [ $1 ==  start ];then
   /opt/openresty/bin/openresty -c /opt/openresty/nginx/conf/nginx.conf
elif [ $1 == reload ];then
  /opt/openresty/bin/openresty -s reload
elif  [ $1 == stop ];then
  /opt/openresty/bin/openresty -s quit
fi

配置一些openresty

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值