Install Adaguc on Ubuntu » History » Version 1

Version 1/77 - Next ยป - Current version
Maarten Plieger, 06/17/2013 07:57 AM

Install Adaguc on Ubuntu

sudo apt-get install vim
sudo apt-get install kate kwrite konsole
sudo apt-get install virtualbox-guest-additions virtualbox-guest-x11 virtualbox-guest-utils virtualbox-guest-source virtualbox-guest-dkms virtualbox-guest-additions-iso
sudo apt-get install postgresql
sudo apt-get install libcurl4-openssl-dev libcairo2-dev libxml2-dev libgd2-xpm-dev libproj-dev postgresql-server-dev-all postgresql-client
sudo apt-get install mercurial
sudo apt-get install libudunits2-dev udunits-bin
sudo apt-get install php5
sudo apt-get install php5-gd

#Setup postgres for adaguc:
sudo -u postgres createuser --superuser adaguc
sudo -u postgres psql postgres
\password adaguc # type adaguc as password, when finished press \q to exit.

createdb adagucdemo

#Setup directories under /data/
sudo mkdir /data
sudo chown adaguc /data
mkdir /data/software/
mkdir -p /data/www/htdocs
mkdir -p /data/www/cgi-bin
mkdir /data/tmp
chmod 777 /data/tmp
mkdir /data/log
chmod 777 /data/log

#Install latest hdf,netcdf and gdal libraries

export CPPFLAGS="-I/data/build/include/"
export LDFLAGS="-L/data/build/lib/"
export LD_LIBRARY_PATH="/data/build/lib/:$LD_LIBRARY_PATH"
export PATH="/data/build/bin/:$PATH"

#You can add these exports to the .bashrc file

cd /data/software
tar -xzvf hdf5-1.8.11.tar.gz
cd hdf5-1.8.11/
./configure --prefix=/data/build
make install

cd /data/software
tar -xzvf netcdf-4.3.0.tar.gz
cd netcdf-4.3.0/
./configure --prefix=/data/build --enable-netcdf-4
make install

cd /data/software
tar -xzvf gdal-1.10.0.tar.gz
#Install GDAL ADAGUC driver (optional)
cd gdal-1.10.0/frmts/netcdf
tar -xzvf GDAL_ADAGUC_source_v0.3.tar.gz
mv GDAL_ADAGUC_source_v0.3/* .
#vi GNUMakefile and add adagucdataset.o to the OBJ list
vi /data/software/gdal-1.10.0/frmts/gdalallregister.cpp # add GDALRegister_ADAGUC(); between GMT and NetCDF drivers
vi /data/software/gdal-1.10.0/gcore/gdal_frmts.h # add void CPL_DLL GDALRegister_ADAGUC(void); between GMT and NetCDF drivers
#Continue compiling GDAL
cd /data/software/gdal-1.10.0/
./configure --prefix=/data/build LIBS="-ludunits2"

make install

  1. Setup Apache www server
  2. Configure /etc/apache2/sites-enabled/000-default to point to /data/www/htdocs and /data/www/cgi-bin
    sudo apache2ctl restart
  1. The environment has now been setup completely for the ADAGUC installation ###