Difference between revisions of "ConfigureAmazonLinuxAMI"

From OPeNDAP Documentation
(Initial configuration)
(Hyrax specific configuration)
Line 38: Line 38:
 
* ./configure, make, make install
 
* ./configure, make, make install
  
== Hyrax specific configuration ==
+
== Building Hyrax from the shrew project ==
Set up things that are specific to Hyrax
+
 
 +
In a (ba)sh shell:
  
 
;Check out the shrew project
 
;Check out the shrew project
Line 54: Line 55:
  
  
 +
=== Using the shrew top level Makefile ===
 +
 +
;Change your working directory to the shrew directory.
 +
:<font size="2"><code><nowiki>cd $prefix</nowiki></code></font>
  
 
;Copy the Makefile.am.master to Makefile.am
 
;Copy the Makefile.am.master to Makefile.am
Line 67: Line 72:
 
:<font size="2"><code><nowiki>./configure --prefix=$prefix</nowiki></code></font>
 
:<font size="2"><code><nowiki>./configure --prefix=$prefix</nowiki></code></font>
 
:<font size="2"><code><nowiki>make</nowiki></code></font>
 
:<font size="2"><code><nowiki>make</nowiki></code></font>
 +
 +
''If the above fails then you need to build each Hyrax component by hand.'''
 +
 +
=== Building by hand ===
 +
 +
;Build and install libdap
 +
:<font size="2"><code><nowiki>cd $prefix/src/libdap</nowiki></code></font>
 +
:<font size="2"><code><nowiki>autoreconf -vif</nowiki></code></font>
 +
:<font size="2"><code><nowiki>./configure --prefix=$prefix</nowiki></code></font>
 +
:<font size="2"><code><nowiki>make install</nowiki></code></font>
 +
 +
;Build and install the BES
 +
:<font size="2"><code><nowiki>cd $prefix/src/bes</nowiki></code></font>
 +
:<font size="2"><code><nowiki>autoreconf -vif</nowiki></code></font>
 +
:<font size="2"><code><nowiki>./configure --prefix=$prefix</nowiki></code></font>
 +
:<font size="2"><code><nowiki>make install</nowiki></code></font>
 +
 +
;Build and install the dap-server module
 +
:<font size="2"><code><nowiki>cd $prefix/src/modules/dap-server</nowiki></code></font>
 +
:<font size="2"><code><nowiki>autoreconf -vif</nowiki></code></font>
 +
:<font size="2"><code><nowiki>./configure --prefix=$prefix</nowiki></code></font>
 +
:<font size="2"><code><nowiki>make install</nowiki></code></font>
 +
 +
;Build and install the csv_handler module
 +
:<font size="2"><code><nowiki>cd $prefix/src/modules/csv_handler</nowiki></code></font>
 +
:<font size="2"><code><nowiki>autoreconf -vif</nowiki></code></font>
 +
:<font size="2"><code><nowiki>./configure --prefix=$prefix</nowiki></code></font>
 +
:<font size="2"><code><nowiki>make install</nowiki></code></font>
 +
 +
;Build and install the fileout_gdal module
 +
:<font size="2"><code><nowiki>cd $prefix/src/modules/fileout_gdal</nowiki></code></font>
 +
:<font size="2"><code><nowiki>autoreconf -vif</nowiki></code></font>
 +
:<font size="2"><code><nowiki>./configure --prefix=$prefix --with-gdal=$prefix/deps/gdal-12.15.12</nowiki></code></font>
 +
:<font size="2"><code><nowiki>make install</nowiki></code></font>
 +
 +
;Build and install the fileout_netcdf module
 +
:<font size="2"><code><nowiki>cd $prefix/src/modules/fileout_netcdf</nowiki></code></font>
 +
:<font size="2"><code><nowiki>autoreconf -vif</nowiki></code></font>
 +
:<font size="2"><code><nowiki>./configure --prefix=$prefix --with-netcdf=$prefix/deps/netcdf-4.1.2</nowiki></code></font>
 +
:<font size="2"><code><nowiki>make install</nowiki></code></font>
 +
 +
;Build and install the fits_handler module
 +
:<font size="2"><code><nowiki>cd $prefix/src/modules/fits_handler</nowiki></code></font>
 +
:<font size="2"><code><nowiki>autoreconf -vif</nowiki></code></font>
 +
:<font size="2"><code><nowiki>./configure --prefix=$prefix --with-cfits=$prefix/deps/cfitsio</nowiki></code></font>
 +
:<font size="2"><code><nowiki>make install</nowiki></code></font>
 +
 +
;Build and install the freeform_handler module
 +
:<font size="2"><code><nowiki>cd $prefix/src/modules/freeform_handler</nowiki></code></font>
 +
:<font size="2"><code><nowiki>autoreconf -vif</nowiki></code></font>
 +
:<font size="2"><code><nowiki>./configure --prefix=$prefix </nowiki></code></font>
 +
:<font size="2"><code><nowiki>make install</nowiki></code></font>
 +
 +
;Build and install the gateway_module module
 +
:<font size="2"><code><nowiki>cd $prefix/src/modules/gateway_module</nowiki></code></font>
 +
:<font size="2"><code><nowiki>autoreconf -vif</nowiki></code></font>
 +
:<font size="2"><code><nowiki>./configure --prefix=$prefix </nowiki></code></font>
 +
:<font size="2"><code><nowiki>make install</nowiki></code></font>
 +
 +
;Build and install the gdal_handler module
 +
:<font size="2"><code><nowiki>cd $prefix/src/modules/fileout_netcdf</nowiki></code></font>
 +
:<font size="2"><code><nowiki>autoreconf -vif</nowiki></code></font>
 +
:<font size="2"><code><nowiki>./configure --prefix=$prefix --with-gdal=$prefix/deps/gdal-12.15.12</nowiki></code></font>
 +
:<font size="2"><code><nowiki>make install</nowiki></code></font>
 +
 +
;Build and install the hdf4_handler module
 +
:<font size="2"><code><nowiki>cd $prefix/src/modules/hdf4_handler</nowiki></code></font>
 +
:<font size="2"><code><nowiki>autoreconf -vif</nowiki></code></font>
 +
:<font size="2"><code><nowiki>./configure --prefix=$prefix --with-hdf4=$prefix/deps/hdf-4.2.8</nowiki></code></font>
 +
:<font size="2"><code><nowiki>make install</nowiki></code></font>
 +
 +
;Build and install the hdf5_handler module
 +
:<font size="2"><code><nowiki>cd $prefix/src/modules/hdf5_handler</nowiki></code></font>
 +
:<font size="2"><code><nowiki>autoreconf -vif</nowiki></code></font>
 +
:<font size="2"><code><nowiki>./configure --prefix=$prefix --with-hdf5=$prefix/deps/hdf5-1.8.6</nowiki></code></font>
 +
:<font size="2"><code><nowiki>make install</nowiki></code></font>
 +
 +
;Build and install the ncml_module module
 +
:<font size="2"><code><nowiki>cd $prefix/src/modules/ncml_module</nowiki></code></font>
 +
:<font size="2"><code><nowiki>autoreconf -vif</nowiki></code></font>
 +
:<font size="2"><code><nowiki>./configure --prefix=$prefix</nowiki></code></font>
 +
:<font size="2"><code><nowiki>make install</nowiki></code></font>
 +
 +
;Build and install the netcdf_handler module
 +
:<font size="2"><code><nowiki>cd $prefix/src/modules/fileout_netcdf</nowiki></code></font>
 +
:<font size="2"><code><nowiki>autoreconf -vif</nowiki></code></font>
 +
:<font size="2"><code><nowiki>./configure --prefix=$prefix --with-netcdf=$prefix/deps/netcdf-4.1.2</nowiki></code></font>
 +
:<font size="2"><code><nowiki>make install</nowiki></code></font>
 +
 +
;Build and install the xml_data_handler module
 +
:<font size="2"><code><nowiki>cd $prefix/src/modules/xml_data_handler</nowiki></code></font>
 +
:<font size="2"><code><nowiki>autoreconf -vif</nowiki></code></font>
 +
:<font size="2"><code><nowiki>./configure --prefix=$prefix </nowiki></code></font>
 +
:<font size="2"><code><nowiki>make install</nowiki></code></font>
 +
 +
;Build and install the ugrid_functions module
 +
:<font size="2"><code><nowiki>cd $prefix/src/modules/ugrid_functions</nowiki></code></font>
 +
:<font size="2"><code><nowiki>autoreconf -vif</nowiki></code></font>
 +
:<font size="2"><code><nowiki>./configure --prefix=$prefix --with-gridfields=$prefix/deps/gridfields-1.0.1</nowiki></code></font>
 +
:<font size="2"><code><nowiki>make install</nowiki></code></font>

Revision as of 02:11, 31 January 2013

<< back to HowTo Guides

1 How to configure an Amazon Linux AMI for EC2 to build Hyrax

This describes how to set up a vanilla Amazon Linux AMI virtual machine so that we can build the Hyrax data server.

2 Amazon Linux AMI versions

These instructions have been amended to cover:

  • Amazon Linux AMI 2012.03

3 Initial configuration

Set up general build stuff that you need:

  • yum install java-1.6.0-openjdk java-1.6.0-openjdk-devel
  • yum install junit
  • yum install ant
  • yum install ant-junit.noarch
  • yum install make
  • yum install subversion
  • yum install gcc-c++
  • yum install flex
  • yum install bison
  • yum install curl-devel
  • yum install libxml2-devel
  • yum install libjpeg-devel
  • yum install zlib-devel
  • yum install readline-devel
  • yum install libuuid-devel
  • yum install openssl-devel

4 Other dependencies

  • yum install libicu-devel

4.1 Autotools

  • download the latest versions of autoconf, automake and libtool
  • ./configure, make, make install

5 Building Hyrax from the shrew project

In a (ba)sh shell:

Check out the shrew project
svn co https://scm.opendap.org/sv/trunk/shrew
Change your working directory to the shrew directory.
cd shrew
Source the spath file
. spath
Build the dependancies
cd src/dependencies
make


5.1 Using the shrew top level Makefile

Change your working directory to the shrew directory.
cd $prefix
Copy the Makefile.am.master to Makefile.am
cp Makefile.am.master Makefile.am
Edit the Makefile.am to be certain that the various dependancies are correctly configured.
vim Makefile.am
(Since I am trying to get a new package up I edited this file, mostly I think you should just be able to make the copy and proceed.)
Engage the autotools process and see how far you get...
autoreconf -vif
./configure --prefix=$prefix
make

If the above fails then you need to build each Hyrax component by hand.'

5.2 Building by hand

Build and install libdap
cd $prefix/src/libdap
autoreconf -vif
./configure --prefix=$prefix
make install
Build and install the BES
cd $prefix/src/bes
autoreconf -vif
./configure --prefix=$prefix
make install
Build and install the dap-server module
cd $prefix/src/modules/dap-server
autoreconf -vif
./configure --prefix=$prefix
make install
Build and install the csv_handler module
cd $prefix/src/modules/csv_handler
autoreconf -vif
./configure --prefix=$prefix
make install
Build and install the fileout_gdal module
cd $prefix/src/modules/fileout_gdal
autoreconf -vif
./configure --prefix=$prefix --with-gdal=$prefix/deps/gdal-12.15.12
make install
Build and install the fileout_netcdf module
cd $prefix/src/modules/fileout_netcdf
autoreconf -vif
./configure --prefix=$prefix --with-netcdf=$prefix/deps/netcdf-4.1.2
make install
Build and install the fits_handler module
cd $prefix/src/modules/fits_handler
autoreconf -vif
./configure --prefix=$prefix --with-cfits=$prefix/deps/cfitsio
make install
Build and install the freeform_handler module
cd $prefix/src/modules/freeform_handler
autoreconf -vif
./configure --prefix=$prefix
make install
Build and install the gateway_module module
cd $prefix/src/modules/gateway_module
autoreconf -vif
./configure --prefix=$prefix
make install
Build and install the gdal_handler module
cd $prefix/src/modules/fileout_netcdf
autoreconf -vif
./configure --prefix=$prefix --with-gdal=$prefix/deps/gdal-12.15.12
make install
Build and install the hdf4_handler module
cd $prefix/src/modules/hdf4_handler
autoreconf -vif
./configure --prefix=$prefix --with-hdf4=$prefix/deps/hdf-4.2.8
make install
Build and install the hdf5_handler module
cd $prefix/src/modules/hdf5_handler
autoreconf -vif
./configure --prefix=$prefix --with-hdf5=$prefix/deps/hdf5-1.8.6
make install
Build and install the ncml_module module
cd $prefix/src/modules/ncml_module
autoreconf -vif
./configure --prefix=$prefix
make install
Build and install the netcdf_handler module
cd $prefix/src/modules/fileout_netcdf
autoreconf -vif
./configure --prefix=$prefix --with-netcdf=$prefix/deps/netcdf-4.1.2
make install
Build and install the xml_data_handler module
cd $prefix/src/modules/xml_data_handler
autoreconf -vif
./configure --prefix=$prefix
make install
Build and install the ugrid_functions module
cd $prefix/src/modules/ugrid_functions
autoreconf -vif
./configure --prefix=$prefix --with-gridfields=$prefix/deps/gridfields-1.0.1
make install