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:
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
Verification
Verify that psql works in the command prompt:
> psql -U postgres template1
It should give you a prompt:
template1=#
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
# cd /tmp # unzip tactic_#.#.#.#.zip
# cd /tmp/tactic_#.#.#.#/src/install
# 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/projects/config/tactic.conf] to the Apache web server config area. e.g. /etc/httpd/conf.d/
Verification
When the installation is completed, an asset directory will be created at '<TACTIC_BASE_DIR>/assets'.
The file tactic_paths.py will be created in the following directories:
Linux |
/usr/lib/python#.#/site-packages/tacticenv
Default contents: TACTIC_INSTALL_DIR="/home/apache/tactic" TACTIC_SITE_DIR="/home/apache/projects" |
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.
Linux
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 file to the following directory:
/etc/httpd/conf.d/
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:
Include conf/tactic_win32.conf
Web Server configuration
In our provided file:
tactic.conf
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 /projects balancer://tactic
Warning: For load balancing, only use either:
1) the Proxy Balancer method (recommended)
or
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.
Finally, after verifying the configuration is correct, restart the Apache service:
service httpd restart
Go to the "<TACTIC_INSTALL_DIR>/src/bin" folder
cd /home/apache/tactic/src/bin
Then su as the user apache is run as:
su apache
python startup_dev.py
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/
http://<TACTIC_server_address>/tactic/admin/
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:
user: | admin |
password: | tactic |
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
In Linux:
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_BASE_DIR>/projects/config/tactic_linux-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 tactic.conf:
Alias /context /home/apache/tactic/src/context
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_linux-conf.xml
Alias /assets /home/apache/assets
should point to the asset_base_dir as found in tactic_linux-conf.xml
<asset_base_dir>/home/apache/assets</asset_base_dir>
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 coonect 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
# to turn off SELinux # edit the file /etc/selinux/config # make sure SELINUX=disabled