Additional Install Notes - USGCRP/gcis GitHub Wiki

Perlbrew

When instantiating the Perlbrew environment, be sure to add this line to your .profile

source ~/perl5/perlbrew/etc/bashrc

Additionally, run the above source command in your current shell (or log out and back in) prior to continuing with the rest of the install.

Additional packages

If installing from an AWS ubuntu image, also needed are:

git git-man

Might want to consider these, too:

Suggested packages:
git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch git-bzr git-cvs git-mediawiki git-svn

Install of Perl prerequisites

cd gcis

Need to git clone the project first, naturally.

cpanm --installdeps

####You need to use --force or installing the below packages fails!

  • DateTime::Format::Human::Duration failed

    This is apparently a known bug. See bug #108601

    It exhibits as:

      Failed test 'locale key as $DateTime obj format_duration()'
      Failed test 'locale key as $DateTime->{'locale'} format_duration()'
      Failed test 'Object's locale used in format_duration_between()'
      Failed test at t/02.array.t line 19.
    
  • Rose::DB::Object failed

    This issue has been reported by Robert as parse_interval test failing on postgres

    It exhibits as:

      Failed test 'parse_interval (-0:1:)'
      Failed test 'parse_interval alt check 4'
      Failed test 'parse_interval (2:)'
      Failed test 'parse_interval alt check 6'
      Failed test 'parse_interval (-1 y 3 h -57 M 4 s)'
      Failed test 'parse_interval alt check 12'
      Failed test 'parse_interval (5 h -208 m -495 s)'
      Failed test 'parse_interval (-208 m -495 s)'
      Failed test 'parse_interval (5 h 208 m 495 s)'
      Failed test 'parse_interval (:)'
    

Database configuration

Not needed under postgres 9.3 (at least not 9.3.11):

#custom_variable_classes = 'audit'   # list of custom variable class names

You need to force PostgreSQL to reload the config file by sending a SIGHUP signal. You can restart postgres, or use kill:

sudo kill -HUP <PID of postgres>

Database installation

./Build dbinstall only provides a skeletal database. To get a fully populated database, you need to download a full dump, and import that as the gcis database. Below the file name of the dump is assumed to be gcis-full-dump.sql

~/gcis$ psql postgres
postgres=# drop database gcis;
postgres=# create database gcis with owner = postgres tablespace = pg_default connection limit = -1;
postgres=# \c gcis
gcis=# \i gcis-full-dump.sql
gcis=# alter database gcis set search_path to gcis_metadata, pg_catalog;
gcis=# \q

Configuration

If you want logs (and you do) you need to create the dir:

mkdir ~/gcis/log