3.1 Pre-requisites

These are the dependencies for OpenMFT to be installed.

3.1.1 OS -> Linux (Prefer Redhat or CentOS 7.x)

OpenMFT has been tested on Redhat and CentOS, but it should work in any Linux operating system.

If anybody is interested to have OpenMFT in Windows, we can build a windows version. Please do reach out to us at support@openmft.org.

3.1.2 Python 3.x (Prefer Anaconda Python)

You can download and install anaconda either from the link below or by copying and pasting the wget command in your Linux environment: https://www.anaconda.com/products/individual

Use regular service account to install Anaconda Python. Don't use root.

wget https://repo.anaconda.com/archive/Anaconda3-2020.07-Linux-x86_64.sh

Add python to PATH in ~/.bash_profile as shown below and activate the updated profile:

# If the base path for example is /apps where anaconda is installed, 
export PATH=/apps/anaconda3/bin:$PATH
source ~/.bash_profile

Once Anaconda Python is installed and enabled in the shell, type the below command to install PostgreSQL related library:

pip install psycopg2-binary
# In order to run the demos, you need pysftp, so install pysftp libary as well
pip install pysftp

3.1.3 PostgreSQL

This URL should help you to get PostgreSQL server installed on Redhat: https://www.postgresql.org/download/linux/redhat/.

For your convenience, the commands to install PostgreSQL are pasted below and should help one to install PostgreSQL and start it up. One needs to be logged in as root to install PostgreSQL.

PostgreSQL is the only dependency that requires root access to setup OpenMFT.

sudo su -
yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum install -y postgresql12-server
/usr/pgsql-12/bin/postgresql-12-setup initdb
systemctl enable postgresql-12
systemctl start postgresql-12

The below commands should help you to create a database, user, grant database access to the user. The below commands are just examples, you can name your database anything you like and give any password you prefer (Only copy commands after the $ and # symbols, prefixes shown below are part of CLI):

sudo su - postgres

psql
create user openmftuser password 'OpenMFT2020';
create database openmft;
grant all on database openmft to openmftuser;
\q

Give permissions for the user to the public schema created inside the database:

psql openmft
grant all privileges on all tables in schema public to openmftuser;
\q

Update postgres settings to trust 127.0.0.1 and your listen address if accessing remotely, by editing pg_hba.conf file:

cd /var/lib/pgsql/12/data

Update pg_hba.conf in the "local all all peer" section with the below lines.(Change the value from ident to trust and also add entry for localhost)

# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
host    all             all             localhost               trust

Update postgresql.conf with listen_addresses = "*" if postgres needs to be accessed remotely:

listen_addresses = '*'

Exit from postgres account with "exit" or Ctrl+d:

exit

Restart PostgreSQL:

sudo su -
systemctl restart postgresql-12

Exit from root account with "exit" or Ctrl+d:

exit

Last updated