系统:rocky linux9.4
openresty:1.25.3.1
openresty下载地址可以去官网下:https://openresty.org/
首先装好依赖包
[root@rocky9 ~]# yum -y install gd gd-devel libpq libpq-devel gperftools gperftools-devel pcre-devel openssl-devel gcc curl zlib-devel make
整理好了,直接复制贴过去,如果你需要安装geoip模块还需要单独装一下geoip的包
下载地址:https://github.com/maxmind/geoip-api-c
安装也比较简单,下载完解压
[root@rocky9 dl]# cd GeoIP-1.6.12/
[root@rocky9 dl]# ./configure
[root@rocky9 dl]# make
[root@rocky9 dl]# make install
如果不需要geoip可以忽略这步
下载openresty并解压
[root@rocky9 dl]# tar -zxvf openresty-1.25.3.1.tar.gz
[root@rocky9 dl]# cd openresty-1.25.3.1/
[root@rocky9 openresty-1.25.3.1]# ./configure --prefix=/data/openresty --with-http_iconv_module \
--with-http_postgres_module --with-http_ssl_module --with-http_v2_module \
--with-http_v3_module --with-http_realip_module --with-http_addition_module \
--with-http_image_filter_module --with-http_image_filter_module=dynamic \
--with-http_geoip_module --with-http_geoip_module=dynamic --with-http_sub_module \
--with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module \
--with-http_secure_link_module --with-http_stub_status_module --with-google_perftools_module
[root@rocky9 openresty-1.25.3.1]# gmake
[root@rocky9 openresty-1.25.3.1]# gmake install