安装OpenResty
OpenResty,也被称为“ngx_openresty”,是一个基于Nginx的核心Web应用程序服务器,它包含了大量的第三方的Nginx模块和大部分系统依赖包。 OpenResty不是Nginx的分支,它只是一个软件包。主要有章亦春维护。
为什么是OpenResty?
OpenResty允许开发人员使用lua编程语言构建现有的Nginx的C模块,支持高流量的应用程序。
安装OpenResty
依赖的软件包:
- perl 5.6.1+
- libreadline
- libpcre
- libssl
Debian 和 Ubuntu系统:
1
|
apt
-
get
install
libreadline
-
dev
libncurses5
-
dev
libpcre3
-
dev
libssl
-
dev
perl
make
|
Fedora 、RedHat 和 centos系统:
1
|
yum
install
readline
-
devel
pcre
-
devel
openssl
-
devel
|
下载OpenResty
1
|
wget
http
:
//openresty.org/download/ngx_openresty-1.5.8.1.tar.gz.
|
解压、编译、安装:
1
2
3
4
5
|
tar
xzvf
ngx_openresty
-
1.5.8.1.tar.gz
cd
ngx_openresty
-
1.5.8.1
/
.
/
configure
--
with
-
luajit
make
make
install
|
另外的配置选项:
1
2
3
4
5
6
7
|
.
/
configure
--
prefix
=
/
opt
/
openresty
--
with
-
luajit
--
without
-
http_redis2_module
--
with
-
http_iconv_module
--
with
-
http_postgres_module
-
j2
--
help
to
see
more
options
|
参考资料:
官方: http://openresty.org/
Github: https://github.com/agentzh/ngx_openresty
收 藏
成长的对话版权声明:以上内容作者已申请原创保护,未经允许不得转载,侵权必究!授权事宜、对本内容有异议或投诉,敬请联系网站管理员,我们将尽快回复您,谢谢合作!