[root@surpass jdk1.8.0_361]# java -versionjava version "1.8.0_361"
Java(TM) SE Runtime Environment (build 1.8.0_361-b09)
Java HotSpot(TM)64-Bit Server VM (build 25.361-b09, mixed mode)
vim /etc/profile
exportANT_HOME=/usr/local/apache-ant-1.10.12
exportPATH=$PATH:$ANT_HOME/bin
4.3.3 配置文件生效
source /etc/profile
4.3.4 验证ant环境有效性
[root@surpass apache-ant-1.10.12]# ant -version
Apache Ant(TM) version 1.10.12 compiled on October 132021
4.4. 安装pcre
tar-jxvf pcre-8.45.tar.bz2
cd pcre-8.45
./configure --enable-utf8
makemakeinstall# 验证是否安装成功[root@surpass bin]# geod
Rel. 6.0.0, March 1st, 2019
4.5 安装swig
tar-zxf swig-2.0.9.tar.gz
cd swig-2.0.9/
./configure
makemakeinstall[root@surpass swig-2.0.9]# swig -version
SWIG Version 2.0.9
Compiled with g++ [x86_64-unknown-linux-gnu]
Configured options: +pcre
Please see http://www.swig.org for reporting bugs and further information
4.6 安装geos
tar-jxvf geos-3.7.3.tar.bz2
cd geos-3.7.3
makemakeinstall
ldconfig
4.7 安装jpeg
4.7.1 编译插件
tar-zxvf jpegsrc.v8c.tar.gz
cd jpeg-8c/
./configure --prefix=/opt/jpeg
makemakeinstall
##
# geodata/gdal
#
# This creates an Ubuntu derived base image that installs the latest GDAL
# subversion checkout compiled with a broad range of drivers. The build process
# is based on that defined in
# <https://github.com/OSGeo/gdal/blob/trunk/.travis.yml>
#
# Ubuntu 14.04 Trusty Tahyr
FROM ubuntu:trusty
MAINTAINER Homme Zwaagstra <hrz@geodata.soton.ac.uk>
# Install the application.
ADD . /usr/local/src/gdal-docker/
RUN /usr/local/src/gdal-docker/build.sh
# Externally accessible data is by default put in /data
WORKDIR /data
VOLUME ["/data"]
# Output version and capabilities by default.
CMD gdalinfo --version && gdalinfo --formats && ogrinfo --formats
#!/bin/sh
##
# Install GDAL from within a docker container
#
# This script is designed to be run from within a docker container in order to
# install GDAL. It delegates to `before_install.sh` and `install.sh` which are
# patched from the Travis CI configuration in the GDAL repository.
#
set -e
DIR=$(dirname"$(readlink -f "$0")")
GDAL_VERSION=$(cat ${DIR}/gdal-checkout.txt)
export DEBIAN_FRONTEND=noninteractive
# Set the locale. Required for subversion to work on the repository.
update-locale LANG="C.UTF-8"
dpkg-reconfigure locales
. /etc/default/locale
export LANG
# Instell prerequisites.
apt-get update -y
apt-get install -y software-properties-common wgetunzip subversion ccache clang-3.5patch python-dev ant
# Everything happens under here.
cd /tmp
# Get GDAL.
svn checkout --quiet "http://svn.osgeo.org/gdal/${GDAL_VERSION}/" /tmp/gdal/
# Install GDAL.
cd /tmp/gdal
# Apply our build patches.
patch ./gdal/ci/travis/trusty_clang/before_install.sh ${DIR}/before_install.sh.patchpatch ./gdal/ci/travis/trusty_clang/install.sh ${DIR}/install.sh.patch
# Do the build.
. ./gdal/ci/travis/trusty_clang/before_install.sh
. ./gdal/ci/travis/trusty_clang/install.sh
# Clean up.
apt-get autoremove -y
apt-get clean
rm -rf /var/lib/apt/lists/partial/* /tmp/* /var/tmp/*