lua之安装openresty,luaopenresty
lua之安装openresty,luaopenresty
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
评论暂时关闭