安装必要组件
yum install pcre-devel openssl-devel gcc
编译安装
wget http://openresty.org/download/ngx_openresty-1.7.4.1.tar.gz
tar -xvf ngx_openresty-1.7.4.1.tar.gz
cd ngx_openresty-1.7.4.1
./configure
make && make install
检查安装结果
如果没有报错,就应该没问题,默认安装路径如下/usr/local/openresty/路径中,路径内容如下:
drwxr-xr-x 2 root root 4096 Jan 8 17:10 bin
drwxr-xr-x 6 root root 4096 Jan 8 17:10 luajit
drwxr-xr-x 5 root root 4096 Jan 8 17:10 lualib
drwxr-xr-x 6 root root 4096 Jan 8 17:10 nginx