https://trac.osgeo.org/gdal/wiki/BuildingOnUnix
sudo apt-get install build-essential libpq-dev
wget http://download.osgeo.org/gdal/CURRENT/gdal-2.2.3.tar.gz
tar -zxvf gdal-2.2.3.tar.gz
cd gdal-2.2.3
./configure --with-pg
make
sudo make install
gdalinfo --version
It should display :
GDAL 2.2.3, released 2017/11/20
http://mapserver.org/installation/unix.html
sudo apt-get install cmake \
libpng++-dev libfreetype6-dev libjpeg-dev \
libproj-dev libcurl4-gnutls-dev \
libgeos-dev libxml2-dev libgif-dev libfcgi-dev libfribidi-dev libharfbuzz-dev \
libcairo2-dev
wget http://download.osgeo.org/mapserver/mapserver-7.0.7.tar.gz
tar -zxvf mapserver-7.0.7.tar.gz
cd mapserver-7.0.7
mkdir build
cd build
cmake -DWITH_CLIENT_WMS=ON -DWITH_CLIENT_WFS=ON -DWITH_CURL=ON ..
make
sudo make install
mapserv -v
It should display :
MapServer version 7.0.7 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVR SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDL INPUT=SHAPEFILE
sudo apt-get install apache2
sudo a2enmod cgid
sudo service apache2 restart
sudo ln -s /usr/local/bin/mapserv /usr/lib/cgi-bin/mapserv
sudo ln -s ~/openlabs-geoportal/mapserver/fonts.txt /usr/lib/cgi-bin/fonts.txt
sudo ln -s ~/openlabs-geoportal/mapserver/symbols.txt /usr/lib/cgi-bin/symbols.txt
sudo cp ~/openlabs-geoportal/mapserver/mapserver.conf /etc/apache2/conf-available/mapserver.conf
sudo a2enconf mapserver
sudo service apache2 restart
http://mapserver.org/mapcache/install.html
sudo apt-get install libaprutil1-dev libapr1-dev apache2-dev libsqlite3-dev libarchive-dev
git clone git://github.com/mapserver/mapcache.git
cd mapcache
mkdir build
cd build
cmake ..
make
sudo make install
sudo cp ~/openlabs-geoportal/mapcache/mapcache.conf /etc/apache2/mods-available/mapcache.conf
sudo cp ~/openlabs-geoportal/mapcache/mapcache.load /etc/apache2/mods-available/mapcache.load
sudo a2enmod mapcache
sudo service apache2 restart
You'll maybe need to fix the path defined in /etc/apache2/mods-available/mapcache.conf