geoip is one of the must-have module for Nginx, in the latest Nginx package i couldn't find geoip2 support. It is showing a few dependency errors.
Asked
Active
Viewed 2,237 times
1 Answers
1
If you are using Amazon Linux 2, following will work mostly .
sudo yum install pcre-devel
sudo yum install zlib-devel
sudo yum install openssl-devel.x86_64
mkdir nginx-build
cd nginx-build
wget http://nginx.org/download/nginx-1.16.1.tar.gz
wget https://github.com/leev/ngx_http_geoip2_module/archive/3.2.tar.gz
wget https://github.com/maxmind/libmaxminddb/releases/download/1.3.2/libmaxminddb-1.3.2.tar.gz
tar -xvf libmaxminddb-1.3.2.tar.gz
cd libmaxminddb-1.3.2/
./configure
make
make check
sudo make install
sudo ldconfig
tar -xvf nginx-1.16.1.tar.gz
tar -xvf 3.2.tar.gz
cd nginx-1.16.1
./configure --add-dynamic-module=../ngx_http_geoip2_module-3.2 --with-http_ssl_module
make
sudo make install
/usr/local/nginx/sbin/nginx -v

Shameem
- 21
- 3
-
If using CentOS/RHEL 8, you can: `yum install https://extras.getpagespeed.com/release-el8-latest.rpm` then `yum install nginx-module-geoip2` – Danila Vershinin Oct 14 '19 at 11:28
-
1Getpagespeed has a paid subscription - $50/month – d3ag0s Dec 10 '20 at 08:13