TACTIC Install - CentOS 5.5

TACTIC Install - CentOS 5.5

Below are the step-by-step instructions of how to install TACTIC on CentOS 5.5. For CentOS 6.2 and above, please refer to the TACTIC Install - CentOS 6.2 page.

CentOS 5.5

Unfortunately, CentOS 5.5 comes pre-packaged with an outdated version of Python: Python 2.4. TACTIC requires Python 2.7.

To get around this, when we install Python 2.7, we do not overwrite the original Python 2.4. See steps #8 and #9.

Overwritting the original Python would break some software packages, such as Yum.

We must remember to call Python2.7 explicitly whenever we run any TACTIC python scripts, including startup.py

  1. Log in as the root user.

  2. Open the passwd file.

    vi /etc/passwd

    Modify the apache home directory and login shell to look like the following:

    apache:x:48:48:Apache:/home/apache:/bin/bash 
  3. Set password for apache to: south123paw

    passwd apache
  4. Open to the sudoers file.

    visudo

    Add the apache user by including the following line in the appropriate location in the file:

    apache ALL=(ALL) ALL
  5. Create the home directory for apache.

    mkdir /home/apache
    chown apache:apache /home/apache
    chmod a+rx /home/apache
  6. Disable SElinux by setting SELINUX=disabled

    vi /etc/selinux/config
  7. Remove the existing Postgres and Install Postgres 8.4 modules.

    yum remove postgresql postgresql-libs postgresql-server
    
    vi /etc/yum.repos.d/CentOS-Base.repo
    Add the exclude line to the 2 section base and updates:
    
    [base]
    exclude=postgresql*
    [updates]
    exclude=postgresql*
    
    rpm -Uvh http://yum.pgrpms.org/reporpms/8.4/pgdg-centos-8.4-2.noarch.rpm
    yum install -y postgresql postgresql-server postgresql-contrib
    yum install -y postgresql-devel
    yum install -y gcc zlib-devel samba libxslt-devel libxml2-devel
  8. Install Python 2.7.

    cd; wget http://www.python.org/ftp/python/2.7.1/Python-2.7.1.tgz
    tar zxvf Python-2.7.1.tgz
    cd Python-2.7.1
    ./configure -with-zlib=/usr/include
    make install
  9. Installing Python 2.7 will install python2.7 command "ahead" of the original python so that "python" from the command line is now 2.7. This will potentially break yum or other OS admin tools. To fix this, remove the python executable for 2.7.

    rm /usr/local/bin/python
  10. Restart the shell so that the environment is clean.

  11. Install lxml.

    cd; wget http://codespeak.net/lxml/lxml-2.2.8.tgz
    tar zxvf lxml-2.2.8.tgz
    cd lxml-2.2.8
    python2.7 setup.py install
  12. Install PIL.

    cd; wget http://effbot.org/downloads/Imaging-1.1.7.tar.gz
    tar zxvf Imaging-1.1.7.tar.gz
    cd Imaging-1.1.7
    python2.7 setup.py install
  13. Install psycopg2.

    cd; wget http://pypi.python.org/packages/source/p/psycopg2/psycopg2-2.3.2.tar.gz
    http://initd.org/psycopg/tarballs/PSYCOPG-2-3/psycopg2-2.3.1.tar.gz
    tar zxvf psycopg2-2.3.2.tar.gz
    cd psycopg2-2.3.2
    python2.7 setup.py install
  14. Install PyCrypto.

    cd; wget http://pypi.python.org/packages/source/p/pycrypto/pycrypto-2.3.tar.gz
    tar zxvf pycrypto-2.3.tar.gz
    cd pycrypto-2.3
    python2.7 setup.py install
  15. Disable firewall.

    /etc/init.d/iptables save
    /etc/init.d/iptables stop
  16. Create and open the index.html for redirection.

    vi /var/www/html/index.html

    Insert the following contents:

    <META http-equiv="refresh" content="0;URL=/tactic">
  17. Re-login as the apache user.

  18. Download the TACTIC source code

    Open the following link in a web browser and download the latest TACTIC Enterprise release.

    http://community.southpawtech.com/downloads

    Set up the TACTIC service.

    cd /tmp
    unzip tactic_#.#.#.#.zip
    
    sudo cp /tmp/tactic_#.#.#.#/src/install/service/tactic/etc/init.d
    sudo chmod 775 /etc/init.d/tactic
    sudo /sbin/chkconfig tactic on
  19. Set up Postgres.

    sudo service postgresql initdb
    sudo /etc/init.d/postgresql start
       
    sudo mv /var/lib/pgsql/data/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf.bak
    sudo cp /tmp/tactic_#.#.#.#/src/install/postgresql/pg_hba.conf /var/lib/pgsql/data
    sudo chown postgres:postgres /var/lib/pgsql/data/pg_hba.conf
    sudo /sbin/chkconfig postgresql on
    sudo /etc/init.d/postgresql restart 
  20. Install TACTIC. You will be asked to enter a base directory for installation. We call this <TACTIC_BASE_DIR>

    cd /tmp/tactic_#.#.#.#/src/install
    sudo python2.7 install.py
    sudo /sbin/chkconfig tactic on
  21. Set up Apache. Copy the tactic.conf generated by the TACTIC Installer.

    sudo cp  <TACTIC_BASE_DIR>/tactic_data/config/tactic.conf /etc/httpd/conf.d/
    sudo /sbin/chkconfig httpd on
    sudo /etc/init.d/httpd start 
  22. Startup TACTIC in dev mode.

    python2.7 /home/apache/tactic/src/bin/startup_dev.py
  23. Try accessing TACTIC through a web browser on a client machine. http://<server IP>/tactic

  24. Once startup_dev works, Ctrl^C out of the process.

    Ctrl^C
  25. Open the TACTIC service file for edit.

    sudo vi /etc/init.d/tactic

    Modify the variable for PYTHON as follows:

    PYTHON=/usr/local/bin/python2.7
  26. Open the TACTIC configuration file for edit.

    vi  <TACTIC_BASE_DIR>/tactic_data/config/tactic_linux-conf.xml

    Modify the option variable for python as follows:

    <python>/usr/local/bin/python2.7</python>
  27. Start TACTIC as a service and install the license in a Java-enabled browser.

    sudo /etc/init.d/tactic start
  28. 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.

End of installation instructions.