This document guides you through the general installation of TACTIC in Fedora Linux with some brief background information. For installation on Windows or CentOS, please refer to the corresponding sections in this book. To completely install TACTIC, there are three main components that have to be set up in the following order:
- A Database
- The TACTIC Installer
- A Web Server
TACTIC stores all metadata in a database called PostgreSQL. This is an industrial strength, hugely scalable database that has proven itself in thousands of industries around the world. We currently recommend 8.4 and upwards for ease of installation. Go to the PostgreSQL website for more information.
rpm -Uvh http://yum.pgrpms.org/reporpms/8.4/pgdg-fedora-8.4-2.noarch.rpm
yum install postgresql postgresql-server postgresql-contrib postgresql-devel
It is located in /var/lib/pgsql/data This file determines all of the user permissions for PostgreSQL. To begin with, turn on all of the permissions contained in this file. This is a temporary measure that will greatly simplify the installation process. You may lock down these permissions at a later date. Please consult the PostgreSQL documentation on how to do this. TACTIC ships with a sample "pg_hba.conf" file (located in <TACTIC_unzipped_ package>/src/install/postgresql/pg_hba.conf). This file has an open security setting for ease of installation. It's best to back up your current pg_hba.conf file before copying over with the file provided by TACTIC.
Restart the PostgreSQL Service
Verify that psql works in the command prompt:
> psql -U postgres template1
It should give you a prompt:
If you see this prompt without the need to enter a password, you have successfully installed the PostgreSQL database. Type \q to exit.
Install Python and supporting modules
The TACTIC source code is written in Python. As such, the complete codebase is open.
To install Python, you can find an msi at http://www.python.org. TACTIC requires Python 2.6 or higher.
TACTIC also requires a number of Python modules to function correctly. These modules are generally not installed by default with the standard Python distributions. For Windows, they are already packaged in a file python_modules.zip available for download in the release section of the downloads page at http://support.southpawtech.com/downloads
- PIL 1.1.7 (Python Image Library)
- ImageMagick 6.7.8 (A command line program which complements PIL) - http://www.imagemagick.org
FFmpeg version 0.6(Solution to record, convert and stream audio and video and metadata parsing) - http://www.ffmpeg.org
- psycopg2 2.3.1 (Database connectivity)
- PyCrypto version 2.0.1/2.1 (For de-encrypting the license file) - http://www.amk.ca/python/code/crypto
- simplejson 2.1.1 (not needed since Python 2.6) simplejson.egg can be installed with the EasyInstaller. It is need for JSON string encoding and parsing
- lxml 2.1 or 2.2 (XML and XPath processing)
- Unzip the file in a temporary location.
# cd /tmp # unzip tactic_#.#.#.#.zip
- Go to
# cd /tmp/tactic_#.#.#.#/src/install
- Execute: install.py
NoteYou must invoke the installation with root user privileges because it attempts to write to the <python_install>/site-packages directory.
# su # python install.py
The installer will ask a number of questions. First it ask for the <TACTIC_BASE_DIR>:
Please enter the base path of the TACTIC installation: (/home/apache) ->
Enter the user the Apache Web Server is run under.
Please enter the user Apache Web Server is run under: (apache) ->
It would copy the source code to the base path and create a symbolic link to it. An Apache Web Server file will be generated at the end which you would need to copy to the Apache config area upon installation of the web server. If there are existing files in the destination directory the installer will ask for your confirmation to remove it. At the end, you will see this:
*** Installation of TACTIC completed at [/home/apache] *** Next, please install the Apache Web Server and then copy the Apache config extension [/home/apache/tactic_data/config/tactic.conf] to the Apache web server config area. e.g. /etc/httpd/conf.d/
When the installation is completed, an asset directory will be created at '<TACTIC_DATA_DIR>/assets'.
The file tactic_paths.py will be created in the following directories:
TACTIC_INSTALL_DIR='/home/apache/tactic' TACTIC_SITE_DIR='' TACTIC_DATA_DIR='/home/apache/tactic_data'
Network machine access
If you are on the server, you can access it by using the URL http://localhost/tactic. For other people to access it on the network, you need to find out its IP address. In a linux server, you can use the command "ifconfig" to locate it. It's the one listed as the inet addr.
Next, you need to run TACTIC behind Apache.
TACTIC should be run behind an Apache web server. You can download Apache software at http://www.apache.org/
The TACTIC application server is able to serve up static content such as images, PDF files, Quicktime files, and so on, but it is not the most efficient at this because it is written in Python. This is what Apache is designed for. By running TACTIC behind Apache, it relieves TACTIC from serving the static content so that it can focus on the dynamic content.
For production use, it is highly recommended that TACTIC is run behind the Apache server. This has many scalability advantages. When running behind Apache, Apache uses a reverse proxy and proxy balancer module to forward requests to communicate with TACTIC.
After the installation, some changes may need to be made in the "httpd.conf" file for Apache.
Fedora Core: /etc/httpd/conf/httpd.conf
Make sure the following lines are uncommented:
LoadModule rewrite_module modules/mod_rewrite.so LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule proxy_balancer_module modules/mod_proxy_balancer.so LoadModule deflate_module modules/mod_deflate.so
These lines may already be uncommented, depending on your distribution and version of Apache. You need Apache version 2.0.31 or later.
The TACTIC installer generates an Apache extension conf file on completion. Copy that file to a directory that is recognized by Apache.
For Fedora Core: copy the TACTIC generate Apache conf extension file to the following directory:
If there is no such configuration extension folder, you must add the following line to the "httpd.conf" file so that it will read the extension configuration file provided by the installer:
Web Server configuration
In our provided file:
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
Warning: For load balancing, only use either:
1) the Proxy Balancer method (recommended)
2) the RewriteRule method (not recommended).
Do not use both methods at the same time.
For configuring load-balancing set-up in a real production, please refer to the Load Balancing section in the Sys-admin docs.
When trying to set up Apache on a Windows Server, to specify a share folder for Apache to use, you may need to include the name of the share folder in the path.
For example, use the following if you have named the share folder "my_share":
Alias /assets "//10.0.0.17/my_share/assets"
Finally, after verifying the configuration is correct, restart the Apache service:
service httpd restart
Go to the "<TACTIC_INSTALL_DIR>/src/bin" folder
Then su as the user apache is run as:
This "startup_dev.py" script is the development script which will dump output to the screen. The other startup script "startup.py" is the production start-up script and will dump output to a log file. The development start-up script is also much slower as it monitors the file system to see if any files have changed.
The output would look like the following:
Registering site ... admin Registering site ... default Registering site ... test Registering site ... my_project Starting TACTIC ... 05/Jul/2007:11:16:29 CONFIG INFO Server parameters: 05/Jul/2007:11:16:29 CONFIG INFO server.environment: development 05/Jul/2007:11:16:29 CONFIG INFO server.log_to_screen: True 05/Jul/2007:11:16:29 CONFIG INFO server.log_file: D:/tactic_temp/log/tactic_log 05/Jul/2007:11:16:29 CONFIG INFO server.log_tracebacks: True 05/Jul/2007:11:16:29 CONFIG INFO server.log_request_headers: True 05/Jul/2007:11:16:29 CONFIG INFO server.protocol_version: HTTP/1.0 05/Jul/2007:11:16:29 CONFIG INFO server.socket_host: 05/Jul/2007:11:16:29 CONFIG INFO server.socket_port: 8081 05/Jul/2007:11:16:29 CONFIG INFO server.socket_file: 05/Jul/2007:11:16:29 CONFIG INFO server.reverse_dns: False 05/Jul/2007:11:16:29 CONFIG INFO server.socket_queue_size: 10 05/Jul/2007:11:16:29 CONFIG INFO server.thread_pool: 5 05/Jul/2007:11:16:30 HTTP INFO Serving HTTP on http://localhost:8081/
You should see the TACTIC login appear.
There is a default user created on installation. This is the "admin" user and this user has the ability to see and change all aspects of the system. Log in as the admin user:
Note: If you have not set up the TACTIC service, refer to the page "Configure the TACTIC Service".
First, stop TACTIC running in dev mode if applicable by pressing Ctrl + C in that shell
service tactic start
At this point you will need to install a TACTIC license file and then begin to set up a project.
For more information on installing the license file, please refer to the License Installation Documentation.
For more information on getting started with projects, please refer to the Sys Admin Project Guides.
Note on supplementary directories used in TACTIC:
In the config file <TACTIC_DATA_DIR>/config/tactic-conf.xml, you will find different references to directory under the path /home/apache like /home/apache/tactic_temp , assets, and handoff. They are there because /home/apache is the base directory chosen for installation. It could be different in your case. In the future, you can change their locations by editing the config file. If the assets directory is changed, ensure it's also updated in the Apache Web server config extension tactic.conf.
To view different information about the system and set-up, you can go to the Site Admin --> System Info page. For example, you can verify if load-balancing is set up and certain key directories are writable by TACTIC.
If you see missing images on logging in or errors in the output log saying certain js files are not found, it means the Apache extension file tactic.conf is not being referenced or you have not updated the paths in it to reflect current <TACTIC_INSTALL_DIR>. For example, if your <TACTIC_INSTALL_DIR> is /home/apache/tactic, you should see the line in the Apache config extension file tactic.conf:
Alias /context /home/apache/tactic/src/context
Be aware of the slight differences in the naming of the configuration files:
tactic-conf.xml: TACTIC configuration file
tactic.conf: Apache configuration file extension
If you try to check in a Preview Image and can't see the icon generated, your assets alias in the Apache extension file may not be in sync with the asset_base_dir in the TACTIC config file tactic-conf.xml
Alias /assets /home/apache/assets
should point to the asset_base_dir as found in tactic-conf.xml
If you want to re-run install.py, the installation will ask if you to confirm backing up the sthpw database before dropping it. If you choose to do it yourself, here is the command:
pg_dump -c -U postgres sthpw > sthpw_backup.sql dropdb -U postgres sthpw
If you try to connect to the http://<server IP>/tactic and it just times out, your server firewall could be blocking access. Ensure SELinux is not enabled as well.
# to turn off firewall /etc/init.d/iptables save /etc/init.d/iptables stop