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

一、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的安装、启动、停止与重启》上有1条评论

  1. Pingback引用通告: openResty的安装配置详解 | 精彩每一天

发表评论

电子邮件地址不会被公开。 必填项已用*标注

您可以使用这些HTML标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>