1

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.

Shameem
  • 21
  • 3

1 Answers1

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