|
Installing and maintaining a mirror |
|
This document describes the procedure to install and maintain an HyperLeda
mirror or the
Pleinpot software. It corresponds to version 8.11
(May 2007).
All the software and data are freely available for download (GPL license),
and the installation, including the WEB front-end, can easily be done on any
Unix/Linux machine.
One of the goal of the development team is to provide a complete package
with a minimum required platform, easy to install and easy to maintain. The
present version is close to these goals.
Following the instructions on this page allows to install the databases and
tools with a shell interface and/or http interface. Free support is provided
for installation and operation.
Hardware/Software requirement
- Disk space
For the standard installation, including the database and the Hypercat FITS
archive the total disk space requirement will not exceed 20 Gb.
The disk storage is divided in two parts:
- Main tree (software and catalogues)
In total, including the hypercat FITS archive the
volume is presently 15 Gb
(The size of the HFA is 4.8 Gb, the catalogues of the database
occupy 9 Gb and the executable programs 320 Mb
The sources occupy 125 Mb, documentation libraries and tools to maintain the
package are 100 Mb. About 300 Mb more are needed during installation.
- The WEB interface and documentation.
The volume is 18 Mb
Note that these volumes are just rough indications, they evolve (grow)
with time and may vary a little from one site to the other.
- Shells and Compilers
- sh and csh
- c compiler, eg. gcc
- fortran compiler, eg. g77
- Perl5 A version of Perl 5.005 or more recent is required
for the web interface (the rest of the package will work).
- Libraries
- m
- X11: If the X11 library is not available, it is possible to build
Pleinpot without
xwgraph (see configure options). Display of graphics to the
terminal will not be possible (it will not affect the WEB interface).
- Some other libraries are used, but will be created at the installation
- http server (required only if you install the web interface)
The local http server must enable the execution of cgi scripts on the
directory where HyperLeda is installed. These scripts are recognized from their
extension: .cgi
Important information about the configuration are reported in the file .htaccess that will be installed on the web root-directory.
First installation
(the present procedure has been updated on 2007/05/31)
The installation of Pleinpot should be done by a normal non-priviledged user
that is refereed in the following as the Pleinpot super-user.
Using 'root' superuser may be dangerous.
This installation of Pleinpot (and HyperLeda) follows a classical procedure:
get the archive file, configure and make. The installation should be easy, but
I encourage you to be extremely careful (files are
created, so be sure that you now where they will go...).
The files created when installing Pleinpot and HyperLeda will be attached
from the following three roots (details will be given later):
- PL_ROOT: The main top directory where the sources are located.
The executable files, the libraries and the catalogues will be intalled
from this root.
- CGIDIR: This is the directory where the web interface
(HTML files, CGI script ...) will be installed (if you wish).
This directory must pre-exist
to the installation (create it if necessary) and must be reserved to
HyperLeda (installation procedure erases other files!).
- PL_HTML: The directory where the HTML documentation of Pleinpot
will be installed. This directory must pre-exist
to the installation (create it if necessary) and must be reserved to
Pleinpot (installation procedure erases other files!)
Now, how to proceed...
- Create a directory hosting the root of pleinpot (usually, it is
called "pleinpot"), and move to this new directory.
- Retrieve to this directory the file:
http://cral.univ-lyon1.fr/hldfc/pleinpot_ini.tar.gz
- Install the files from this archive file as:
gunzip -c pleinpot_ini.tar.gz | tar -xf -
rm pleinpot_ini.tar.gz
This file contains the minimum needed to configure the installation (0.3Mb).
In particular, in contains the wget utility which will be installed
if it is not available on the current host. The rest of the software
will be downloaded (with wget) by the installation procedure.
- Depending if you want to install the WEB interface for HyperLeda
and the Pleinpot documentation, you must choose the proper configure options.
- --with-hyperleda-cgidir=CGIDIR:
By default the HyperLeda WEB interface will not be installed.
To install it you must provide in this option the absolute path
to the pre-existing directory where is will be installed. This directory
must be allowed for writting and must only contain HyperLeda since any
pre-existing files will be erased during the installation.
For example, you can use:
--with-hyperleda-cgidir="${HOME}/public_html/cgi-bin/"
- --with-hyperleda-http=URL:
URL is the root URL of the new mirrored site. It is used for internal
references and for routine tests.
For example:
--with-hyperleda-http=http://leda.univ-lyon1.fr
(use the URL
that users will see, not ip numbers or aliases).
- --with-dochtml=DOCDIR:
Set the directory where the HTML documentation of Pleinpot will be installed.
This directory should contains only this documentation, since files are removed
during the upgrade operations.
For example:
--with-dochtml=${HOME}/pleinpot_html
.
- If you have Postgres available on your machine and a database server running,
you may want to use this server for Pleinpot. Please read instructions for using a provided database server.
- Execute the configuration script that will produce the file
"local_definitions.mk" containing the local dependencies to be used
by the makefiles.
The configuration script has been generated with autoconf,
but some details of your local environment may be miss-interpreted.
It is advised to check carefully the screen output of "configure".
If you have problems you can re-run "configure" with other options or after
setting (unsetting) some environment variables. Finally only if you
are desperate you may edit the file "local_definitions.mk".
I encourage you to report the problems you had, so I can improve the
configuration script. (mail to leda@univ-lyon1.fr).
cd ${PL_ROOT}
unix/configure [with options choosed above]
Note that some of the variables produced by configure may (must)
be altered by setting some environment variables before executing the script.
Some command line options may also be used to customize the installation.
Environment variables that affect configure behaviour
- LIBRARIES In order to link application programs with the Pleinpot
libraries AND other libraries, you can define the list of these additional libraries as eg. (csh):
setenv LIBS -L/usr/local/pgplot -lpgplot -L/usr/local/lib -lnumerical_recipes
or (sh):
export LIBS="-L/usr/local/pgplot -lpgplot -L/usr/local/lib -lnumerical_recipes"
To explicitly define the path to the X11 library, you can set LIBS
or equivalently use the --x-libraries option:
${PL_ROOT}unix/configure --x-libraries=dir
- CC C compiler. The configuration script will choose
the GNU compiler gcc if this one is available. This choice may be
forced by setting CC as eg. (csh)
or (sh)
- CFLAGS C compiler options (superseed the value otherwise determine
by the configure script).
- FC,FOPT and CFORTRANFLAGS Fortran compiler.
This variables controlling the compiler command and the options are in
principle automatically determine. But in some cases, in particular
if more than one compiler is available, these variables may be pre-defined,
eg. (csh) or (sh):
- CXX c++ compiler. Force a compiler to be used, or set
CXX=none to disable c++ compilation (c++ is only used by user's
programs, not presently by Pleinpot applications, you may disable c++ in case
a corrupted c++ compiler prevent the configuration to run).
Some other configure options
There are other options, type unix/configure --help for the whole
list. Several of them concern the database
installation and operations. If your site is protected behind a fire-wall for
http requests, you may need to
configure with a proxy server.
Some other options are:
- --with-dss1=dss_path_file. Access Digitized Sky Survey (DSS1) located on local
discs.
- --with-cdrom=archive_directory_path. Install the software from a disk (or
remote URL. By default the installation is done from the Pleinpot central archive.
-
The rest of the installation depends on the actual elements you want to
install. We propose three major installations:
- install-pleinpot
Install the software dependences, the Pleinpot libraries and application
programs. The HyperLeda database is not installed.
All the functionalities, from
the shell or from the web interface, are available and the library silently
calls a remote mirror when necessary.
This is faster to install, takes less disk space
(less than 1 GB) but depends on network link for remote resources.
After this version is installed, it is possible to upgrade it to a more
complete version by simply typing install-hyperleda or
install-whole.
- install-hyperleda
Install the same as install-pleinpot, and in addition install
the HyperLeda database. Even if you are not interested in this database
for galaxies, it is the most common installation because it includes the
powerful name resolver for astronomical objects that can be used for
your own database. It requires about 6 GB in total.
- install-whole
Standard full installation recommended for a public HyperLeda mirror. In
addition to install-hyperleda, it also installs the HyperLeda
FITS Archive (hfa). It is the longest to install (it may take one day on slow
connections) and the most demanding in terms of disk space (6 GB more).
To install one of this distribution, type
or
These commands may take a long time. They are downloading files from the
central Pleinpot archive and therefore they depends on the network load
and bandwidth. The database installation may also be long, depending on
the CPU you are using (between 1/2 and a couple of hours).
If something goes wrong, contact Philippe Prugniel.
It is possible to arrange variants of these installation using other targets
described in the main makefile.
Any of these installations create the HyperLeda WEB front-end and the
html documentation for Pleinpot if the proper configuration switch where
used with the command
unix/configure [options].
- Test the installation
- Automatic tests of command line applications and HyperLeda web interface
if this latter is installed, type:
- Test interactive applications
Before executing Pleinpot application, you must "start" Pleinpot
(ie. define a couple of environment variables, set the Pleinpot directories
on the PATH, create "session" directory and files).
This is done by executing (csh version):
source ${PL_ROOT}/unix/plstart.csh
Or (sh version):
. ${PL_ROOT}/unix/plstart.sh
Then a first test could be:
This should display the documentation (man page) of the ledalise
program
A second test could be to run a more elaborated program:
grlise "dss1:095127.6+691812,6" @6
This should load an image of M81 from the Digital Sky Survey trough
the network (the string 095127.6+691812 are the coordinates of M81).
A graphic window should be opened, and the image should be
displayed in gray scale (type pman grlise for documentation).
There are several reasons why it may not work:
- The network connection failed. Try with a local FITS file...
- The graphic driver (xwgraph) did not start. It may be because you
did not set the environment variable DISPLAY to your actual screen.
If you have installed the database (install-hyperleda or install-whole)
you can try:
This will load the same image, but the coordinates of the galaxy are decoded
from the "name" using HyperLeda database.
If these tests succeeded, your installation is probably correct!
- Test the WEB interface
The automatic test procedure described above checked different features of the
mirror. If it is successful it returned OK on stdout,
otherwise it exits with an error status after the first problem encountered
and prints a message on stdout.
This procedure executes only basic tests (it will be improved in the future),
you can use a WEB browser to navigate in HyperLeda and see if everything is
correct.
There is a page of tests which are used by the
developers to test the functions before a release.
The web interface test procedure can be executed alone as:
${PL_ROOT}unix/test-web URL-of-the-Hypercat-mirror
- Test the HTML documentation
If you have installed the documantation, load the file
introduction.html (or the corresponding URL) in your web browser
Note that if you leave this documentation on a public place on the WEB,
we ask you to notify us (leda@univ-lyon1.fr)
See the HTML documentation of Pleinpot of the Observatoire de Lyon server
http://leda.univ-lyon1.fr/pleinpot/pleinpot.html
- Put the logo of your site
Copy a gif file with the logo of your site to the ${HYP}
directory and give it the name site.gif. For example do:
cp mylogo.gif ${HYP}/site.gif
If you do not do this, by default the logo will be the Hubble tune-fork icone.
Notes
- Most common installation problems:
(1) Interrupted downloading.
The first file installed by Pleinpot contains the minimum elements
needed to continue the installation. The rest of the software and data are
fetched from the network (but see the configuration options: it is possible
to download from a cdrom). It may happen that the download is stopped
due to network instability (and the message is unfortunately not always clear).
The solution is to restart the installation (it will probably continue from
the points it has been stopped). If the problem persists, send us a note.
(2) If your are behind a fire-wall, and if your http requests have to go
through a proxy, use the configure option: --with-http-proxy.
(3) Bugs in the installation software.
The compilation/installation of the individual pieces of software
are generally robust. The procedure which install the totality
of the package may suffer from portability bugs (it improves from version
to version).
To help us for support, send us an accurate description of your environment,
a copy of the command you issued and of the messages returned by the computer.
(4) Installation and operation problems with the postgres server. It exists
many different possible configuration, depending if you are providing a
database yet installed on your machine, using a remote access, using a yet
installed Postgres package... all combinations may not have been tested!
If the machine is stopped, the database server will be shut down and may not
restart by itself. It may restart at the first request, but you may have to
type: cd $PL_ROOT; make hlstart
(5) The configuration script checks if the C++ compiler works. But either that the compiler is broken or the test incorrect, it happens that the
configuration fails at that point. The c++ compiler is not required for
installing Pleinpot, and you may try to solve the problem by setting:
setenv CXX none and redo unix/configure>
(6) When installing on Tru64 (OSF 5) with the native C compiler the Postgres installation may fail (bug in Postgres). The turnabout consists in defining:
setenv CFLAGS "-ieee -O4 -Olimit 2000", redoing
unix/configure and make. (this error should be corrected in the most recent versions of Postgres).
(7) By default most Linux distributions do not install some header files which
are needed for compiling, like for example Xlib.h.
These header files are included in packages having "devel" in their name,
or something similar, they can certainly be installed
at any time after Linux is installed (but before configuring Pleinpot).
On Mac OS X (10.3), install the developer packages Developer.mpkg and
X11SDK.pkg
(8) If after having installed Pleinpot you wish to update your
operating systems or some general libraries, like libc it is wise
to first save the data from the database (if you have other data than
HyperLeda) and stop the database server. After upgrade you may not be able
to restart the database server; in that case you will have to remove
the directory hldata and reinstall the database
(make install-leda and eventually reinstall your own tables).
A more radical solution is (i) stop the database server as
make hlstop, (ii) remove the $PL_ROOT directory and (iii)
reinstall from scratch.
(9) On Solaris, it may be necessary to define
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/home/pleinpot/lib/postgresql (before starting the database server).
- If you want to use Pleinpot interactively, it is convenient to put
some definitions in the .cshrc file
.
Add for example the following:
#-----------------------
# definitions for PLEINPOT:
#-----------------------
setenv PL_ROOT /pleinpot/
alias plstart "echo \!* >\! pls; source ${PL_ROOT}unix/plstart; /bin/rm pls"
Or in a sh (file .bashrc)
#-----------------------
# definitions for PLEINPOT:
#-----------------------
export PL_ROOT=/pleinpot/
alias plstart=". ${PL_ROOT}unix/plstart.sh"
Most important is the definition of PL_ROOT the path to the
root of Pleinpot.
- The make command echoes each (or almost) action on the screen. It
is intentional for debugging purposes, but it makes the screen hard to
understand. Do not confuse echoes of commands, as
'|| echo "Error failed ..."', with actual error messages. Anyway if
you have doubts, redirect the output to a file and send it to me.
-
At the installation, most compilers issue "warnings", in principle
they are not important, but ...
Identified false alerts are:
- G77 complains about cosd, sind ... which are
"intrinsics" for most compilers, but are only "scheduled" to become intrinsic
in a future version of g77. For this reason this functions are included
in Pleinpot (but not declared as external when they are used). This does not
affect the functionalities...
- G77 complains when calling the same routine with arguments of
different types. This is indeed generally an error, but not always.
Fortran is passing arguments by reference and the actual type should
not be important (ie. should not be signaled as an error). In
Pleinpot, this sort of use is frequent, in particular when dynamic
memory is used...
- The IRIX linker displays a lot of warnings...
- Most compilers complain sometime about uninitialized variable. There
may indeed be errors, but sometimes these are false warnings (eg. variables
initialized in conditional blocs)...
- There exists 3 levels of distribution of Pleinpot. The stable release
is the one installed by default. You may desire to install either the
Beta (possible portability problems) or Alpha (development, nightly build) most recent
release. To do it, after you made the first step of the installation
(unix/configure) you can type (before make install-whole):
make themirror_beta; unix/configure [with your options] and then proceed to
make install-whole (eventually say mirror_alpha,
and/or install-pleinpot, install-whole)
To update an alpha or beta release, always do first
make themirror_alpha (or beta).
- The maintenance of a mirror is based on comparison of dates. Hence it
is of a prime importance that the clock of the host is correctly set.
Except in particular case, an error of a few minutes or even of a couple
of hours has no consequence. But if the clock is in advance by about one
day, the (daily) updating may not work.
- In order to use another Fortran compiler than the one corresponding to
the command g77 or f77, type before executing
configure:
setenv F77 /path_to_my_preferred_f77
The Pleinpot configure tries first to use g77 if it is present. Be
aware that if you link your Pleinpot applications with other libraries
(eg. Numerical Recipes) that were compiled with another Fortran compiler, you
may have problems (eg. unresolved modules in principle included in the
compiler's internal library).
Updating
The mirror should be updated regularly (I recommend each night). This is
best done using a crontab procedure.
Note that the crontab must be owned by the user who installed the database.
Running it as root will not work (root cannot start the database server
if not owner of this one) and is not a good strategy in regards
of security.
The crontab procedures executed on the mirrors of the
home-institutions of the members of the Hypercat consortium are available
in the sources of the package. See: ${PL_ROOT}unix/cron-example.
For example, the following script may be used for daily update of a particular mirror:
#!/bin/csh
#--- cron-HOST: this routine is executed on "HOST" every morning at 3,
# it updates HyperLeda on the WEB
#------------------------------ PhP 23/01/98 ----r. 09/12/99 -----------------
setenv HOST nimbus
setenv PL_ROOT /data/
cd $PL_ROOT
(date ;\
make themirror reconfigure && make install-whole ||\
echo "Pleinpot installation on ${HOST} failed" ;\
) >&! ${PL_ROOT}public_html/cgi-bin/install/mirror.log
# ------------------- END ---------------------------------------------------
The "official" Hypercat mirrors are automatically checked from Lyon
once per week in order to detect anomalies in their functioning or
in the connection. Send a mail to "register" your mirror as an "official" one.
Be careful that crontab generally do not start with the same
environment variables as a sh session. In particular, the
environment variables PATH and LD_LIBRARY_PATH may not
be set, and this may prevent some libraries or programs (eg. compilers)
to be found...