Installation of FLAO Supervisor on CentOS 6/7 - x86_64

OS installation and configuration

OS installation and configuration, following the steps described in the following paragraphs, must be done with root privileges. The corresponding paragraphs are marked with: [OS]

Install selecting the "software development workstation" setting. This will install most required packages automatically. After the installation from a distribution media, a full update is suggested.

The list of RPMs after OS installation + upgrade is in:

[OS] Add non-default repositories

Some packages (mainly related to Qt version 3) are not available in the default CentOS6.x repository, You must add both the epel and the atrpms repositories to the yum list as shown below:

EPEL CentOS 6

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm

ATRPMS CentOS 6: You must add a file: /etc/yum.repos.d/atrpms.repo with the following content:

[atrpms]
name=Red Hat Enterprise Linux $releasever - $basearch - ATrpms
failovermethod=priority
baseurl=http://www.mirrorservice.org/sites/dl.atrpms.net/el$releasever-$basearch/atrpms/stable
enabled=1
gpgcheck=0

EPEL CentOS 7:

http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

[OS] Add Zeroc-ice repository

Note: Ice 3.6 which is the latest available at the moment of this writing seems not to provide RPMs for python support. Thjere is a python package available from PYPI, but only for python 3. We currently choose to develop against Ice 3.5

The easiest way to retrieve the code is to add the proper file to the yum directory as follows:

CentOS 6.x:

cd /etc/yum.repos.d
sudo wget https://zeroc.com/download/Ice/3.5/el6/zeroc-ice-el6.repo

CentOS 7.x:

cd /etc/yum.repos.d
sudo wget https://zeroc.com/download/Ice/3.5/el7/zeroc-ice-el7.repo

[OS] Install additional packages

The following are required packages from the CentOS distribution:

yum install qt-devel PyQt gmp-devel pyfits qt3-config kdelibs3-devel libXpm-devel cfitsio-devel lrzsz 

Depending on the initial selection of features when installing CentOS, it might be necessary to install some the following packages:

yum install gcc-c++ subversion boost-devel ncurses-devel python-devel readline-devel armadillo-devel mysql++-devel openmotif-devel xterm
;

Then we need the ICE packages:

yum install ice ice-libs ice-c++-devel ice-python ice-python-devel

Note: the FLAO supervisor build procedure requires that a "version independent" link is created as in the following example (Note: make the link to the actually installed Ice version):

 ln -s /usr/share/Ice-3.4.2 /usr/share/Ice

[OS] Install IDL

You must follows directions provided by IDL vendor. Current tested version is IDL 7.1, but other releases may work also.

Note 1: do not forget to install/configure the licence

Note 2: Under CentOS 6.x the idlrpcserver can only be started with root privileges. As an alternative Exelis suggests to also specify the port as follows:
   idlrpc -port=0x20001000

This seems not to work in all circumstances. We found more stable a different solution:

  • Change to root the ownership of the idlrpc executable and declare the same file setuid:
    chown root <idl_rpc_executable>
    chmod -s <idl_rpc_executable>

The location of the executable file depends on the IDL release. The FLAO installation procedure has a tool to find where IDL is installed, so you can delay this step after the preparation of the installation environment described below.

[OS] Add shared libraries to the runtime path

Create library path files as follows (Note: the IDL path may vary):
echo /usr/local/qwt-5.1.2/lib > /etc/ld.so.conf.d/qwt.conf 
echo /usr/local/exelisvis/idl71/bin/bin.linux.x86_64 > /etc/ld.so.conf.d/idl.conf
 

Then refresh the path:
/sbin/ldconfig -v

[OS] Support for NFS mounts

  • The ADSEC server must be set to export via NFS the directory /local/aomeas to the WFS server

  • The WFS serve must NFS mount the directory /local/aomeas exported by the ADSEC server.

Note 1: In order to allow proper access to files the flao user account and other accounts used for development should have the same UID on the two servers.

Note 2: To allow the expected propagation of UID in NFS mounted filesystems the option vers=3 must be used in file /etc/fstab of the mounting client.

User accounts

The production FLAO software will run from the account flao. This account must not be used for any software development whatsoever.

Software tests and any other maintenance operation will be performed from any other suitable user accounts.

flao account configuration

The flao account must have read/write access to the FLAO working directories:

/local/aolog
/local/aomeas (Note: this is a real directory on ADSEC server and is NFS mounted on the WFS server.

The two directories must be created in advance and must have proper owner and permissions (suggested owner:group = flao:flao, suggested permissions: drwxrwxr-x)

Development and maintenance account configuration

Development and maintenance user accounts must have read/write access to the directory /local/aomeas. (Suggestion: add user accounts used for development to the flao group)

4D and IDL

To use the 4D PhaseCam 4020 with the IDL wrapper:
  • Add the PYRO_CONFIG_FILE environment variable (i.e equals to $(ADOPT_ROOT)/conf/left/Pyro_Client.conf)
  • Set the variable PY_VER in Makefile.gen

Bulding a test version of FLAO Supervisor

The FLAO Supervisor can (and must) be built and tested from any convenient account which will not be used for the production installation. The account needs (and must have) only normal user privileges. Here follows the description of main steps.

Checkout FLAO Supervisor source tree and prepare for building

You must checkout from the proper SVN repository to get the FLAO version you want to install into any convenient directory. The following example gets the source tree from the SVN trunk and checks it out onto ./source (You have to specify an authorized username and you'll be prompted for a password):
svn checkout "svn+ssh://username@adopt.arcetri.astro.it/aogroup/svn/AOSupervisor/trunk source"
cd source

Then you must set up the environment to allow compilation:
python prepare.py make
source flao_environment.sh

The prepare procedure creates some working directories on your HOME checks the availability of IDL and creates the file flao_environment.sh with the environment definition required for the compilation of FLAO Supervisor.

You may want to add the source command to your environment setup procedure at login (usually .bashrc) to have it executed at every login.

Note: If the prepare.pyprocedure has executed correctly, you now can find the location of IDL executable files as follows:

echo $IDLLIBDIR

And you can modify idlrpc properties as directed above (see paragraph on IDL)

Building and installing the source code

NOTE: please be sure you have sourced the environment definition procedure flao_environment.sh before attempting to build the Supervisor.

The FLAO Supervisor build process is in four steps:

  1. Build the contributed software
    cd $ADOPT_SOURCE/contrib
    make (see note below)
    sudo make install
  2. Compile and install the Supervisor
    cd $ADOPT_SOURCE
    make
    make install 
     
    Note: verify that the install procedure has set proper ownership (root) and permissions(setuid) to the following executables: mirrorctl, masterdiagnostic

Installing configuration ad calibration data

Calibration eand configuration data are maintained in a different SVN repository. To install them you must first checkout the latest version onto a suitable directory:
svn checkout "svn+ssh://username@adopt.arcetri.astro.it/aogroup/svn/AOSupervisor/confcalib confcalib
Then to install configuration and calibration files:
cd .../confcalib
make install_conf
make install_calib

--
Topic revision: r21 - 20 Feb 2017, LucaFini
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback