Install on Linux

Install on Linux

Start installing OMFLOW Server

OMFLOW Server pre-installation environment preparation,

This document is based on Ubuntu 20.04 and CentOS 8,

Python version 3.8.x is used as an example.

For other operating systems, please refer to the following preparation steps to complete the preparation.

The first step is to prepare the Python3 environment and OMFLOW package

Ubuntu essential package installation example

apt-get update -y
apt-get install -y python3.8-dev apache2-dev python3-venv python3.8-venv

CentOS Python and necessary package installation examples

dnf -y install python38 gcc httpd-devel python38-devel redhat-rpm-config

The second step is to install the web server Apache Server

Ubuntu installation Apache example

apt-get install apache2

CentOS installation Apache example

dnf install httpd

The third step is to establish the Python execution environment of OMFLOW

mkdir /opt/omflow
python3 -m venv /opt/omflow/python

The fourth step is to install the necessary Python packages.

Enter the virtual environment and install the required packages

source /opt/omflow/python/bin/activate
pip install wheel
python /usr/lib/python3.8/test/libregrtest/setup.py bdist_wheel
pip install django==2.2 ldap3 mod_wsgi

If the Python version is not 3.8, please change 3.8 in the command to the version to use.

The fifth step is to unzip the omflow folder

Unzip /tmp/omflow.tar.gz

cd /opt/omflow
tar zxvf /tmp/omflow.tar.gz

Rename the folder to server

mv /opt/omflow/omflow /opt/omflow/server

The sixth step, database preparation

The default database is currently SQLite. If you want to choose another database, please refer to the website.

Django database config

Linux installation library package comparison table:

####UBUNTU

MySQL

apt update -y && apt upgrade -y apt -y install software-properties-common add-apt-repository 'deb http://archive.ubuntu.com/ubuntu bionic main' apt update -y apt install -y python-mysqldb apt install -y libmysqlclient -dev

CentOS

SQLite

dnf install -y sqlite

If you want to choose another database, please create the database in advance to give corresponding permissions. The following libraries require the installation of additional packages (installed using pip)

Before installing the database package, please enter the virtual environment source /opt/omflow/python/bin/activate

Necessary package comparison table:

PostgreSQLOracleSQL ServerMySQL

psycopg2-binary

cx_Oracle

django-mssql

pymysql

django-pytds

mysqlclient

django-sqlserver

django-pyodbc

Change the /opt/omflow/server/omflow/settings.py file The following is an example of settings.py modification

SQLite

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.sqlite3",
        "NAME": os.path.join(BASE_DIR, "db.omflow"),
        "OPTIONS": {
            "timeout": 300,
        }
    }
}

PostgreSQL

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.postgresql",
        "NAME": "<database name>",
        "USER": "<username>",
        "PASSWORD": "<password>",
        "HOST": "<database IP>",
        "PORT": "<database PORT>",
        "OPTSIONS": {
            "connect_timeout": 300
        }
    }
}

MySQL

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.mysql",
        "NAME": "<database name>",
        "USER": "<username>",
        "PASSWORD": "<password>",
        "HOST": "<database IP>",
        "PORT": "<database PORT>",
        "OPTSIONS": {
            "connect_timeout": 300
        }
    }
}

Oracle

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.oracle",
        "NAME": "<database name>",
        "USER": "<username>",
        "PASSWORD": "<password>",
        "HOST": "<database IP>",
        "PORT": "<database PORT>"
    }
}

SQL Server

DATABASES = {
    "default": {
        "ENGINE": "sql_server.pyodbc",
        "NAME": "<database name>",
        "USER": "<username>",
        "PASSWORD": "<password>",
        "HOST": "<database IP>",
        "PORT": "<database PORT>",
        "OPTIONS": {
            "driver": "",
            "MARS_Connection": True,
        }
    }
}

The seventh step is to execute the omflow_config.sh file

Enter the /opt/omflow/server folder

cd /opt/omflow/server
./omflow_config.sh

If the Python version is not 3.8, please modify 3.8 to the version used in /etc/apache2/sites-available/django.conf

Step 8, select the type as server

omflow type: server

Execution example

django.conf configuration file

The executable file has helped you copy django.conf (apache configuration file) to the apache folder You can use the command to view

Ubuntu view

vi /etc/apache2/sites-available/django.conf

CentOS View

vi /etc/httpd/conf.d/django.conf

Ubuntu enables django.conf configuration file

sudo a2ensite django.conf

Ubuntu disable apache default file

sudo a2dissite 000-default.conf

Step 9, omflow_server service

Start the omflow_server service

/opt/omflow/server/omflow_server start

Disable omflow_server service

/opt/omflow/server/omflow_server stop

Confirm omflow_server service status

/opt/omflow/server/omflow_server status

Step 10, start using OMFLOW

Start installing OMFLOW Collector

The first step is to prepare the Python3 environment

Ubuntu installation example

apt-get install python3

CentOS installation example

yum install python3

The second step is to establish the Python execution environment of OMFLOW

mkdir /opt/omflow
python3 -m venv /opt/omflow/python

If the virtual environment cannot be established, install the package apt-get install python3-venv

The third step is to install the necessary OMFLOW packages.

Enter the virtual environment and install the required packages

source /opt/omflow/python/bin/activate
pip install django==2.2

Other non-essential kits vary depending on the actual use of the Collector. You can go to the [Data Collection>Collector Kit] chapter for instructions.

The fourth step is to unzip the omflow folder

Unzip /tmp/omflow.tar.gz

cd /opt/omflow
tar zxvf /tmp/omflow.tar.gz

Rename the folder to collector

mv /opt/omflow/omflow /opt/omflow/collector

The fifth step is to execute the omflow_config.sh file

Enter the /opt/omflow/collector folder

cd /opt/omflow/collector
./omflow_config.sh

Step six, select collector as the type

omflow type: collector

Step 7: Enter required information

This step will change /opt/omflow/collector/omflow/settings.py

  • Collector IP: local IP

  • Collector port: 5168

  • Server IP: OMFLOWserver IP

  • Server port: OMFLOWserver port

  • Server protocol: OMFLOW server protocol

Step 8, omflow_collecter service

Start the omflow_collector service

/opt/omflow/collector/omflow_collector start

Stop the omflow_collector service

/opt/omflow/collector/omflow_collector stop

Confirm omflow_collector service status

/opt/omflow/collector/omflow_collector status

Start installing OMFLOW Patch

The first step is to decompress the Patch file.

tar xvf omflow_patch_1_x_x_x.tar.gz

The second step is to execute patch.sh

cd omflow_patch_1_x_x_x/
./patch.sh

Last updated