Linux中openresty安装配置,


apt-get安装以下的开发库:

apt-get install libpcre3-dev \

libssl-dev perl make build-essential curl

下载

从下载页 Download下载最新的 OpenResty® 源码包,并且像下面的示例一样将其解压:

tar -xzvf openresty-VERSION.tar.gz

./configure

然后在进入 openresty-VERSION/ 目录, 然后输入以下命令配置:

./configure

默认, --prefix=/usr/local/openresty 程序会被安装到/usr/local/openresty目录。

您可以指定各种选项,比如

./configure --prefix=/opt/openresty \

--with-luajit \

--without-http_redis2_module \

--with-http_iconv_module \

--with-http_postgres_module

试着使用 ./configure --help 查看更多的选项。

配置文件(./configure script)运行出错可以到 build/nginx-VERSION/objs/autoconf.err 找到。

make

您可以使用下面的命令来编译:

make

如果您的电脑支持多核 make 工作的特性, 您可以这样编译:

make -j2

假设您是的机器是双核。

make install

如果前面的步骤都没有问题的话,您可以使用下面的命令安装l OpenResty到您的系统之中:

make install

在 Linux,通常包括 sudo来执行root权限做的事情。

转载于:https://www.jianshu.com/p/7f7e2fba827d

相关内容

    暂无相关文章