我要评分
获取效率
正确性
完整性
易理解

Installing GDAL

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Create an installation directory.
    mkdir -p /path/to/gdal
  3. Go to the installation directory.
    cd /path/to/gdal
  4. Obtain the source code.
    wget http://download.osgeo.org/gdal/2.2.4/gdal-2.2.4.tar.gz
  5. Decompress the source package.
    tar -zxvf gdal-2.2.4.tar.gz
  6. Go to the directory generated after the decompression.
    cd gdal-2.2.4
  7. Configure the compilation.
    ./configure --with-static-proj4=/usr --prefix=/path/to/gdal --without-pam --with-png=/usr --with-gif=internal --with-libtiff=internal --with-geotiff=internal --with-jpeg=/usr --with-libz=/usr --with-sqlite3=no --with-expat=no --with-curl=no --without-ld-shared --with-hdf4=no --with-hdf5=no --with-pg=no --without-grib --disable-shared --with-freexl=no --with-geos=no --with-openjpeg=no --with-mysql=no --with-ecw=no --with-fgdb=no --with-odbc=no --with-xml2=no --with-ogdi=no --with-pcraster=no --with-xerces=no

  8. Perform the compilation and installation.
    make -j 8

    make install

  9. Set the environment variables.
    export PATH=/path/to/gdal/bin:$PATH
    export LD_LIBRARY_PATH=/path/to/gdal/lib:$LD_LIBRARY_PATH