[GIS] How to install GDAL 2.x on CentOS 7 without building from source

centosgdalrepository

I'm trying to install GDAL 2.X on CentOS7 without building from source because I'll need configure it in another servers and installing by source code will be a very tiring and time-consuming task.

I found some repositories like opengeo and ELGIS but they are for CentOS7.
On EPEL repo doesn't have GDAL 2.x available.

[root@localhost ~]# yum repo-pkgs epel list gdal*
(...)
Available Packages
gdal.x86_64               1.11.4-1.el7    @epel
gdal-libs.x86_64          1.11.4-1.el7    @epel
gdal-python.x86_64        1.11.4-1.el7    @epel
gdal-devel.x86_64         1.11.4-1.el7    @epel
gdal-doc.noarch           1.11.4-1.el7    @epel
gdal-java.x86_64          1.11.4-1.el7    @epel
gdal-javadoc.noarch       1.11.4-1.el7    @epel
gdal-perl.x86_64          1.11.4-1.el7    @epel

The version 1.11 which isn't quite the latest from 1.x major version.

Is it possible to install from any repository, or just from source? If not, is it possible to build as a RPM to be easy installed across multiple servers?

Best Answer

We tend to install the Anaconda Python distribution, which also includes a fairly complete GDAL version in conda-forge. All you need to do to make it work is to add your anaconda directory to $PATH. You get the Python bindings, but also the binary executables (e.g. gdalinfo and friends).

You can also use the recipe on conda-forge to build your own version if you require drivers, as it's quite straightforward to modify and is designed for compiling without interaction.