04-02-2020, 01:32 AM
Hey Guys!
I have struggled around with the installation documentation of Tactic-4.7 for a while now and I thought maybe I should share my version of it.
Requirements: - Minimal Installation of CentOS 7 + Internet (Network connection)
For simplicity, issue the following commands as root user (otherwise don‘t forget to put sudo in front of each command)
First of all, update the system:
>yum update -y
Enabling SELinux
Open the file /etc/selinux/config and change the option SELINUX to enforcing
>yum install -y nano
>nano /etc/selinux/config # CTRL+O to save ; CTRL+X to exit
>reboot
Enabling firewalld
Check status with >systemctl status firewalld
>systemctl start firewalld
>systemctl enable firewalld
Install Apache
>yum install -y httpd
>firewall-cmd --add-service=http --permanent
>firewall-cmd --add-service=https --permanent # optional
>firewall-cmd --reload
>/usr/sbin/setsebool -P httpd_can_network_connect 1
>systemctl start httpd
>systemctl enable httpd
Download and extract Tactic-Install archive
>yum install -y unzip wget
>cd /tmp
>wget http://community.southpawtech.com/downlo....0.b02.zip
>unzip TACTIC-4.7.0.b02.zip
EPEL
Enable Extra Packages for Enterprise Linux (EPEL).
>yum -y --enablerepo=extras install epel-release
Install PostgreSQL
>rpm -Uvh https://download.postgresql.org/pub/repo...noarch.rpm
>yum update -y
>yum install -y postgresql11-server postgresql11-contrib postgresql11-devel
>/usr/pgsql-11/bin/postgresql-11-setup initdb
>systemctl start postgresql-11
>systemctl enable postgresql-11
Configure and verify PostgreSQL
>systemctl stop postgresql-11
>mv /var/lib/pgsql/11/data/pg_hba.conf /var/lib/pgsql/11/data/pg_hba.conf.BACKUP
>cp /tmp/TACTIC-4.7/src/install/postgresql/pg_hba.conf /var/lib/pgsql/11/data/
>chown postgres:postgres /var/lib/pgsql/11/data/pg_hba.conf
>systemctl start postgresql-11
To verify, issue followinf command:
>psql -U postgres template1
It should give you a prompt: > [b]template1=#
[/b]Exit out by pressing [b]CTRL+D[/b]
Install Python 3.6 and supporting modules
>yum install -y python3
>yum install -y python36-pycryptodomex python36-lxml python36-requests
>yum install -y python36-pillow python36-dateutil python36-pytz
>yum install -y python3-psycopg2
>chmod 755 /etc/init.d/tactic
>systemctl enable tactic
>systemctl start tactic
Create user „tactic“ and configure permissions
>adduser tactic
>chown tactic:tactic -R /opt/tactic
>chmod 755 -R /opt/tactic
Finally, reboot the server and test whether the TACTIC service continues to perform across reboots.
>reboot
I have struggled around with the installation documentation of Tactic-4.7 for a while now and I thought maybe I should share my version of it.
Requirements: - Minimal Installation of CentOS 7 + Internet (Network connection)
For simplicity, issue the following commands as root user (otherwise don‘t forget to put sudo in front of each command)
First of all, update the system:
>yum update -y
Enabling SELinux
Open the file /etc/selinux/config and change the option SELINUX to enforcing
>yum install -y nano
>nano /etc/selinux/config # CTRL+O to save ; CTRL+X to exit
>reboot
Enabling firewalld
Check status with >systemctl status firewalld
>systemctl start firewalld
>systemctl enable firewalld
Install Apache
>yum install -y httpd
>firewall-cmd --add-service=http --permanent
>firewall-cmd --add-service=https --permanent # optional
>firewall-cmd --reload
>/usr/sbin/setsebool -P httpd_can_network_connect 1
>systemctl start httpd
>systemctl enable httpd
Download and extract Tactic-Install archive
>yum install -y unzip wget
>cd /tmp
>wget http://community.southpawtech.com/downlo....0.b02.zip
>unzip TACTIC-4.7.0.b02.zip
EPEL
Enable Extra Packages for Enterprise Linux (EPEL).
>yum -y --enablerepo=extras install epel-release
Install PostgreSQL
>rpm -Uvh https://download.postgresql.org/pub/repo...noarch.rpm
>yum update -y
>yum install -y postgresql11-server postgresql11-contrib postgresql11-devel
>/usr/pgsql-11/bin/postgresql-11-setup initdb
>systemctl start postgresql-11
>systemctl enable postgresql-11
Configure and verify PostgreSQL
>systemctl stop postgresql-11
>mv /var/lib/pgsql/11/data/pg_hba.conf /var/lib/pgsql/11/data/pg_hba.conf.BACKUP
>cp /tmp/TACTIC-4.7/src/install/postgresql/pg_hba.conf /var/lib/pgsql/11/data/
>chown postgres:postgres /var/lib/pgsql/11/data/pg_hba.conf
>systemctl start postgresql-11
To verify, issue followinf command:
>psql -U postgres template1
It should give you a prompt: > [b]template1=#
[/b]Exit out by pressing [b]CTRL+D[/b]
Install Python 3.6 and supporting modules
>yum install -y python3
>yum install -y python36-pycryptodomex python36-lxml python36-requests
>yum install -y python36-pillow python36-dateutil python36-pytz
>yum install -y python3-psycopg2
Alternatively you can also install these modules using pip like this.
>pip3 install pycryptodomex
Install ImageMagick
>yum install -y ImageMagick ImageMagick-devel ImageMagick-perl
Install ffmpeg
>rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
>rpm -Uvh http://li.nux.ro/download/nux/dextop/el7...noarch.rpm
>yum install -y ffmpeg
Install pyodbc
>yum install -y unixODBC unixODBC-devel
>yum install -y gcc-c++
>yum install -y python3-devel
>yum install -y pyodbc
>pip3 install --upgrade pip
>pip3 install pyodbc
Installing Tactic 4.7.0.b02
>cd /
>python3 /tmp/TACTIC-4.7/src/install/install.py
>pip3 install pycryptodomex
Install ImageMagick
>yum install -y ImageMagick ImageMagick-devel ImageMagick-perl
Install ffmpeg
>rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
>rpm -Uvh http://li.nux.ro/download/nux/dextop/el7...noarch.rpm
>yum install -y ffmpeg
Install pyodbc
>yum install -y unixODBC unixODBC-devel
>yum install -y gcc-c++
>yum install -y python3-devel
>yum install -y pyodbc
>pip3 install --upgrade pip
>pip3 install pyodbc
Installing Tactic 4.7.0.b02
>cd /
>python3 /tmp/TACTIC-4.7/src/install/install.py
The installer will ask you a number of questions. You should be prompted by the following:
>Please enter the base path of the TACTIC installation:
>(/home/apache) -> /opt/tactic
>Please enter the base path of the TACTIC installation:
>(/home/apache) -> /opt/tactic
Choose your custom Tactic path, this will be the base directory for your Tactic installation. We have chosen /opt/tactic.
Next you will be asked to identify the user used to run the Apache service.
>Please enter the user Apache Web Server is run under:
>(apache) -> apache
While installation, you will be asked if you want to run fix_search_code.py, press y followed by ENTER
Configuring Apache
Lastly Tactic requires us to install the custom Apache configuration file it has created during the installation process /opt/tactic/tactic_data/config/tactic.conf
With an editor make sure the following lines exist:
Next you will be asked to identify the user used to run the Apache service.
>Please enter the user Apache Web Server is run under:
>(apache) -> apache
While installation, you will be asked if you want to run fix_search_code.py, press y followed by ENTER
Configuring Apache
Lastly Tactic requires us to install the custom Apache configuration file it has created during the installation process /opt/tactic/tactic_data/config/tactic.conf
With an editor make sure the following lines exist:
# Using the ProxyPass directives
ProxyPreserveHost on
<Proxy balancer://tactic>
BalancerMember http://localhost:8081/tactic
BalancerMember http://localhost:8082/tactic
BalancerMember http://localhost:8083/tactic
</Proxy>
ProxyPass /tactic balancer://tactic
ProxyPass /tactic_data balancer://tactic
As root issue the following commands:
>cp /opt/tactic/tactic_data/config/tactic.conf /etc/httpd/conf.d
>systemctl restart httpd
Starting Tactic in Development Mode
>su -s /bin/bash apache
>python3 /opt/tactic/tactic/src/bin/startup_dev.py
You should now be able to navigate a web browser to http://localhost Alternatively, use the non-local IP address or fully qualified domain name you have assigned to your TACTIC server in place of localhost. You should see the TACTIC login screen.
Press CTRL+C to exit TACTIC Development Mode followed by CTRL+D
Installing TACTIC as a Service
Update your TACTIC config file /opt/tactic/tactic_data/config/tactic-conf.xml to use Python 3 for all services by updating tag:
<services>
...
<python>python3</python>
...
</services>
Now as root, type the following:
>cp /opt/tactic/tactic/src/install/service/tactic_python3 /etc/init.d/tacticProxyPreserveHost on
<Proxy balancer://tactic>
BalancerMember http://localhost:8081/tactic
BalancerMember http://localhost:8082/tactic
BalancerMember http://localhost:8083/tactic
</Proxy>
ProxyPass /tactic balancer://tactic
ProxyPass /tactic_data balancer://tactic
As root issue the following commands:
>cp /opt/tactic/tactic_data/config/tactic.conf /etc/httpd/conf.d
>systemctl restart httpd
Starting Tactic in Development Mode
>su -s /bin/bash apache
>python3 /opt/tactic/tactic/src/bin/startup_dev.py
You should now be able to navigate a web browser to http://localhost Alternatively, use the non-local IP address or fully qualified domain name you have assigned to your TACTIC server in place of localhost. You should see the TACTIC login screen.
Press CTRL+C to exit TACTIC Development Mode followed by CTRL+D
Installing TACTIC as a Service
Update your TACTIC config file /opt/tactic/tactic_data/config/tactic-conf.xml to use Python 3 for all services by updating tag:
<services>
...
<python>python3</python>
...
</services>
Now as root, type the following:
>chmod 755 /etc/init.d/tactic
>systemctl enable tactic
>systemctl start tactic
Create user „tactic“ and configure permissions
>adduser tactic
>chown tactic:tactic -R /opt/tactic
>chmod 755 -R /opt/tactic
Finally, reboot the server and test whether the TACTIC service continues to perform across reboots.
>reboot