Skip to topic
|
Skip to bottom
Jump:
Main
TWiki.org
Welcome
Register
Main Web
Home
Users
Changes
Index
Notify
Statistics
Search
TWiki Webs
Main
Sandbox
TWiki
Meta-Door
Create
personal sidebar
Edit
Attach
Printable
Main.CarolinasCoastSetup
r1.21 - 04 Oct 2007 - 14:30 -
CharltonPurvis
topic end
Start of topic |
Skip to actions
---++ !!Carolinas Coast Setup %TOC% ---+++ Sys admin * Create the =nws= user (bash). * =.bashrc= add export SVN_EDITOR=vi * Create a =postgres= user (bash). --- ---+++ System setup ---++++ Subversion (getting the tools to get to the source code). * subversion-1.1.4.tar.gz <verbatim> ./configure --without-berkeley-db \ --without-apache --without-apxs \ --without-swig --with-ssl make sudo make install </verbatim> --- ---+++ Getting the source code ---++++ Creating SSH keys to avoid typing passwords over and over. * On YOUR box and as the =nws= user <verbatim> ssh-keygen -t rsa # Hit ENTER twice (providing no text for the 2 options). </verbatim> * Copy the contents of =~nws/.ssh/id_rsa.pub= to your clipboard. * On =nemo=, paste the contents of your clipboard to your own directory on nemo, e.g. paste to =~cpurvis/.ssh/authorized_keys=. * Now you can SSH *to nemo* w/o entering passwords (you may have to do it once, however, to get started). ---++++ Syncing the code * On YOUR box and as the =nws= user assuming we want it to be installed in a src directory so that the entire path would be =~nws/src=. <verbatim> svn co svn+ssh://your_username@nemo.baruch.sc.edu/home/svn/svn/nws src </verbatim> --- ---+++ Required perl modules * modules * Geo-WeatherNWS-1.03.tar.gz * SOAP-Lite-0.69.tar.gz * XML-XPath-1.13 * XML-Simple * DBI-1.53.tar.gz * building * perl Makefile.PL ; make ; sudo make install ---+++ Required <nop>NetCDF libraries * netcdf-3.6.1 * If you don't have a f90 compiler, do a setenv F90=''. * ./configure --prefix=/usr/local/netcdf ; make; mkdir /usr/local/netcdf ; make install * netcdf-perl-1.2.3 * ./configure (make answers match what you did for <nop>NetCDF above. ; make ; make install * udunits-1.12.4 * You may need to change the CUSTOMIZE to have the following contents per http://www.unidata.ucar.edu/support/help/MailArchives/udunits/msg00398.html. <verbatim> ############################################################################# # # Type of C compiler (default is `cc'): # CC='gcc' CC=gcc # # C compiler flags (default is `-O'): # CFLAGS=-g CFLAGS=-O2 # # C preprocessor flags (default is `-DNDEBUG'): # CPPFLAGS=-DDEBUG CPPFLAGS=-DpgiFortran # # Installation prefix (default is `../..'): # prefix=/usr/local/unidata # # Ancillary libraries. SunOS 4 user's might need something like the # following in order to resolve strerror() in the perl/ subdirectory. # LIBS='-L/usr/lang/SC3.0.1/lib -lansi' #LIBS=-lm LD_MATH=-lm </verbatim> * ./configure ; make ; make install * Copy the udunits.dat you just installed to =/usr/local/udunits/etc/udunits.dat= (for now). --- ---+++ building the database ---++++ geos * http://geos.refractions.net/ * ./configure --prefix=/usr/local/geos ; make ; sudo make install * add /usr/local/geos/lib= to /etc/ld.so.conf * as =root= do =ldconfig= ---++++ postgresql-8.2.1.tar.gz * building * untar postgresql into /usr/local/build * ./configure --prefix=/usr/local/pgsql * make ; make install * as =postgres= * /usr/local/pgsql/bin/initdb -D /home/postgres/data * as =root= (or someone who can create the scripts as 755) ---++++ postgis-1.2.1.tar.gz * building * untar postgis into /usr/local/build/postgresql-8.2.1/config * =cd= into that =/usr/local/build/postgresql-8.2.1/config= dir * =./configure --with-geos=/usr/local/geos/bin/geos-config --with-pgsql=/usr/local/pgsql/bin/pg_config ; make ; sudo make install= ---++++ wrapping up the db install * create the following scripts <verbatim> # /usr/local/pgsql/bin/startdb pg_ctl -D /home/postgres/data -l /tmp/pgsql.log start </verbatim> <verbatim> # /usr/local/pgsql/bin/stopdb pg_ctl -D /home/postgres/data stop -m i </verbatim> * Add =/usr/local/pgsql/bin= to /etc/profile. * Logout and log back in as postgres. * =startdb= * Add the following line to /etc/rc.local (probably as =root=) <verbatim> su -c '/usr/local/pgsql/bin/pg_ctl start -D /home/postgres/data -l /tmp/pgsql.log' postgres </verbatim> * Add =/usr/local/pgsql/lib= to =/etc/ld.so.conf= and run =ldconfig= ---++++ psql module * DBD-Pg-1.49.tar.gz * standard install ---+++ populating the db * everything done as =nws= ---++++ creating the main db * createdb -U postgres db_xenia ---++++ creating the tables * Everything is in the ./db/db_xenia subdir. * =psql -U postgres -d db_xenia -f schema.sql= ---++++ populating the data dictionary * =psql -U postgres -d db_xenia -f obs_data_dictionary.sql= ---++++ populating w/ CC obs sites <verbatim> psql -U postgres --d db_xenia -f insert_organization.sql psql -U postgres --d db_xenia -f insert_platform_type.sql psql -U postgres --d db_xenia -f insert_platform.sql psql -U postgres --d db_xenia -f insert_sensor_type.sql psql -U postgres --d db_xenia -f insert_sensor.sql </verbatim> ---+++ creating the db for the latest obs & NWS announcements * createdb -U postgres db_nws * createlang -U postgres -d db_nws plpgsql * postgis-enable it <verbatim> cd /usr/local/pgsql/share/ psql -U postgres -d db_nws -f lwpostgis.sql psql -U postgres -d db_nws -f spatial_ref_sys.sql </verbatim> * build the latest_obs_by_station_id table and functions <verbatim> cd /home/nws/src/db/db_nws # or wherever you installed it psql -U postgres -d db_nws -f latest_obs_by_station_id.sql psql -U postgres -d db_nws -f schema.sql psql -U postgres -d db_nws -f vtec_actions.sql psql -U postgres -d db_nws -f vtec_phenomena.sql psql -U postgres -d db_nws -f vtec_product_class.sql psql -U postgres -d db_nws -f vtec_significance.sql psql -U postgres -d db_nws -f nws_local_zones.sql </verbatim> ---+++ creating the db for realtively static info * createdb -U postgres db_geo * createlang -U postgres -d db_geo plpgsql * postgis-enable it <verbatim> cd /usr/local/pgsql/share/ psql -U postgres -d db_geo -f lwpostgis.sql psql -U postgres -d db_geo -f spatial_ref_sys.sql </verbatim> * build the latest_obs_by_station_id table and functions <verbatim> cd /home/nws/src/db/data # or wherever you installed it psql -U postgres -d db_geo -f local_inlets.sql psql -U postgres -d db_geo -f local_radio_xmit.sql psql -U postgres -d db_geo -f local_tide_stations.sql psql -U postgres -d db_geo -f local_well_known_marine_locations.sql psql -U postgres -d db_geo -f local_zoom_boxes.sql psql -U postgres -d db_geo -f local_obs_sites.sql psql -U postgres -d db_geo -f local_water_level_stations.sql psql -U postgres -d db_geo -f range_circle.sql psql -U postgres -d db_geo -f us_cities.sql psql -U postgres -d db_geo -f us_counties.sql psql -U postgres -d db_geo -f us_states_no_lakes.sql psql -U postgres -d db_geo -f us_states.sql psql -U postgres -d db_geo -f world_capitals.sql psql -U postgres -d db_geo -f world_country_names.sql psql -U postgres -d db_geo -f world_political_bounds.sql psql -U postgres -d db_geo -f bathy_contour.sql </verbatim> --- ---+++ <nop>MapServer ---++++ gd <verbatim> ./configure --with-jpeg \ --with-freetype \ --with-fontconfig \ --without-xpm \ --prefix=/usr/local/gd # add /usr/local/gd/lib to /etc/ld.so.conf ; ldconfig </verbatim> ---++++ php * Extract this in =/usr/local/build= since mapserver will want to hang on to the includes. <verbatim> ./configure \ --prefix=/usr/local/php \ --with-pgsql \ --with-apache2 \ --with-config-file-path=/usr/local/apache/php \ --with-apxs2=/usr/local/apache/bin/apxs \ --with-freetype \ --with-zlib \ --with-gd=/usr/local/gd # add /usr/local/php/lib to /etc/ld.so.conf ; ldconfig </verbatim> * You can do a =make clean= to just keep the headers. * /usr/local/apache/conf/httpd.conf <verbatim> # make DirectoryIndex line look like this: DirectoryIndex index.html index.php index.phtml # # Below AddHanlder type-map-var add # # Use for PHP 5.x: AddHandler php5-script .php .phtml ... ScriptAlias /nws-cgi/ "/home/nws/src/cgi/" </verbatim> * mkdir /usr/local/apache/php * pop the attached php.ini in that dir * restart apache ---++++ gdal <verbatim> ./configure --without-python --with-gif \ --prefix=/usr/local/gdal \ --with-pg=/usr/local/pgsql/bin/pg_config # add /usr/local/gdal/lib to /etc/ld.so.conf ; ldconfig </verbatim> ---++++ libiconv <verbatim> ./configure --prefix=/usr/local/libiconv # add /usr/local/libiconv/lib to /etc/ld.so.conf ; ldconfig </verbatim> ---++++ proj <verbatim> ./configure --prefix=/usr/local/proj # add /usr/local/proj/lib to /etc/ld.so.conf ; ldconfig </verbatim> ---++++ mapserver * Extract it in =/usr/local/build=. <verbatim> ./configure \ --with-gdal=/usr/local/gdal/bin/gdal-config \ --with-ogr=/usr/local/gdal/bin/gdal-config \ --with-gd=/usr/local/gd \ --with-libiconv=/usr/local/libiconv \ --with-png \ --with-curl-config=/usr/bin/curl-config \ --with-wmsclient \ --with-postgis=/usr/local/pgsql/bin/pg_config \ --with-php=/usr/local/build/php-5.2.0 \ --with-httpd=/usr/local/apache/bin/httpd \ --without-xpm \ --without-tiff \ --with-proj=/usr/local/proj \ --with-geos=/usr/local/geos/bin/geos-config \ --with-wfs # Copy the cgi to the cgi-dir. sudo cp mapserv /usr/local/apache/cgi-bin/ </verbatim> * Make the map tmp dir. <verbatim> mkdir /tmp/ms_tmp chmod 777 /tmp/ms_tmp cd /usr/local/apache/htdocs ln -s /tmp/ms_tmp ms_tmp </verbatim>
to top
End of topic
Skip to action links
|
Back to top
Edit
|
Attach image or document
|
Printable version
|
Raw text
|
More topic actions
Revisions: | r1.21 |
>
|
r1.20
|
>
|
r1.19
|
Total page history
|
Backlinks
You are here:
Main
>
CarolinasCoastSetup
to top
Copyright © 1999-2010 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding DMCC?
Send feedback