最新消息:

openResty的安装、启动、停止与重启

其他技术 koic_zhzz 105浏览 0评论

一、openResty的安装

官方下载:https://openresty.org/download/openresty-1.9.7.4.tar.gz

 

# tar xzf openresty-1.9.7.4.tar.gz
# cd openresty-1.9.7.4
#./configure --prefix=/usr/local/openresty --with-luajit 
--without-http_redis2_module --with-http_iconv_module
# make # make install 
详细的配置参考:

openResty的安装配置详解

安装过程出错,请参考:http://openresty.org/cn/installation.html

二、Yum安装

[openresty]
name=Official OpenResty Open Source Repository for CentOS
baseurl=https://openresty.org/package/centos/$releasever/$basearch
skip_if_unavailable=False
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://openresty.org/package/pubkey.gpg
enabled=1
enabled_metadata=1

Tips : 本人使用 YUM 后,在使用lord(lor框架)时,安装错误 , 提示 “nginx invalid option”,
可能是lord框架,还不兼容openresty的最新版本。

 三、启动、停止与重启

openresty是nginx的luaJit的扩展,openresty的启动、停止、启动操作,实际执行nginx的操作就可以了。

启动:

nginx -c <configuration file>

快速停止nginx:

nginx -s stop

完整有序的停止nginx:

nginx -s quit

修改配置后重新加载生效:

nginx -s reload

重新打开日志文件:

nginx -s  reopen

参考文档:openResty的安装配置详解

转载请注明:落伍老站长 » openResty的安装、启动、停止与重启

发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址