Previous | Next |
Installing GSAC-WS
Installing the GSAC Web Services Software Package
Check the System Requirements below. You will also need a Database for GSAC, described below.
To install GSAC:
Find or make a top-level working directory for GSAC, and go there. For example:
mkdir ~/GSAC/
cd ~/GSAC/
Check out the GSAC code from SourceForge (go to https://sourceforge.net/projects/gsac/; and click on 'Code' menu item in the 'Summary Files' menu line, to get the command)
by entering this command:svn export svn://svn.code.sf.net/p/gsac/code/trunk gsac-code
Go to the GSAC core code area:
cd gsac-code/src/org/gsac/
In that new directory is a file called README. This is the first file, Part 1, of two README files to complete GSAC installation, in the GSAC software package. Follow the instructions in the README part 1 file The end of the README Part 1 file tells where to find the README Part 2 file in the GSAC package. Then follow the instructions in README Part 2. Having the README files inside the code package ensures that the installation instructions are consistent with the code package.
See also About a GSAC Installation below.
System Requirements
You can install GSAC web services for a data repository when you have:
- a database, with complete metadata about sites (stations or monuments), their instruments, and their data files (if any). See more details in A Database for GSAC, below. You can use an existing database you have, with no changes to it, but new Java code for GSAC code must be written to read the database, which requires some use of the GSAC core classes. Or you can make a new database using the GSAC prototype database schema as described below, populating it with your data values, which allows you to use GSAC code with few changes.
- a web server for GSAC web pages. Running GSAC with the Tomcat application server is common, but Tomcat is optional. GSAC can use its own included application server, Jetty.
- usually, GNSS data files from the instruments, for remote users to download. GSAC can provide discovery and download of geodesy data files like RINEX files. This is optional.
- if you want to offer data file downloads, an FTP / HTTP download server for the data files. GSAC itself can run on a different web server from the server(s) for downloads, a benefit. (GSAC does not download files; GSAC tells users how and where to download files, a URL for the FTP/HTTP server and the file.)
- A Linux system (see below for details) for the initial installation and test of GSAC, with related software tools bash, Java JDK 1.6 or 1.7, subversion ("svn"), and ant, and with access to your GSAC database.
- the GSAC software package provided by UNAVCO. GSAC is free and open source code in the GSAC package from SourceForge.
About Linux Systems
GSAC uses standard Linux operating system features and utilities. Your Linux will need the utilities ant, bash, svn, and Java development support. GSAC experience is not yet extensive enough to recommend one OS, or to discourage use of any. GSAC has been installed on Debian, Ubuntu, Mac OS, and Free BSD. UNAVCO will test GSAC on CentOS in early 2014.
Debian, Ubuntu, CentOS, and Fedora
A typical Linux system for GSAC operations could use Debian, with the bash shell. Debian with bash has simple installation of the software tools you need using apt-get. Ubuntu, Fedora, and CentOS Linux are similar, but Debian is recommended for stable and secure operations.
Java JDK, version 1.6 or 1.7. Most Linux Os-s come with a Java JDK which probably will be OK for GSAC builds. Try commands "java -version" and "javac - version" to see your Java versions.
To install ant, do command sudo apt-get install ant
To install subversion ("svn"), do command sudo apt-get install subversion
If you elect to use MySQL, versions 5.1 to 5.6 are know to work. Do the command sudo apt-get install mysql-server This requests you to enter the "root" password, which is a new root password for MySQL, not your Linux system root password.
Mac OS
On a MacBook Air, this configuration works:
Mac OS X Ver 10.9.1 (Mavericks)
5.6.14 MySQL Server Version
JDK 7 Update 09 (build 1.7.0_09-b05)
svn, version 1.8.5 (r1542147)
ant, Apache Ant version 1.9.3 (version 1.8.1 fails)
setenv JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home
setenv ANT_HOME /sw/lib/antFree BSD
See the Installation_Guide_for_GSAC_on_FreeBSD on the UNAVCO GSAC web site, created and contributed by Xanthos Papanikolaou, National Technical Univeristy of Athens, Dionysos Satellite Observatory, Higher Geodesy Laboratory.
The GSAC development at UNAVCO uses MySQL. MySQL is easy to use and so far has created no problems. Configuring user accounts in MySQL on a Debian OS is tricky, but the issue is well documented online. One GSAC installation uses MySQL on Debian.
GSAC code should be able to use Postgres, with no changes to GSAC code, but this has not been tested yet.
A highly-customized GSAC running at UNAVCO uses Oracle. The standard or prototype GSAC code has not been tested with Oracle yet.
There are two ways to supply a database for GSAC. First, you can use an exisiting database, if your existing database has all the types of station, instrument, and data file metadata required by GSAC.
See the Prototype GSAC database schema notes, and the Prototype's MySQL schema .sql file, on the UNAVCO GSAC web site to learn about the database fields (columns) required by GSAC to provide its complete suite of web services. The Prototype GSAC database schema notes and dump (.sql) files can help you see if you have adequate types of metadata in an existing database to support GSAC web services.
In the case of using an existing database, you willneed to modify GSAC's PrototypeSiteManager.java and PrototypeFileManager.java files, to use your database table names and field names which are not the same names as in the Prototype GSAC database, to make new code to read from your database. Some changes in coding SQL queries may be required depending on your database design, when it differs from the GSAC prototype schema. The more you are willing to modify the PrototypeSiteManager.java and PrototypeFileManager.java files, and write new Java code using GSAC Java method calls, the more your database schema can differ from the standard GSAC database. The files PrototypeSiteManager.java and PrototypeFileManager.java in the GSAC package are a good place to begin writing new Java code for your new SiteManager and FileManager classes.
Alternately you can make a new database for GSAC for your data center, using the standard or prototype GSAC database schema provided by UNAVCO, unmodified. In that case the "Prototype" Java files in the GSAC package, PrototypeSiteManager.java and PrototypeFileManager.java, should allow installation of a working GSAC using your database in a few a hours, after your new database is populated.
You can create a new GSAC database (lacking any of your data to begin with), using the simple command "source Prototype_GSAC_Database.sql" in a mysql session. See more details three paragraphs below.
This standard or prototype schema for GSAC may be revised in future, but it is quite complete now. The prototype schema supports geodesy data search and discovery, and all the GSAC formats of search results including web pages, and output types such as SINEX and GAMIT station.info files.
The tables and fields (columns) in the prototype GSAC schema show the essential parameters needed for GSAC, and their data types. The prototype design corresponds to common geodesy needs, such as encapsulating station receiver-antenna sessions, and helps avoid error-prone database practices, such as storing latitude values or time values in a character strings. The prototype design includes features to insure reduced problems in an archive database. For example, only actual dates and numbers can be stored in date and number fields. Databases which store dates or numbers as character strings are error-prone and difficult to manage. GSAC uses all times and dates in UTC, in ISO 8601 format.
To create a new MySQL GSAC prototype database using the Prototype_GSAC_Database.sql file:
- if you do not have MySQL, install it. On some Linux systems you can simply do the command
sudo apt-get install mysql-server.
This requests a you to enter a "root" password, which should be a new password just for MySQL, not your Linux system root password.
- start the MySQL server, for example in Linux with "sudo /etc/init.d/mysql restart"
- cd to the folder with the file Prototype_GSAC_Database.sql
- edit the .sql file to change the name of the database, before you use mysql to create the database. You can change all instances of `Prototype_GSAC_Database` to your new db name, something like MyCenter_GSAC_database; the name is not particularly important and will not be visible to GSAC users.
- run mysql as mysql root and create a new MySQL account for GSAC, called for example gsacdbuser.
- run the mysql command line tool, such as, in Linux, "mysql -u gsacdbuser -p"
(MySQL documentation is online, as at http://dev.mysql.com/doc/refman/5.1/en/index.html).
- in mysql (mysql>) do the command source Prototype_GSAC_Database.sql; (including the ;)This creates a GSAC prototype MySQL database, which is of course initially empty of your GNSS metadata. You will next populate the database with information about your stations, instruments, and data files for download.
UNAVCO can aid and advise about GSAC installations and operations. UNAVCO has a responsibility to ensure that GSAC itself installs properly. UNAVCO can help install GSAC, in some cases including providing a provisional working database with some of your data center's information, if some conditions are met including your use of the provisional database schema. UNAVCO will populate the provisional database with an initial but incomplete set of data, just enough to ensure that GSAC is working.
Completely populating your database, and maintaining it, is necessary to operate GSAC, but doing so is outside of GSAC software installation, and is your responsibility. Also, GSAC does not check data file quality or otherwise manage a data archive. GSAC is web services, not a content management system, and it does not "know" much about geodesy.
Previous | Next |