Version 2
Copyright © 2004-2012 Delaware Environmental Observing System
Published: February 24th 2004
Revision History | ||
---|---|---|
Revision 1.1 | 2004/02/24 | GEQ |
Initial version | ||
Revision 1.2 | 2004/03/30 | GEQ |
Added description of ODD-DIVAS required component installations. | ||
Revision 1.3 | 2004/04/21 | GEQ |
Updated description of ODD-DIVAS for 1.1.6 release. | ||
Revision 1.4 | 2004/07/28 | GEQ |
Updated description of installation of ODD-DIVAS and required components following install at the University of Delaware. | ||
Revision 1.5 | 2004/08/05 | GEQ |
Added SetEnv description to the Apache setup to remove ORA-12154 error. | ||
Revision 1.6 | 2004/09/20 | GEQ |
Added Oracle install workaround link. | ||
Revision 1.7 | 2004/10/20 | GEQ |
Added Oracle SetEnv parameters for security. | ||
Revision 1.8 | 2004/11/03 | GEQ |
Added adminpro setup. | ||
Revision 1.9 | 2004/12/14 | GEQ |
Added /etc/profile info. Modified database setup for 1.1.7 release. | ||
Revision 1.10 | 2004/12/22 | GEQ |
Revised for PHP version 4.3.10. | ||
Revision 1.11 | 2005/01/25 | GEQ |
Fix order error in database setup and grants. | ||
Revision 1.12 | 2005/02/01 | GEQ |
Added description of sendmail setup. | ||
Revision 1.13 | 2005/02/02 | GEQ |
Added public NTP servers entry. Added description of USGS, RAWS and NDBC metadata loading. | ||
Revision 1.14 | 2005/02/05 | GEQ |
Corrected PHP build line. | ||
Revision 1.15 | 2005/06/02 | GEQ |
Updated database install procedure to clarify the need for timezone to be set on the database. | ||
Revision 1.16 | 2005/08/10 | GEQ |
Revised for PHP version 4.4.0. | ||
Revision 1.17 | 2005/08/30 | GEQ |
Added setting of database time zone. Added the ODD-DIVAS configuration section. | ||
Revision 1.18 | 2005/08/31 | GEQ |
Replaced ftplib with cURLpp. Added nexrad_data to schema install. | ||
Revision 1.19 | 2005/10/19 | GEQ |
Revised for Apache version 1.3.34. Modified links to Apache and PHP sites. | ||
Revision 1.20 | 2005/10/21 | GEQ |
Added footnote describing the symptoms expected if the database timezone isn't set correctly. | ||
Revision 1.21 | 2005/10/26 | GEQ |
Added internal links. | ||
Revision 1.22 | 2005/12/02 | GEQ |
Added internal link to the ODD-DIVAS configuration section. Added the gPRO setting description. Added new PHP configure statement for ODD-DIVAS to use the truetype fonts needed by the wind rose component of JpGraph. Added link to web site describing install of true-type fonts. Added move of existing ODD-DIVAS cache. | ||
Revision 1.23 | 2005/12/06 | GEQ |
Corrected bug in freetype option on PHP configure command. | ||
Revision 1.24 | 2005/12/16 | GEQ |
Added DCF configuration file section. Added eAccelerator install instructions. | ||
Revision 1.25 | 2006/01/05 | GEQ |
Added database statistics generation procedure. | ||
Revision 1.26 | 2006/01/23 | GEQ |
Added PHP 4.4.1 and link to the Apache/PHP build section for 1.2.2 changelog. | ||
Revision 1.27 | 2006/01/30 | GEQ |
Added target for JpGraph install. | ||
Revision 1.28 | 2006/02/03 | GEQ |
Added PHP 4.4.2 and instructions for rebuilding eAccelerator for new PHP version. | ||
Revision 1.29 | 2006/03/08 | GEQ |
Added "eaccelerator.log_file" and altered "eaccelerator.filter" options for eAccelerator. Added link to eAccelerator install section. Clarified eAccelerator install instructions and updated version to 0.9.4. Fixed typos and specified JpGraph 1.21. | ||
Revision 1.30 | 2006/04/04 | GEQ |
Added gPAGING to DCF configuration description. | ||
Revision 1.31 | 2006/05/09 | GEQ |
Added city and county metadata loading links. Revised all metadata links to use section IDs. | ||
Revision 1.32 | 2006/07/13 | GEQ |
Added METAR station county metadata loading link. | ||
Revision 1.33 | 2006/08/24 | GEQ |
Added PHP 5 install and related issues. | ||
Revision 1.34 | 2006/08/25 | GEQ |
Added data feeds outline. | ||
Revision 1.35 | 2006/09/06 | GEQ |
Added index.php requirement in the Apache configuration section. | ||
Revision 1.36 | 2006/09/11 | GEQ |
Added local-host-names configuration to sendmail section. Added Oracle 10g software install pointer. Added PL/SQL compiler mode. Added revised curlpp library generation for Oracle 10g. | ||
Revision 1.35 | 2006/09/14 | GEQ |
Added note indicating that the apache owner needs to be in the oracle ownership group. Updated the oracle settings for Oracle 10g. | ||
Revision 2.1 | 2006/09/26 | GEQ |
Incremented version number of this document to 2. | ||
Revision 2.2 | 2006/09/27 | GEQ |
Updated to Apache 1.3.37 and PHP 5.1.6. | ||
Revision 2.3 | 2006/09/28 | GEQ |
Added configuration of short_open_tag to PHP configuration section. | ||
Revision 2.4 | 2006/09/29 | GEQ |
Added control panel configuration details to eAccelerator configuration section. Added instructions for setting the plsql_native_library_dir database variable. | ||
Revision 2.5 | 2006/10/02 | GEQ |
Updated database statistics section to indicate that they are only needed for Oracle 9i. | ||
Revision 2.6 | 2006/11/07 | GEQ |
Updated for PHP version 5.2.0 and eAccelerator 0.9.5. | ||
Revision 2.7 | 2006/11/14 | GEQ |
Added the note concerning multiple servers. Added web service install section. | ||
Revision 2.8 | 2006/12/06 | GEQ |
Revised database setup and removal to use the command line option. | ||
Revision 2.8 | 2006/12/18 | GEQ |
Added requirement for tiff and XFree86 development package install. | ||
Revision 2.9 | 2007/2/19 | GEQ |
Added PHP 5.2.1 and requirement for xsl configuration in building PHP. | ||
Revision 2.10 | 2007/2/20 | GEQ |
Added PHP memory_limit setting. | ||
Revision 2.11 | 2007/2/23 | GEQ |
Revised PHP memory_limit setting to 200M. Added system time recommendation. | ||
Revision 2.12 | 2007/3/28 | GEQ |
Revised create_users procedure to add required SYSDBA option. Updated cURL web site URL. Added curl-devel RPM requirement. Added libxml and libxslt version requirement recommendations. Changed JpGraph version to 2.2 and revised name of its configuration file. | ||
Revision 2.12 | 2007/04/09 | GEQ |
Revised PHP/Apache install procedure. | ||
Revision 2.13 | 2007/06/18 | GEQ |
Added PHP version 5.2.3. | ||
Revision 2.14 | 2007/06/25 | GEQ |
Added df update instructions. | ||
Revision 2.15 | 2007/08/02 | GEQ |
Added dgep installation instructions. | ||
Revision 2.15 | 2007/08/24 | GEQ |
Added eAccelerator version 0.9.5.1. | ||
Revision 2.16 | 2007/08/31 | GEQ |
Added PHP version 5.2.4. | ||
Revision 2.1.4 | 2007/09/04 | GEQ |
Added eAccelerator version 0.9.5.2. Added Apache 1.3.39. Changed to version based document revision numbers. Changed to PHP 5.2.4. Added Apache STATIONS variable. | ||
Revision 2.1.7 | 2008/03/21 | GEQ |
Added Apache 1.3.41. Added gcrypt error message and fix. Added PHP 5.2.6. Added curl support to PHP build. | ||
Revision 2.1.9 | 2010/09/12 | GEQ |
Added Apache 1.3.42. Added PHP 5.2.14. Added install of XTides. | ||
Revision 2.2.2 | 20XX/XX/XX | GEQ |
Fixed typo. |
Table of Contents
This document summarizes the required software configurations of machines forming the DEOS system. Included are operating system settings, configuration and installed software, Oracle version and settings.
The following are installation details for the DEOS systems. All hardware systems forming a part of the DEOS system are configured similarly from the operating system perspective except where noted below.
The Installation of the Linux (ES or AS) operating system is to be performed as per the default for "Server". It is recommended that the system time for the server is set to UTC/GMT. The following items are required to be installed:
The following items need to be configured.
The following files need to contain the indicated information.
The sendmail program is required by DEOS to provide distribution of real-time alerts.
The following packages are required.
sendmail; this is the base sendmail software.
sendmail-cf; this allows the sendmail package to be configured using a simpler method than the default.
The /etc/mail/local-host-names
should contain all the names that the machine is known as, this allows
mail from users on the machine to get to other users on the machine and not generate an error.
Once the required packages are installed, perform the following procedures.
Procedure 1. Configure Sendmail To Send Mail For DEOS
Change to the /etc/mail directory (this contains the configuration files for sendmail)
Ensure that the sendmail.mc contains the settings as shown below (most will be set in the default file.)
Type "make -C /etc/mail"
Type "/etc/init.d/sendmail restart"
Procedure 2. Configure Sendmail To Receive Email (optional)
Change to the /etc/mail directory (this contains the configuration files for sendmail)
Edit the "local-host-names" file and add the domain names that will be receiving email on this machine.
Edit the "virtusertable" file and add any addresses in the domains handled that require the email to be sent to a different email address. (This facility is for people who don't have an account on this machine, but want to get mail to the domain handled by this machine.
For each domain listed in the local-host-names file, an MX entry in the DNS server for the domain will be required to point to this machine.
Ensure that the sendmail.mc contains the settings as shown below (most will be set in the default file.)
Type "make sendmail.cf"
Type "/etc/init.d/sendmail restart"
Example 1. Sendmail Configuration File
divert(-1)dnl dnl # dnl # This is the sendmail macro config file for m4. If you make changes to dnl # /etc/mail/sendmail.mc, you will need to regenerate the dnl # /etc/mail/sendmail.cf file by confirming that the sendmail-cf package is dnl # installed and then performing a dnl # dnl # make -C /etc/mail dnl # include(`/usr/share/sendmail-cf/m4/cf.m4')dnl VERSIONID(`setup for Red Hat Linux')dnl OSTYPE(`linux')dnl dnl # dnl # Uncomment and edit the following line if your outgoing mail needs to dnl # be sent out through an external mail server: dnl # dnl define(`SMART_HOST',`smtp.your.provider') dnl # define(`confDEF_USER_ID',``8:12'')dnl dnl # define(`confAUTO_REBUILD')dnl define(`confTO_CONNECT', `1m')dnl define(`confTRY_NULL_MX_LIST',true)dnl define(`confDONT_PROBE_INTERFACES',true)dnl define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl define(`ALIAS_FILE', `/etc/aliases')dnl dnl define(`STATUS_FILE', `/etc/mail/statistics')dnl define(`UUCP_MAILER_MAX', `2000000')dnl define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl define(`confAUTH_OPTIONS', `A')dnl dnl # dnl # The following allows relaying if the user authenticates, and disallows dnl # plaintext authentication (PLAIN/LOGIN) on non-TLS links dnl # dnl define(`confAUTH_OPTIONS', `A p')dnl dnl # dnl # PLAIN is the preferred plaintext authentication method and used by dnl # Mozilla Mail and Evolution, though Outlook Express and other MUAs do dnl # use LOGIN. Other mechanisms should be used if the connection is not dnl # guaranteed secure. dnl # dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl dnl # dnl # Rudimentary information on creating certificates for sendmail TLS: dnl # make -C /usr/share/ssl/certs usage dnl # dnl define(`confCACERT_PATH',`/usr/share/ssl/certs') dnl define(`confCACERT',`/usr/share/ssl/certs/ca-bundle.crt') dnl define(`confSERVER_CERT',`/usr/share/ssl/certs/sendmail.pem') dnl define(`confSERVER_KEY',`/usr/share/ssl/certs/sendmail.pem') dnl # dnl # This allows sendmail to use a keyfile that is shared with OpenLDAP's dnl # slapd, which requires the file to be readable by group ldap dnl # dnl define(`confDONT_BLAME_SENDMAIL',`groupreadablekeyfile')dnl dnl # dnl define(`confTO_QUEUEWARN', `4h')dnl dnl define(`confTO_QUEUERETURN', `5d')dnl dnl define(`confQUEUE_LA', `12')dnl dnl define(`confREFUSE_LA', `18')dnl define(`confTO_IDENT', `0')dnl dnl FEATURE(delay_checks)dnl FEATURE(`no_default_msa',`dnl')dnl FEATURE(`smrsh',`/usr/sbin/smrsh')dnl FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl FEATURE(redirect)dnl FEATURE(always_add_domain)dnl FEATURE(use_cw_file)dnl FEATURE(use_ct_file)dnl dnl # dnl # The -t option will retry delivery if e.g. the user runs over his quota. dnl # FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl FEATURE(`access_db',`hash -T<TMPF> -o /etc/mail/access.db')dnl FEATURE(`blacklist_recipients')dnl EXPOSED_USER(`root')dnl dnl # dnl # The following causes sendmail to only listen on the IPv4 loopback address dnl # 127.0.0.1 and not on any other network devices. Remove the loopback dnl # address restriction to accept email from the Internet or Intranet. dnl # dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl dnl # dnl # The following causes sendmail to additionally listen to port 587 for dnl # mail from MUAs that authenticate. Roaming users who can't reach their dnl # preferred sendmail daemon due to port 25 being blocked or redirected find dnl # this useful. dnl # dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl dnl # dnl # The following causes sendmail to additionally listen to port 465, but dnl # starting immediately in TLS mode upon connecting. Port 25 or 587 followed dnl # by STARTTLS is preferred, but roaming clients using Outlook Express can't dnl # do STARTTLS on ports other than 25. Mozilla Mail can ONLY use STARTTLS dnl # and doesn't support the deprecated smtps; Evolution <1.1.1 uses smtps dnl # when SSL is enabled-- STARTTLS support is available in version 1.1.1. dnl # dnl # For this to work your OpenSSL certificates must be configured. dnl # dnl DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl dnl # dnl # The following causes sendmail to additionally listen on the IPv6 loopback dnl # device. Remove the loopback address restriction listen to the network. dnl # dnl # NOTE: binding both IPv4 and IPv6 daemon to the same port requires dnl # a kernel patch dnl # dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl dnl # dnl # We strongly recommend not accepting unresolvable domains if you want to dnl # protect yourself from spam. However, the laptop and users on computers dnl # that do not have 24x7 DNS do need this. dnl # dnl #FEATURE(`accept_unresolvable_domains')dnl dnl # dnl FEATURE(`relay_based_on_MX')dnl dnl # dnl # Also accept email sent to "localhost.localdomain" as local email. dnl # LOCAL_DOMAIN(`localhost.localdomain')dnl dnl # dnl # The following example makes mail from this host and any additional dnl # specified domains appear to be sent from mydomain.com dnl # dnl MASQUERADE_AS(`mydomain.com')dnl dnl # dnl # masquerade not just the headers, but the envelope as well dnl # FEATURE(masquerade_envelope)dnl FEATURE(allmasquerade)dnl dnl # dnl # masquerade not just @mydomainalias.com, but @*.mydomainalias.com as well dnl # dnl FEATURE(masquerade_entire_domain)dnl dnl # dnl MASQUERADE_DOMAIN(localhost)dnl dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl dnl MASQUERADE_DOMAIN(mydomainalias.com)dnl dnl MASQUERADE_DOMAIN(mydomain.lan)dnl FEATURE(`relay_entire_domain')dnl MAILER(smtp)dnl MAILER(procmail)dnl
The ntp program must be installed and configured to connect to any available ntp server.
If your organization does not have an on-site ntp server check public NTP servers, which summarizes an alternative option.
Example 2. NTP Configuration File
# Prohibit general access to this service. restrict default ignore restrict SERVER_NAME mask MASK nomodify notrap noquery # Permit all access over the loopback interface. This could # be tightened as well, but to do so would effect some of # the administrative functions. restrict 127.0.0.1 # -- CLIENT NETWORK ------- # Permit systems on this network to synchronize with this # time service. Do not permit those systems to modify the # configuration of this service. Also, do not use those # systems as peers for synchronization. restrict NETWORK_NAME mask NETWORK_MASK nomodify notrap noquery # --- GENERAL CONFIGURATION --- # # Undisciplined Local Clock. This is a fake driver intended for backup # and when no outside source of synchronized time is available. The # default stratum is usually 3, but in this case we elect to use stratum # 0. Since the server line does not have the prefer keyword, this driver # is never used for synchronization, unless no other other # synchronization source is available. In case the local host is # controlled by some external source, such as an external oscillator or # another protocol, the prefer keyword would cause the local host to # disregard all other synchronization sources, unless the kernel # modifications are in use and declare an unsynchronized condition. # server SERVER_NAME fudge 127.127.1.0 stratum 10 # # Drift file. Put this in a directory which the daemon can write to. # No symbolic links allowed, either, since the daemon updates the file # by creating a temporary in the same directory and then rename()'ing # it to the file. # driftfile /etc/ntp/drift broadcastdelay 0.008 # # Authentication delay. If you use, or plan to use someday, the # authentication facility you should make the programs in the auth_stuff # directory and figure out what this number should be on your machine. # authenticate no # # Keys file. If you want to diddle your server at run time, make a # keys file (mode 600 for sure) and define the key number to be # used for making requests. # # PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your own, or remote # systems might be able to reset your clock at will. Note also that # ntpd is started with a -A flag, disabling authentication, that # will have to be removed as well. # keys /etc/ntp/keys
The following are installation details for the Oracle database server system. Each DEOS installation has a single Oracle database server. The following sections describe the configuration items required.
This link, summarizes some issues that may be faced when installing Oracle 9i database server on RedHat systems and how to remedy them.
The equivalent document for the Oracle 10g database can be found at this link.
The following items, with suitable modifications, need to be placed in the /etc/profile system file so that users can access the Oracle software appropriately.
Example 3. User Profile Information
# Oracle setup TZ=UTC ORACLE_BASE=/oracle ORACLE_HOME=$ORACLE_BASE/product/10.2/ ORACLE_SID=DEOS PATH=$PATH:$ORACLE_HOME/bin LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/network/lib export PATH ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH LD_ASSUME_KERNEL TZ
Create a database instance using the dbca program from the Oracle installation. A "Transaction Processing" database should be selected, along with all the defaults. Use the directory destinations as appropriate for the system. The time zone for the database is recommended to be set to UTC or an offset of 00:00 hours. If this isn't done, the DCF application will not work correctly.
To configure the defined database to use the UTC/GMT time zone, perform the following.
Procedure 3. Configure Database Time Zone [1]
Log into the server as the SYSTEM user using the password created during database creation
type "ALTER DATABASE DBNAME SET TIME_ZONE='00:00';" (replacing DBNAME with the database name created above.) [2]
Restart the database for this change to take effect.
To change the PL/SQL complier mode to native (resulting in faster execution of compute intensive code), it is highly recommended that this procedure be followed.
Procedure 4. Create Native PL/SQL Support For DEOS
Execute this command, "ALTER SYSTEM SET plsql_code_type = 'NATIVE' SCOPE=BOTH" as sysdba.
Create a directory ~/admin/plsql.
Execute this command, "ALTER SYSTEM SET plsql_native_library_dir = 'DIR' SCOPE=BOTH" (replace DIR with the directory created in the previous step) as sysdba.
To install the defined database roles for the DEOS system, perform the following procedure.
To create the required database users for the DEOS system, perform the following procedure.
Procedure 6. Install DEOS Users
Change to the directory containing the install SQL scripts (usually deos/database/)
Edit the create_users.sql file and change the passwords (the item after the 'IDENTIFIED BY' string)
Log into the server as the SYSTEM user (and using the SYSDBA role) using the password created during database creation
type "@create_users"
This script creates the following users:
deosmgr. This is the "owner" of the DEOS schema, the database tables and other associated objects. The backend programs all access the database using this account.
deosdcf. This user has limited access to the database sufficient to allow the user to use the DCF application. See DTN #15.
deosddv. This user has limited access to the database sufficient to allow the user to use the ODD-DIVAS application. See DTN #12.
To create the DEOS schema in the database instance, perform the following procedure.
Procedure 7. Install DEOS schema
Change to the directory containing the install SQL scripts (usually deos/database/)
Type sqlplus deosmgr@DBNAME/PASSWORD @setup.sql > /tmp/setup.log
If no errors occur, continue the setup with the city metadata ingest.
If no errors occur, continue the setup with the county metadata ingest.
If no errors occur, continue the setup with the station metadata ingest.
If no errors occur, and NWS METAR stations are to be used continue the setup with the METAR station county metadata ingest.
If no errors occur, continue the setup with the topographic metadata ingest.
Procedure 8. Install ancillary station metadata
Change to the directory containing the install SQL scripts (usually deos/database/)
Log into the server with the user created above
See DTN #8 for the appropriate local settings files.
To remove the DEOS schema complete the following steps.
To create the correct security environment for the sub-ordinate users, deosdcf and deosddv, perform the following procedure.
To create the correct statistics generating update process, perform the following procedure.
Procedure 11. Install Statistics Generation Scripts
Change to the directory containing the statistics scripts (usually deos/database/stats/)
Copy the files
stats.sh
, connect.sql
,
stats_system.sql
and stats_schema.sql
to a separate directory. (The directory, ~/bin/
is a good choice.)
Change to this destination directory.
Edit the connect.sql
file and set the correct connection parameters.
type "chmod 600 connect.sql" (this hides the contents from all but the user.)
Edit the stats.sh
file and set the correct path parameters. The constants
ORACLE_SID
and
TNS_ADMIN
values will likely need to be changed.
In addition, check that the paths to the scripts are right. The sqlplus program
will need to be in the users' path, or the full path to that program needs to be prepended to the executable name.
type "chmod 755 stats.sh" (this ensures that the script is executable.)
Enter a line equivalent to "0 0 * * * /user_dir/bin/stats.sh" in crontab. (Replace "user_dir" with the full path name.)
To configure the database to run extranal executable programs correctly, perform the following steps.
Procedure 12. Add Permissions for HDRS Jobs
As the oracle user, edit the $ORACLE_HOME/rdbms/admin/externaljob.ora
and ensure
run_user and run_group are set to nobody.
Ensure that the extjob is owned by root.
chown root $ORACLE_HOME/bin/extjob chmod 4750 $ORACLE_HOME/bin/extjob
As the SYSTEM user issue the command GRANT CREATE EXTERNAL JOB TO deosmgr
Ensure that the output directory for the HDRS system, usually /www/htdocs/hdrs/output/
has the correct permissions of 777.
Components of DEOS may be installed on different machines as needed. If a component requiring database access such as ODD-DIVAS is installed onto such a machine then the Oracle client software install must be performed on that machine. To build the components, the "programmer" option needs to be selected if the DEOS component will be run on the machine, the "run-time" option must be installed.
The following are configuration details for the DEOS installation.
This component performs the data ingest and generation portion of the DEOS system.
For a given release, the SMARTS component will be tagged in the CVS system by "DEOS_X_Y_Z" and so can be retrieved using that tag. X will be the major release, Y the minor release and Z most recent version. See DTN #7 for details of available releases. The example shows how to build and install from source.
For some installations, retrieval of data from remote resources is required. To perform a sequential retrieval and ingest the use of cron is recommended. The following example is a recommended crontab file entry.
Example 6. Crontab file for combined retrieval and ingest
TZ=UTC ORACLE_SID=DEOS ORACLE_HOME=/oracle/product/10.2/ 10 * * * * /usr/local/bin/retrieve -u USER -p PASSWORD -d DEOS -s METAR-SFSS; /usr/local/bin/ingest -u USER -p PASSWORD -d DEOS -s METAR-SFSS
The USER and PASSWORD settings in the example will need to be changed for a particular install. Other settings, such as ORACLE_SID, ORACLE_HOME may need to be changed.
This component forms one part of the data display for the DEOS system, in particular the display of individual and network-wide station data. ODD-DIVAS displays current conditions and time series graphs of meteorological variables available for data stations utilized by the DEOS system.
For a given release, the ODD-DIVAS component will be tagged in the CVS system by "DEOS_X_Y_Z" and so can be retrieved using that tag. X will be the major release, Y the minor release and Z most recent version. DTN #7 for details of available releases. The example shows how to ensure the system is available to a Internet user.
Example 7. ODD-DIVAS install process
mv odd-divas-dir /www/host/dir/ [Edit the Apache configuration file to enter the database connection parameters as described below] cd /www/host/dir/odd-divas/ [either copy the pre-existing cache to the new directory] mv ../odd-divas-old-version/cache/ ./ [or create a new cache directory] mkdir cache chmod 1777 cache chown WEBUSER.WEBGROUP cache
The following list of parameters are the configurable items for ODD-DIVAS
and can be found
in the ofnidb.jnk
file in the odd-divas directory.
gVERSION:
this is the version string that appears in certain graphs.
gWIDTH:
this is the width of the images generated.
gHEIGHT:
this is the height of the images generated.
gHINC:
this is the height increment used in the popups displaying graphics.
gWINC:
this is the height increment used in the popups displaying graphics.
gCURRENT:
this is the value (in hours) within which data will be displayed in the current station data page.
gPRO:
this is flag to indicate whether we have a JpGraph Professional license, or not.
If a professional license is available, a wind rose graph will be used for display of wind direction data.
This component provides the database configuration portion of the system.
For a given release, the DCF component will be tagged in the CVS system by "DEOS_X_Y_Z" and so can be retrieved using that tag. X will be the major release, Y the minor release and Z most recent version. DTN #7 for details of available releases. The example shows how to ensure the system is available to a Internet user.
The following list of parameters are the configurable items for DCF
and can be found
in the ofnidb.jnk
file in the dcf directory.
gVERSION:
this is the version string that appears in the DCF
interface.
gACCEL:
this is flag to indicate whether we have the eAccelerator software installed.
gPAGING:
this indicates the number of items to display per page on the Events and Station_Data lists.
If you are unable to connect to the DCF make sure that the user running the apache httpd process, usually "nobody" is in the group that owns the oracle software, if you use the Oracle default, this will be group "oinstall". Once this group has been added to the user, the web server will need to be stopped and started, NOT just restarted.
This component provides support for providing users with the information they need to decide whether a wind turbine or slar cell system is appropriate for their siting environment.
For a given release, the DGEP service component will be tagged in the CVS system by "DEOS_X_Y_Z" and so can be retrieved using that tag. X will be the major release, Y the minor release and Z most recent version. See DTN #7 for details of available releases. The example shows how to ensure the system is available to a Internet user.
There are no configuration items directly related to the DGEP, except those outlined in the DTN #7 document.
This component provides support for providing users real-time access to stored data in machine readable, XML, format.
For a given release, the web service component will be tagged in the CVS system by "DEOS_X_Y_Z" and so can be retrieved using that tag. X will be the major release, Y the minor release and Z most recent version. See DTN #7 for details of available releases. The example shows how to ensure the system is available to a Internet user.
There are no configuration items directly related to the data feeds, except those outlined in the DTN #7 document.
This component provides support for providing users with Atom version 1.0 and RSS version 2.0 data feeds.
For a given release, the data feeds component will be tagged in the CVS system by "DEOS_X_Y_Z" and so can be retrieved using that tag. X will be the major release, Y the minor release and Z most recent version. See DTN #7 for details of available releases. The example shows how to ensure the system is available to a Internet user.
There are no configuration items directly related to the data feeds, except those outlined in the DTN #7 document.
This component provides support for extracted data through a web front end.
For a given release, the data feeds component will be tagged in the CVS system by "DEOS_X_Y_Z" and so can be retrieved using that tag. X will be the major release, Y the minor release and Z most recent version. See DTN #7 for details of available releases. The example shows how to ensure the system is available to a Internet user.
The configuration for the HDRS is through the DCF, see the DTN #7 document.
The following are installation details for other software items required by the DEOS installation.
This library is required as part of the retrieve and cfgen components.
This release requires version 0.3.3 of cURLpp. http://rrette.com/curlpp.html
Example 13. cURLpp Install For Oracle 10g
cd cURLpp-dir/ ./configure ...configure output make ...make output make install ...make install output
Example 14. cURLpp Install For Oracle 9i
cd cURLpp-dir/ ./configure CC=gcc296 CXX=g++296 ...configure output make ...make output make install ...make install output
This file needs to have a entry for the path to the installation of shared library for cURLpp. The exact path in the last line in the example below will dependent on the settings to configure.
This library is required as part of the ODD-DIVAS component.
This version of ODD-DIVAS has been developed with version 2.2 of JpGraph. http://www.aditus.nu/jpgraph/
If the wind rose is to be used TrueType fonts will need to be installed. The install at Delaware used
this procedure. The resulting RPM file is provided
in the DEOS distribution for convenience (deos/rpm/msttcorefonts-1.3-4.noarch.rpm
.) If the
TrueType fonts are installed with this RPM file, the
TTF_DIR variable setting in the JpGraph file jpg-config.inc.php
needs to be configured with the directory the
fonts were installed into. This directory, if using the above method, will be /usr/share/fonts/msttcorefonts/
.
The cURL, libxml2 (version 2.6.11 is recommended and RPMs are provided in the DEOS repository), libxslt (version 1.1.11 is recommended and RPMs are provided in the DEOS repository) zlib and png libraries are required to build PHP as described below.
These libraries are available as RPM packages usually on one of the OS install disks. The associated curl-devel, libxml2-devel, libxslt-devel, libpng-devel and zlib-devel packages will also need to be installed.
To enable PNG image output for the DEOS code, the ImageMagick C++, tiff and XFree86 development packages (ImageMagick-c++-devel, libtiff-devel and XFree86-devel) will need to be installed with their dependencies.
In order to build PHP the system will need to have the RPM package libgcrypt-devel
installed. If it isn't an error of the form:
cannot find -lgcrypt
Apache and PHP are required to complete the setup required for ODD-DIVAS . They need to be built and installed together as described below.
This release has been developed with version 1.3.42 of Apache.
In order to build PHP to support true-type fonts, as required for the Wind rose in JpGraph, the system
will need to have the RPM package freetype-devel
installed. If it isn't an error of the form:
configure: error: freetype2 not found!
This release has been developed with version 5.2.14 of PHP.
Example 17. Apache/PHP build process
cd apache-dir ./configure --prefix=/www --enable-module=so ...configure output... make ...make output make install ...make install output cd php-dir ./configure --with-oci8 --with-gd --with-ttf --with-freetype-dir --with-apxs=/www/bin/apxs \ --with-zlib --enable-xmlwriter --without-pear --with-xsl --with-curl --with-curlwrappers ...configure output... make ...make output make install ...make install output 0. The Oracle install group (usually "oinstall") needs to be added to the Apache server user groups list. 1. Execute: cp php.ini-dist /usr/local/lib/php.ini to create a template PHP initialization file. 2. Add /usr/share/php/JpGraph/ to the include_path variable in the /usr/local/lib/php.ini file. 3. Add /usr/share/php/adminpro to the include_path variable in the /usr/local/lib/php.ini file. 4. Change the setting of max_execution_time to 60. (This is the maximum execution time permitted for PHP script execution.) 5. Change the setting of memory_limit to 200M. (This is the maximum memory a script is permitted to consume.) 6. Change the setting of short_open_tag to Off in the /usr/local/lib/php.ini. 7. Add Line "SetEnv TNS_ADMIN ORACLE_HOME/network/admin/tnsnames.ora" to /www/conf/httpd.conf file (replacing ORACLE_HOME with the actual path. If this isn't present, an ORA-12154 error may result.) 8. Add Line "SetEnv DATABASE name" to /www/conf/httpd.conf file (replacing name with the actual database name.) 9. Add Line "SetEnv DB_USER name" to /www/conf/httpd.conf file (replacing name with the actual user name.) 10. Add Line "SetEnv DB_PASSWORD name" to /www/conf/httpd.conf file (replacing name with the actual password.) 11. Add "AddType application/x-httpd-php .php .phtml" to /www/conf/httpd.conf. 12. Add "AddType application/x-httpd-php-source .phps" to /www/conf/httpd.conf. 13. Add an appropriate entry for "ServerName". 14. Comment out the following line, if present. "LoadModule php4_module libexec/libphp4.so" 15. Ensure that the module mod_dir.c includes index.php. It should look like: <IfModule mod_dir.c> DirectoryIndex index.html index.php </IfModule> 16. Add Line "SetEnv STATIONS 1" to the /www/conf/httpd.conf file. This value indicates which stations are to be displayed on this URL. If only one web site is being served, set STATIONS to 1 and set the Display_Flags value for all stations to 1 also. If more than one web site is to be server from this database, contact the author for assistance.
In the case when two or machines
are configured to accept requests to the canonical name, the individual machines
must have the ServerName
parameter set correctly so that the machine generating the cache file can
serve the cached files.
If this isn't done correctly, a 404 error, file not found, will result.
This installation is optional but recommended. The eAccelerator PHP extension increases performance of PHP scripts by caching them in a compiled state, so that the compiling of the scripts is only performed once.
If a new PHP version is installed, eAccelerator will need to be rebuilt from scratch and reinstalled. The command make distclean removes pre-existing binaries; once the command completes, the commands below may be used.
This release has been tested with version 0.9.5.2 of eAccelerator. http://eaccelerator.net/
Example 18. eAccelerator Install
cd eAccel-dir/ export PHP_PREFIX="/usr/local" $PHP_PREFIX/bin/phpize ... phpize output ./configure \ --enable-eaccelerator=shared \ --with-php-config=$PHP_PREFIX/bin/php-config ... configure output make ... make output make install ...make install output mkdir -p /var/cache/eAccelerator/ chmod 0777 /var/cache/eAccelerator/ cp control.php /path/to/dcf/directory ... edit user name and password entries in control.php file.
The following entries need to be placed in the php.ini file. The first line will need to be adjusted for the appropriate build environment. This directory path is output when the make install command exits successfully.
Example 19. eAccelerator Configuration
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20050922/eaccelerator.so" eaccelerator.shm_size="32" eaccelerator.cache_dir="/var/cache/eAccelerator/" eaccelerator.enable="1" eaccelerator.optimizer="1" eaccelerator.check_mtime="1" eaccelerator.debug="0" eaccelerator.log_file = "/www/log/eaccelerator_log" eaccelerator.filter="*.php" eaccelerator.shm_max="0" eaccelerator.shm_ttl="0" eaccelerator.shm_prune_period="0" eaccelerator.shm_only="0" eaccelerator.compress="1" eaccelerator.compress_level="9" eaccelerator.allowed_admin_path = "/www/htdocs/dcf"
This program is required as part of the ODD-DIVAS component.
This version of ODD-DIVAS has been developed with version 2.1.0 of XTide. http://www.flaterco.com/xtide/
Example 20. XTide Install
cd XTide-Source/ ./configure ... configure output make ... make output make install ...make install output mkdir -p /usr/local/share/xtide/ To configure add # Xtide Setup HFILE_PATH=/usr/local/share/xtide/harmonics-dwf-20100529-free.tcd to the /etc/profile file.
Periodically new harmonics files are needed and updates are available here. These files
are then process by /usr/local/bin/get_tides.bsh
to generate the daily tide data for each desired location.
[1] If this procedure isn't performed correctly, the most common symptom is an inability to log into the DCF system.
[2] If you get an error similar to: "ORA-02231: missing or invalid option to ALTER DATABASE" when running the above command then you need to execute the following:
"ALTER TABLE oe.orders DROP COLUMN order_date;"