25
EUROSTAT Framework Contract Nr DIGIT-05717-00 STATEL - Linux distribution Installation Guide Subject Statel – Linux distribution Installation Guide Version 0.02 Software Version 4.0 Release Date 19/06/2014 Filename STATEL - Linux distribution-Installation Guide-v0.02.doc Document Reference STATEL - Linux distribution-Installation Guide

STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

  • Upload
    others

  • View
    11

  • Download
    0

Embed Size (px)

Citation preview

Page 1: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EUROSTAT Framework Contract Nr DIGIT-05717-00

STATEL - Linux distribution

Installation Guide

Subject Statel – Linux distribution Installation Guide

Version 0.02

Software Version 4.0

Release Date 19/06/2014

Filename STATEL - Linux distribution-Installation Guide-v0.02.doc

Document Reference STATEL - Linux distribution-Installation Guide

Page 2: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 2 of 25

DOCUMENT HISTORY Version Release

Date Author Description Software

version 0.01 05/12/2013 Dogru Ismaïl Creation of the document 4.0

0.02 19/06/2014 Grégory Gack Update following EUROSTAT comments 4.0

REVIEWS Version Name Position Date

0.01 Grégory Gack Delivery Manager 05/12/2013

0.02 Pierre Saunier Project Director 19/06/2014

Page 3: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 3 of 25

TABLE OF CONTENTS

1 Introduction ............................................................................................................................................... 6

1.1 PURPOSE OF THE DOCUMENT AND ASSUMPTIONS .......................................................................................... 6

1.2 INTENDED AUDIENCE ....................................................................................................................................... 6

2 Reference and applicable documents ...................................................................................................... 7

2.1 REFERENCE DOCUMENTS................................................................................................................................ 7

2.2 APPLICABLE DOCUMENTS ................................................................................................................................ 7

3 Terminology .............................................................................................................................................. 8

3.1 ABBREVIATIONS AND ACRONYMS .................................................................................................................... 8

3.2 DEFINITIONS .................................................................................................................................................... 8

4 Technical configuration ............................................................................................................................. 9

5 Porting of STATEL to Linux .................................................................................................................... 10

1. gcc compiler: The testing has been performed with versions 4.4.7 . ................................................... 11

2. GNU make: In the testing environment the version used was 3.81 . ..................................................... 11

3. OpenSLL: In the testing environment the versions used were 1.0.1c ................................................. 11

4. Java SDK : In the testing environments the version used was 1.6.0 . ................................................. 11

5. zlib : In the testing environments the version used was 1.1.4 . ......................................................... 11

6. ncftp : In the testing environments the version used was 3.2.4 . ........................................................ 11

• Type, version kernel version of Linux platform used and the version of the tools listed above ............. 11

• The output of the make command .......................................................................................................... 11

6 Pre-installation steps ............................................................................................................................... 12

7 Building process ...................................................................................................................................... 13

7.1 DECOMPRESSION OF THE PROVIDED FILE ..................................................................................................... 13

• The core source code in the file statel4.tar ..................................................................................... 13

• The directory DATA/ which will be used as the base directory for STATEL data files. It also contains templates of configuration files. ....................................................................................................................... 13

• A install shell script file “install_ncftp” in order to compile automatically the correct ncftp version ......... 13

• The compiled version of the ncftp-3.2.4 client for Linux (useful for a type of configuration) and a symbolic link to its root directory (ncftp->ncftp-3.2.4 ) ........................................................................... 13

• The openSSL library(openssl-1.0.1c.tar.gz ). .............................................................................. 13

7.2 BUILDING THE NCFTP VERSION ................................................................................................................... 13

7.3 BUILDING OPENSSL ..................................................................................................................................... 14

7.4 BUILDING ZLIB ............................................................................................................................................... 14

7.5 CONFIGURING THE STATEL INSTALLATION ................................................................................................. 14

7.6 COMPILING AND INSTALLING THE SOURCE CODE .......................................................................................... 15

8 Configuration and basic tests .................................................................................................................. 16

Page 4: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 4 of 25

• The directory under which all STATEL data will reside (the tuple directories) is by default the directory $HOME/DATA. Its location can be modified if desired. In such case the environment variable STATELBASEDIR (see next step) should be updated accordingly. ................................................................. 16

• Update the profile (/etc/profile) of the statel user with the following variables: .................................. 16

• Change the working directory to $STATELBASEDIR. Type locale and, if needed, rename the file ERRCODE.EN so that its extension is equal to LANG (e.g. ERRCODE.C) expressed in uppercase. ................ 16

9 How to configure more Unix users to use STATEL ................................................................................ 20

• user_x has the same primary group with statel user ........................................................................ 20

• user_x is registered in the section [Registered Users] of the file $STATELBASEDIR/SNN.ISF .20

• user_x has the variables STATELBIN, STATELLIB and STATELBASEDIR set in his environment. The LD_LIBRARY_PATH of user_x must include $STATELLIB . ......................................................................... 20

• The tuple directories under $STATELBASEDIR and the files they contain have write permissions enabled for the group. ...................................................................................................................................... 20

• The STATEL programs (incorp , vfsdir , etc) have execution rights set for the group. ................... 20

• In the configuration file $STATELBASEDIR/<remote-snn-dir>/ CF and in the script ncptp/bin/ncftpget.sh the $HOME of the statel user must be expressed as absolute path ( e.g. /home/statel) and not as a variable. ......................................................................................................... 20

10 Configuration of NCFTP in case of FTP Proxy Firewall.......................................................................... 21

Page 5: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 5 of 25

LIST OF FIGURES Figure 1: Architecture overview ....................................................................................................................... 10

Page 6: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 6 of 25

1 INTRODUCTION

1.1 PURPOSE OF THE DOCUMENT AND ASSUMPTIONS This document provides

• Overall information about the porting of STATEL code on Linux • Instructions for the building process • Instructions for the configuration and basic tests of the system • Instructions for the configuration of the system when it is behind an ftp proxy/firewall.

The installation guide concerns the release 4.0 of Statel for Linux system 32 bits.

1.2 INTENDED AUDIENCE This document is intended to be used by the Statel users or administrators installing and configuring Statel application.

Page 7: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 7 of 25

2 REFERENCE AND APPLICABLE DOCUMENTS

2.1 REFERENCE DOCUMENTS Ref Domain Document

2.2 APPLICABLE DOCUMENTS

Page 8: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 8 of 25

3 TERMINOLOGY

3.1 ABBREVIATIONS AND ACRONYMS No specific abbreviations and acronyms.

3.2 DEFINITIONS No specific definitions.

Page 9: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 9 of 25

4 TECHNICAL CONFIGURATION

A computer running with Unix system. Unix user (the conventional name is statel), who will own the application.

Page 10: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 10 of 25

5 PORTING OF STATEL TO LINUX

The purpose of this task is to make possible the arrangement shown in Figure 1: Architecture overview. The organisation A has a Linux installation of STATEL (let its SNN be linux-snn ) in order to communicate with Eurostat, in contrast to other cases where the Windows version is used. Additionally, linux-snn can connect with more local installations of STATEL inside the organisation (1-snn , 2-snn etc) and can be accessed by the Unix version of SRS.

EUROSTAT

ORGANISATION A

SNN: linux-snn

Linux

SNN: eurostat-1

SunOs

STATEL

GATEWAY

Figure 1: Architecture overview

The delivered package has been tested successfully on the following Linux distributions:

• openSUSE Linux version 11.4 running kernel 2.6.37.1-1.2-desktop • CentOS 6.4 running kernel 2.6.32-358.el6.x86_64

Page 11: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 11 of 25

STATEL must in principle be able to be ported to any other Linux distribution without problems assuming that the following softwares are available:

1. gcc compiler: The testing has been performed with versions 4.4.7 .

2. GNU make: In the testing environment the version used was 3.81 .

3. OpenSLL: In the testing environment the versions used were 1.0.1c

4. Java SDK : In the testing environments the version used was 1.6.0 .

5. zlib : In the testing environments the version used was 1.1.4 .

6. ncftp : In the testing environments the version used was 3.2.4 .

In case minor problems appear during the compilation of the package in another Linux distribution, the corresponding problem report that will be addressed to Second Level support should contain the following information:

• Type, version kernel version of Linux platform used and the version of the tools listed above

• The output of the make command

The configuration file “config.m” found under the root directory “statel4”.

Page 12: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 12 of 25

6 PRE-INSTALLATION STEPS

Before installing the software the following steps are required:

• Creation of a unix user (the conventional name is statel), who will own the application. • Reception from Eurostat of the SNN (Statel Nick Name) of the installation.

Page 13: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 13 of 25

7 BUILDING PROCESS

In order to build Statel4 for Linux the following three main steps must be performed:

7.1 DECOMPRESSION OF THE PROVIDED FILE Copy the compressed file to the HOME directory1 of the statel user and make:

gunzip statel4-linux-dist.tar.gz tar -xvf statel4-linux-dist.tar

The following contents are extracted:

• The core source code in the file statel4.tar

• The directory DATA/ which will be used as the base directory for STATEL data files. It also contains templates of configuration files.

• A install shell script file “install_ncftp” in order to compile automatically the correct ncftp version

• The compiled version of the ncftp-3.2.4 client for Linux (useful for a type of configuration) and a symbolic link to its root directory (ncftp->ncftp-3.2.4 )

• The openSSL library(openssl-1.0.1c.tar.gz ).

Then decompress the source code statel4.tar

$ tar -xvf statel4.tar

All the source code will be extracted under the directory statel4 .

7.2 BUILDING THE NCFTP VERSION In the current directory, execute the file “install_ncftp” as shown in the example:

$ ./install_ncftp

Completion messages will inform about the status of the build. Remark: If needed, log file “ncftp_install.log” is created in the directory “ncftp”.

1 It is not mandatory to use the HOME directory. This convention is used for better demonstration.

Page 14: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 14 of 25

7.3 BUILDING OPENSSL Decompress the source of openssl-1.0.1c.tar.gz

$ gunzip openssl-1.0.1c.tar.gz $ tar -xvf openssl-1.0.1c.tar

In the openSSL directory execute the following commands:

$ ./configure $ make

7.4 BUILDING ZLIB In the statel4/zlib directory execute the following commands:

$ ./configure $ make

7.5 CONFIGURING THE STATEL INSTALLATION Change the working directory to “statel4” and run the configuration script, entering the appropriate values. As “base directory for the STATEL installation”, it can be chosen either the same directory under which the source code is extracted (<full-home-path>/statel4) or a different directory as shown in the example:

$ cd statel4 $ ./configure statel@statel:~/statel4> ./configure Please enter the base directory for the STATEL inst allation: /home/statel/software Please enter the STATEL user [statel]: statel Please enter the STATEL group [statel is member of <statel : users dialout video>]: statel Do you want debugging made available [Y]: [enter] Do you want STATEL Logging switched on [Y]: [enter] Where is the OpenSSL crypto library located [/usr/l ib/libcrypto.a]? [enter] Where is the OpenSSL include directory located [/u sr/include]? [enter] Do you want to build the jstatel library [Y]: [enter] Where is your SDK_HOME? [/usr/lib/jvm/java] [enter] Where is the zlib library located [/usr/lib/libz.a] ? [enter] missing Please review the following configuration: =========================================== # Created on Wed Sep 15 15:10:34 CEST 2010 VER=5.0.0 PREV = 4.1.2 PREFIX = /root/statel4 LIBINSTALLDIR = "$(PREFIX)/lib" BININSTALLDIR = "$(PREFIX)/bin" STATELLIB = /root/statel4/lib STATELBIN = /root/statel4/bin

Page 15: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 15 of 25

STATELUSER = statel STATELGROUP = statel STATELINCLUDE = ../Include FEATURES = -DDEBUG -DST_STATISTICS -D__STATEL_TM__ CRYPTOLIB = /root/openssl/openssl-1.0.1c/libcrypto.a COMPRESSLIB = /root/statel4/lib/libz.a SYS_ZLIB_FOUND = BUILD_JSTATEL = 1 SDK_HOME = /usr/java/jdk1.6.0_21 EXTRALIBS = -L ../dllist -L ../lib CRYPTOINCLUDE = -I /root/openssl/openssl-1.0.1c/include DLLISTINCLUDE = -I ../dllist COMPRESSINCLUDE = -I /root/statel4/include EXTRAINCLUDES = $(DLLISTINCLUDE) $(CRYPTOINCLUDE) $ (COMPRESSINCLUDE) MACHINE = linux CC = gcc BASECFLAGS = -g -O2 -Wall -DHAS_FTRUNCATE -Wno-pare ntheses SHLIBFLAGS = -fPIC SHLIBLINK = -shared -Wl,-soname,$(@F) -ldl SOCKETLIBS = DEPENDFLAG = -M SYMLINKTEST = -L DEFS = -DHAVAL_LITTLE_ENDIAN INSTALL_UTIL = /usr/bin/install DEFS = -DHAS_UNISTD_H -DSTDC_HEADERS -DHAS_SGTTY_H HFLAGS = -I $(STATELINCLUDE) LFLAGS = $(SHAREDREF) -L $(STATELLIB) $(EXTRALIBS) $(SOCKETLIBS) CFLAGS = $(BASECFLAGS) $(HFLAGS) $(FEATURES) -D$(MA CHINE) $(DEFS) $(EXTRAINCLUDES) # RULES .o.a: @$(AR) $(ARFLAGS) $@ $*.o ===========================================

7.6 COMPILING AND INSTALLING THE SOURCE CODE In the current directory “statel4”, execute the following command:

$ make

If the destination directory was different than the initial “statel4” directory the following command must be additionally executed:

$ make install

Page 16: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 16 of 25

8 CONFIGURATION AND BASIC TESTS

• The directory under which all STATEL data will reside (the tuple directories) is by default the directory $HOME/DATA. Its location can be modified if desired. In such case the environment variable STATELBASEDIR (see next step) should be updated accordingly.

• Update the profile (/etc/profile) of the statel user with the following variables:

export STATELBIN= <installation-directory>/bin export STATELLIB= <installation-directory>/lib export STATELBASEDIR=<full-path-to-data-dir> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$STATELLIB export PATH = $PATH:$STATELBIN

• Change the working directory to $STATELBASEDIR. Type locale and, if needed, rename the file ERRCODE.EN so that its extension is equal to LANG (e.g. ERRCODE.C) expressed in uppercase.

At this point the first check can be performed:

$ vfsdir –V

vfsdir 5.0.0 ($Revision: 1.10 $) Copyright © 1993-2 003 Eurostat

$

The next step is to define the local and the remote SNN and to configure the communication with Eurostat: Type addtuple and enter the appropriate values. The demonstrated test uses the batch-capable ftp client ncftp in order to exchange files with Eurostat.

$ addtuple

Welcome to addtuple version : 1.6 $...

Enter local STATEL Nick Name (SNN) (<=35 chars): st atel-linux

Enter new remote STATEL Nick Name (SNN) (<=35 chars ): eurostat-1

Enter new tuple directory (<=14 chars) [eurostat-1] : eurostat-1

Enter protocol template name (? for list): ?

1 Synchronous connection with Eurostat using ncftp

2 Local PC (local office) through ftp

Enter template number (1 to 2): 1

Using template file ncftp.tem

Process Complete...

$

Edit manually the file $STATELBASEDIR/SNN.ISF and register the unix user as shown in the example:

# Generated by $RCSfile: addtuple.c,v $(Release $Re vision: 1.6 $) on Tue Feb 15 17:33:27 2005

[Statel Nick Names]

localSNN=statel-linux

remoteSNN=eurostat-1,eurostat-1

[System Parameters]

Page 17: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 17 of 25

badPDUDirectory=~/bad

sendTransitDirectory=~/send

receiveTransitDirectory=~/receive

[Registered Users]

User = statel

Verify that the generated file $STATELBASEDIR/eurostat-1/CF is like the following2 and the paths marked in yellow are correctly set (if the installation takes place under <WKDIR> then replace $HOME with <WKDIR>):

# Generated by $RCSfile: addtuple.c,v $(Release $Re vision: 1.6 $) on Tue Feb 15 17:33:51 2005

[Sequence Numbers]

localSequence=0

remoteSequence=0

# Derived from template file ncftp.tem

[Transfer Agents]

receiveTransferAgent=SYNC,$HOME/ncftp/bin/ncftpget. sh,-V,-Z,-DD,-f$STATELBASEDIR/.ncftprc,$STATELBASEDIR/Transit,in/ ???*

transmitTransferAgent=SYNC,$HOME/ncftp/bin/ncftpput ,-V,-F,-f$STATELBASEDIR/.ncftprc,out,@PDU@

incorporationAgent=SYNC,$STATELBIN/incorp,@remoteSN N@

[Tuple Parameters]

receiveTransitDirectory=$STATELBASEDIR/Transit

sendTransitDirectory=~/send

useFileLocking=YES

pduSizeLimit=400000

Check the script-wrapper ncftp/bin/ncftpget.sh and verify that the path (marked in yellow) is correctly set:

#!/bin/sh

# ################################################# ###################

# ncftpget.sh: simple wrapper of 'ncftpget' which f ilters errors

# of type "ncftpget in/???*: server sa id: No files found"

# or "ncftpget in/???*: could not do r emote wildcard

# expansion"

# ################################################# ###################

cmd_out=` $HOME/ncftp/bin/ncftpget $1 $2 $3 $4 $5 $6 $7 2>&1`

2 If the FTP server listens in a port different than the default one, add the parameter –P<port> for both receive and transmit agents. For example “…-V,-Z, -P2100,-DD, f$STATELBASEDIR/.ncftprc... ”.

Page 18: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 18 of 25

status=$?

if [ $status != 0 ]

then

expr "$cmd_out" : ".*No files found.*" >/dev/nu ll

if [ $? = 0 ]

then

exit 0

else

expr "$cmd_out" : ".*remote wildcard expans ion.*" >/dev/null

if [ $? = 0 ]

then

exit 0

else

echo $cmd_out

exit $status

fi

echo $cmd_out

exit $status

fi

fi

# ############################### END ############# ###################

Now it is time to create the file $STATELBASEDIR/.ncftprc which will be used by the ncftp client in order to connect to the Gateway. Run ncftp_config and provide the address of the Gateway: At this point the configuration is finished and the basic tests can take place:

$ vfsdir eurostat-1

$

Most probably at this point you have received the default directory structure STADIUM/EUROSTAT/C2S and STADIUM/EUROSTAT/S2C and the file Welcome.txt . So the result of the command above will be:

$ vfsdir eurostat-1

STADIUM

> ncftp_config

Please provide the remote hostname [statelgw.ec.eur opa.eu]:

Please provide the "rc" filename [.ncftprc]:

File /home/statel/DATA/.ncftprc successfully create d.

>

Page 19: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 19 of 25

Welcome.txt

$

Create some testing directory:

$ vfsmkdir eurostat-1+SOME_TEST_DIR

Eurostat receive the change successfully. Then both ends can start exchanging files of various sizes.

Page 20: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 20 of 25

9 HOW TO CONFIGURE MORE UNIX USERS TO USE STATEL

This can be mandatory if other applications owned by different Unix users must have access to STATEL. If the following conditions are fulfilled a different Unix user (let user_x ) will have access to STATEL:

• user_x has the same primary group with statel user

• user_x is registered in the section [Registered Users] of the file $STATELBASEDIR/SNN.ISF .

• user_x has the variables STATELBIN, STATELLIB and STATELBASEDIR set in his environment. The LD_LIBRARY_PATH of user_x must include $STATELLIB .

• The tuple directories under $STATELBASEDIR and the files they contain have write permissions enabled for the group.

• The STATEL programs (incorp , vfsdir , etc) have execution rights set for the group.

• In the configuration file $STATELBASEDIR/<remote-snn-dir>/ CF and in the script ncptp/bin/ncftpget.sh the $HOME of the statel user must be expressed as absolute path ( e.g. /home/statel) and not as a variable.

Page 21: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 21 of 25

10 CONFIGURATION OF NCFTP IN CASE OF FTP PROXY FIREWALL

Based on the above configuration guidelines, a STATEL installation on Linux uses ncftp in order to send and receive PDUs. In particular, ncftpget is called when STATEL needs to receive PDUs from the remote SNN and ncftpput is called when STATEL needs to send PDUs to the remote SNN. In this paragraph a detailed description is provided of ncftp ’s behavior when the Linux STATEL client is behind an FTP proxy firewall. The firewall types supported by ncftp are examined , the proper configuration of ncftp in order to connect to an FTP proxy is shown and a detailed list of the connections that were successful and those that were not is provided. The FTP proxy client that was used was FreeProxy which is a freeware available at www.handcraftedsoftware.org. FreeProxy and offers 7 authentication types, which are: SITE hostname USER after logon PROXY open USER RemoteId@RemoteHost USER FireId@RemoteHost USER RemoteId@RemoteHost FireId USER RemoteId@FireId@RemoteHost Ncftp firewall support setup The installation that was built for this testing consists of four parts. The first part is the host of the statel-linux snn (the Linux installation), the second is the firewall host which accepts all incoming and outgoing ftp requests of statel-linux , the third is the STATEL gateway and in the other part is the host of the remote-snn . Statel-linux and remote-snn communicate via ftp at port 21 with the STATEL gateway in order to send or receive PDUs. The firewall which intervenes between statel-linux and the gateway listens for incoming and outgoing ftp requests at port 21. In order to setup ncftp to communicate via firewall, the file $HOME/.ncftp/firewall needs to be edited. This file is created the first time the user types <WKDIR>/ncftp/bin/ncftp on the command prompt and initiates an ftp session. The contents of the file are:

# NcFTP firewall preferences

# ==========================

#

# If you need to use a proxy for FTP, you can confi gure it below.

# If you do not need one, leave the ``firewall-type '' variable set

# to 0. Any line that does not begin with the ``#' ' character is

# considered a configuration command line.

#

# NOTE: NcFTP does NOT support HTTP proxies that d o FTP, such as "squid"

# or Netscape Proxy Server. Why? Because y ou have to communicate with

# them using HTTP, and this is a FTP only pr ogram.

#

# Types of firewalls:

# ------------------

#

# type 1: Connect to firewall host, but send "U SER [email protected]"

Page 22: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 22 of 25

#

# type 2: Connect to firewall, login with "USER fwuser" and

# "PASS fwpassword", and then "USER use [email protected]"

#

# type 3: Connect to and login to firewall, and then use

# "SITE real.host.name", followed by th e regular USER and PASS.

#

# type 4: Connect to and login to firewall, and then use

# "OPEN real.host.name", followed by th e regular USER and PASS.

#

# type 5: Connect to firewall host, but send

# "USER user@[email protected]" and

# "PASS pass@fwpass" to login.

#

# type 6: Connect to firewall host, but send

# "USER [email protected]" and

# "PASS fwpass" followed by a regular

# "USER user" and

# "PASS pass" to complete the login.

#

# type 7: Connect to firewall host, but send

# "USER [email protected] fwuser" and

# "PASS pass" followed by

# "ACCT fwpass" to complete the login.

#

# type 8: Connect to firewall host, but send "U SER [email protected]:port"

#

# type 9: Connect to firewall host, but send "U SER [email protected] port"

#

# type 0: Do NOT use a firewall (most users wil l choose this).

#

firewall-type=2

#

#

#

# The ``firewall-host'' variable should be the IP a ddress or hostname of

# your firewall server machine.

#

firewall-host=<Firewall-Host-Address>

Page 23: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 23 of 25

#

#

#

# The ``firewall-user'' variable tells NcFTP what t o use as the user ID

# when it logs in to the firewall before connecting to the outside world.

#

firewall-user=<FireId>

#

#

#

# The ``firewall-password'' variable is the passwor d associated with

# the firewall-user ID. If you set this here, be s ure to change the

# permissions on this file so that no one (except t he superuser) can

# see your password. You may also leave this comme nted out, and then

# NcFTP will prompt you each time for the password.

#

firewall-password=<FirePwd>

#

#

#

# Your firewall may require you to connect to a non -standard port for

# outside FTP services, instead of the internet sta ndard port number (21).

#

firewall-port=21

#

#

#

# You probably do not want to FTP to the firewall f or hosts on your own

# domain. You can set ``firewall-exception-list'' to a list of domains

# or hosts where the firewall should not be used. For example, if your

# domain was ``probe.net'' you could set this to `` .probe.net''.

#

# If you leave this commented out, the default beha vior is to attempt to

# lookup the current domain, and exclude hosts for it. Otherwise, set it

# to a list of comma-delimited domains or hostnames . The special token

# ``localdomain'' is used for unqualified hostnames , so if you want hosts

# without explicit domain names to avoid the firewa ll, be sure to include

# that in your list.

#

Page 24: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 24 of 25

firewall-exception-list=,

#

#

#

# You may also specify passive mode here. Normally this is set in the

# regular $HOME/.ncftp/prefs file. This must be se t to one of

# "on", "off", or "optional", which mean always use PASV,

# always use PORT, and try PASV then PORT, respecti vely.

#

#passive=on

#

#

#

# NOTE: This file was created for you on Tue Aug 1 0 13:30:21 2010

# by NcFTP 3.2.4. Removing this file will c ause the next run of NcFTP

# to generate a new one, possibly with more configurable options.

#

# ALSO: A /usr/local/etc/ncftp.firewall file, if p resent, is processed before this file,

# and a /usr/local/etc/ncftp.firewall.fixed file, if pres ent, is processed after.

Follow the indications in the commented lines (starting with “#”) in order to setup ncftp according to your firewall setup. Communication between ncftp and FreeProxy results All different firewall type numbers in the firewall-type configuration variable have been tested (in file $HOME/.ncftp/firewall) and their connection success or failure with the relevant authentication types in FreeProxy was noted down. The results are: Type 1 (Connect to firewall host, but send "USER [email protected] ") connects to the firewall when it has been setup at USER RemoteId@RemoteHost . Type 2 (Connect to firewall, login with "USER fwuser " and "PASS fwpassword ", and then "USER [email protected] ") connects to the firewall when it has been setup at USER after logon. Type 3 (Connect to and login to firewall, and then use "SITE real.host.name ", followed by the regular USER and PASS) connects to the firewall when it has been setup at SITE hostname. Type 4 (Connect to and login to firewall, and then use "OPEN real.host.name ", followed by the regular USER and PASS) does not connect to any of the firewall’s authentication setups. Type 5 (Connect to firewall host, but send "USER user@[email protected] " and "PASS pass@fwpass " to login) connects to the firewall when it has been setup at USER RemoteId@FireId@RemoteHost. Type 6 (Connect to firewall host, but send "USER [email protected] " and "PASS fwpass " followed by a regular "USER user " and "PASS pass " to complete the login) connects to the firewall when it has been setup at USER FireId@RemoteHost. Type 7 (Connect to firewall host, but send "USER [email protected] fwuser " and "PASS pass " followed by "ACCT fwpass " to complete the login) connects to the firewall when it has been setup at USER RemoteId@RemoteHost FireId.

Page 25: STATEL - Linux 32-bit - Installation Guide · 2014-07-04 · EDAMIS REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02 STATEL - Linux distribution-Installation

EDAMIS

REF:STATEL - Linux distribution-Installation Guide Installation Guide Version: 0.02

STATEL - Linux distribution-Installation Guide-v0.02.doc Page 25 of 25

Type 8 (Connect to firewall host, but send "USER [email protected]:port ") connects to the firewall when it has been setup at USER RemoteId@RemoteHost. Type 9 (Connect to firewall host, but send "USER [email protected] port ") does not connect to any of the firewall’s authentication setups. It should be noted that in case communication to the gateway is not waged via the default port (21), then from the above firewall types only Type 8 manages to establish a connection to the firewall when it has been setup at USER RemoteId@RemoteHost .