The next few points only apply to CentOS 7.8. For more modern distros (such as Rocky) jump to their own sections below (find  comments in red color)


IMPORTANT NOTE: This procedure can not be used on systems with Raidix storage software installed, as they require uncompatible Python dependencies. If your system has Raidix storage installed please contact SGO support and do not attempt this procedure, forcing it will break your Raidix storage software with no fix available. 


For more modern distros (such as Rocky) jump to their own sections below (find  comments in red color)


CentOS 7.8


The newest Python 3 version available in the CentOS package manager is Python3.6.8, but Workflows needs at least Python 3.11.1 to be fully functional, so we will neeed to install the package from the source code.


As CentOS 7 is being deprecated, its repositories' mirrors have also been recently removed. In order to avoid errors while using yum install, it is recommended to remove some repo files, and mandatory to modify the /etc/yum.repos.d/CentOS-Base.repo file to change the default url of the repository where packages can be found.


So we can move the deprecated repo files to another location, for example ~/OldRepoFiles/, by typing:


mv /etc/yum.repos.d/CentOS-CR.repo ~/OldRepoFiles/

mv /etc/yum.repos.d/CentOS-Sources.repo ~/OldRepoFiles/

mv /etc/yum.repos.d/CentOS-fasttrack.repo ~/OldRepoFiles/

mv /etc/yum.repos.d/CentOS-x86_64-kernel.repo ~/OldRepoFiles/


Then, we must modify the /etc/yum.repos.d/CentOS-Base.repo file by commenting the mirrorlist url, and adding an alternative baseurl. These alternatives urls can be found at https://vault.centos.org/

So the new baseurl in the CentOS-Base.repo file must be:


baseurl=https://linuxsoft.cern.ch/centos-vault/centos/$releasever/os/$basearch/


And the new CentOS-Base.repo file should look something like the following. 

It can also be found attached at the end of this document, note that here all commented lines have been removed for clarity purposes:


[base]

name=CentOS-$releasever - Base

baseurl=https://linuxsoft.cern.ch/centos-vault/centos/$releasever/os/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7


[updates]

name=CentOS-$releasever - Updates

baseurl=https://linuxsoft.cern.ch/centos-vault/centos/$releasever/os/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7


[extras]

name=CentOS-$releasever - Extras

baseurl=https://linuxsoft.cern.ch/centos-vault/centos/$releasever/os/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7


[centosplus]

name=CentOS-$releasever - Plus

baseurl=https://linuxsoft.cern.ch/centos-vault/centos/$releasever/os/$basearch/

gpgcheck=1

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7



Once modified the repo file, we have to clear the 'yum' cache and update the repository list:


sudo yum clean all

sudo yum makecache


Now we are ready to install the required libraries to compile openssl and python3.11:


sudo yum install epel-release

sudo yum install libffi-devel


--> EDIT 20240723: these other required libraries may be already installed and up-to-date, so there should be no need to re-install them. Nevertheless, it makes no harm to re-install them neither:

sudo yum install wget make cmake gcc bzip2-devel zlib-devel libcurl-devel python-devel openldap-devel 


Next we manually mark the group "Development Tools" as installed:


sudo yum groups mark install "Development Tools"


We can check it with:


yum group list


And also see the packages included in the "Development Tools" group with:


yum group info "Development Tools"


The easiest way for the rest of the installation is to use the python Installation script attached at the end of this document (only for CentOS 7.8). The rest of this document explains what the script does in case you want to do it manually for more control (or in the case that Mistika Workflows shows any red messages in the Script Editor panel, you can follow the steps below manually in order to determine if any of them has failed)


The script needs to be executed as regular user, and afterwards run the MistikaWorkflows installer, also as regular user (NOT root).



NOTE FOR INSTALLATION ON NEWER DISTROS (such as Rocky)

All previous steps may be omitted as newer distros already have these libraries pre-installed.

Instead it may be necessary to have perl installed before the next step, as it is required to compile openssl from sources.

This can be done by typing:


sudo yum install perl



The next steps are both for CentOS 7.8 and Rocky 9.3


Building Python3.11 requires openssl 1.1.1 or newer. The version provided in CentOS repositories is old, so we have to install it also from the source code.


We must download and extract the package, then navigate into the extracted folder:


wget https://www.openssl.org/source/openssl-1.1.1t.tar.gz 

If we find trouble with the certificate validation we can skip it by adding:

wget https://www.openssl.org/source/openssl-1.1.1t.tar.gz  --no-check-certificate

tar xvf openssl-1.1.1t.tar.gz

cd openssl-1.1.1t


Before compiling we must configure the paths for openssl 1.1.1, such as:


./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl


Then we make the build:


make

sudo make install


Afterwards we download and extract the source package for python3.11.1:


wget https://www.python.org/ftp/python/3.11.1/Python-3.11.1.tgz

tar xvf Python-3.11.1.tgz


Navigate into the extracted folder and configure the build (each line corresponds to individual commands to be executed):


cd Python-3.11.1 

./configure CFLAGS=-fPIC CXXFLAGS=-fPIC

LDFLAGS="${LDFLAGS} -Wl,-rpath=/usr/local/openssl/lib" ./configure --with-openssl=/usr/local/openssl

make

sudo make install


Now we can check that Python3.11 has been installed, and that it loads properly the OpenSSL library version:


python3.11

>> import ssl

>> ssl.OPENSSL_VERSION


Finally, before Workflows installation, we must declare the environment variable adding to /home/mistika/.bashrc the lines:


export MISTIKA_PYTHON="/usr/local/"

export MISTIKA_PYTHON_BIN_DIR="/usr/local/bin"


At this point we can continue with the installation of Mistika Workflows, just download the installer, make it executable, and run it (as normal user! NOT root)