Skip to content

Third Party Packages

Thomas King edited this page Jul 12, 2019 · 15 revisions

There are two categories of packages those required to install PAASS and those that extend functionality.

Required Packages

Some standard packages that are not installed by default but that are required include the following:

These can be installed with any of the package managers (apt-get, yum, dnf, ...). We have used yum in the examples below as it is the default manager in CentOS 7. You can install all of the required packages at once with the following command:

yum install gcc gcc-c++ kernel-devel git cmake ncurses-devel

If you opted for the mass install above skip ahead to the section about highly recommended packages.

GNU Compiler Collection (gcc)

This package provides the standard C compiler.

yum install gcc

GNU Compiler Collection (gcc-c++)

This package provides the standard C++ compiler.

yum install gcc-c++

Kernel Development Package (kernel-devel)

This package allows the PLX SDK to build the driver matching the kernel installed on the computer.

yum install kernel-devel

NOTE This package is called linux-headers-general on Debian systems such as Ubuntu.

git Version Control (git)

The version control tool git is used to manage development of PAASS. Those users updating their PAASS distribution or those who modifying or extending functionality will want to use git. The following command will install the package:

yum install git

A couple configurations are suggested following git installation. By using the --global flag we set these configuration options computer wide. To change these options on a repository basis simply change to those directories and repeat the command without the `--global`` flag.

First, enabling the color UI clarifies the messages and increases productivity.

git config --global color.ui true

Secondly, if you would like to commit your changes to a repository for others to use you need to set the author information.

git config --global user.name "Your Name"
git config --global user.email "YourName@email.com"

CMake3 (cmake)

This package is a cross-platform software managing the a compiler independent build environment. It is used to build the paass software. (cmake3 is needed for the dev branch and newer)

yum install cmake3

New Curses (ncurses-devel)

This package provides the underlying support for the terminal-like UI used in PAASS.

yum install ncurses-devel

NOTE This package is called libncurses-dev on Debian systems such as Ubuntu.

Cern ROOT (root)

This package provides many physics libraries that are useful for data analysis. Although this package is not explicitly required it is highly recommended as many of the useful utilities and analysis packages are built around it. At the time of writing, and package root-6.06.06-4.el7, the root package has been found to be unreliable and we do not recommend using it. In addition, the precompiled binaries for CentOS 7 gcc v4.8 also appeared to have some issues.

ROOT Project Provided Package

Source Distribution

The preferred installation procedure requires downloading the ROOT source code and constructing manually. Visit the ROOT download page and pick the production version and download the source distribution.

We suggest installing the source code and the build directories in /root/programs/root. We must be the root user to perform the following steps.

su
mkdir /root/programs/root
cd /root/programs/root

Then export an environment variable with the current ROOT version number, in this example the version is 6.06.06. We can then extract the compressed tar ball.

export ROOT_VERSION=6.06.06
tar xzf root_v${ROOT_VERSION}.source.tar.gz

For the case of ROOT 5 source code the folder is called root, we suggest you move it to root-${VERSION}. This step can be ignored for ROOT 6.

mv root root-${ROOT_VERSION}

We then need to download the required prerequisites. As of this writing the following packages were required on a CentOS 7 machine to build ROOT v6.06.06.

yum install libX11-devel libXpm-devel libXft-devel libXext-devel

We then can configure and compile the binaries with the following commands.

cd root-${ROOT_VERSION}
mkdir install-build
cd install-build
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/root/root-${ROOT_VERSION}
make install

You have successfully installed the ROOT package, you can now quit the super user session. See Sourcing ROOT for the next steps.

Precompiled Binaries

The ROOT package provides precompiled binaries. Choose the binary that matches your OS and gcc version. To determine the gcc version use the following command.

gcc --version

We suggest installing the binaries in /opt/root/. We must be the root user to perform the following steps.

su
mkdir /opt/root
cd /opt/root

Then export an environment variable with the current ROOT version number, in this example the version is 6.06.06. We can then extract the compressed tar ball.

export ROOT_VERSION=6.06.06
tar xzf root_v${ROOT_VERSION}...tar.gz
mv root root-${ROOT_VERSION}

You have successfully installed the ROOT package, you can now quit the super user session. See Sourcing ROOT for the next steps.

Sourcing ROOT

If making use of environment modules the following instructions will produce and install a module. If you simply want to use the ROOT configuration script thisroot.sh see below.

su
mkdir ${MODULESHOME}/modulefiles/root
cd ${MODULESHOME}/modulefiles/root

Using any text editor create a file called root-module with the following content. Where VERSION will be changed to the version of ROOT this module is designed for, see below.

#%Module1.0
##
## modules root/VERSION
##
## modulefiles/root/VERSION
##
proc ModulesHelp {} {
   global version modroot

   puts stderr "root/VERSION - set the environment for ROOT VERSION"
}
module-whatis "Sets up the environment for ROOT VERSION"

set topdir  /opt/root/root_vVERSION
set version VERSION

setenv ROOTSYS $topdir
prepend-path PATH       $topdir/bin
prepend-path LD_LIBRARY_PATH  $topdir/lib
prepend-path MANPATH       $topdir/man

We can then use the following commands to swap VERSION for the current version number and then rename the module to the current version number. This can also be replaced by hand.

sed -i -e 's/VERSION/${ROOT_VERSION}/g' root-module
mv root-module ${ROOT_VERSION}

We suggest creating and using an environment module, but the ROOT environment can be set up by sourcing the root configuration file thisroot.sh.

source /opt/root/root-${ROOT_VERSION}/bin/thisroot.sh

Package Manager

One observed issue is that the root package root-config utility lists the physics and multiproc libraries as required, but some of these libraries are not provided. The additional root-physics and root-multiproc packages must be installed. In addition, there have been observation of incorrect setting of the environment. Note The following may install root from the package manager, but is not recommended.

yum install root root-physics root-multiproc

Highly Recommended Packages

These are packages that are not explicitly necessary to build and run PAASS, but provided a significant reduction in difficulty or provide enhanced features.

As for the required packages, these recommended packages can be installed with any of the package managers (apt-get, yum, dnf, ...). We have used yum in the examples below as it is the default manager in CentOS 7. You can install most of the recommended packages (except for ROOT) at once with the following command.

yum install git ccmake environment-modules

Note ROOT requires a separate installation as at the time the current packages are unreliable (root-6.06.06-4.el7). If you opted for the mass install or decided to skip these recommended packages move ahead to the section about package configuration.

CMake curses interface (ccmake)

The CMake curses interface is a GUI which simplifies the use of cmake by indicating chosen options and giving descriptions.

yum install ccmake

Environment Modules (environment-modules)

This package provides a modular way to load various packages into and out of the current working environment. This is not a necessary package, but it does provide a simple way to load paass into the environment and switch with other development versions.

yum install environment-modules

Postfix

The acquisition side of PAASS (poll2) has the ability to send emails if it enters an error state. This is currently being revived from the original poll, and is still under redevelopment. This functionality needs an MTA (Mail Transfer Agent), and we are currently working with postfix.

yum install postfix

Package Configuration

In addition, some of the packages installed by default are not necessarily configured as one would like for a DAQ computer.

ssh Server (sshd)

The sshd is installed by default, but is inactive. The respective commands to start the sshd and enable on boot are below.

systemctl enable sshd
systemctl start sshd

Postfix

How you configure postfix depends on how you want to route your emails. Since we plan on utilizing gmail. I will include that as an example, but google is your friend if you want/need a different configuration. These settings were collected from a HowToForge page.

You should add the following to the main.cf file in /etc/postfix. Anywhere seems to be ok.

relayhost = [smtp.gmail.com]:587    #address and port of the outgoing mail server
smtp_sasl_auth_enable = yes         #enable internet smtp (vs "same network") 
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd  #Location of authentication information (username password etc)  
smtp_sasl_security_options = noanonymous   #disable anonymous login
smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.crt  #tls certificate location
smtp_tls_security_level = encrypt              #tls encryption (required by gmail)
smtp_use_tls = yes                             #use tls (required by gmail)

The password map file should be of the form relayhost USER@domain.com:PASSWORD. You should then compile and hash the password map with

postmap <Path/to>/sasl_passwd

You can now remove the uncompiled version, and then restart postfix with

systemctl restart postfix.service

Clone this wiki locally