Monday, February 18, 2019

Install CENTOS 7 and RT - Request Ticket

Do a base install of Centos 7 1810 (tested on)

Install RT prerequisites
yum -y install expat gd graphviz openssl expat-devel gd-devel graphviz-devel  openssl-devel perl perl-CPAN wget screen mod_fcgid postgresql-server postgresql-devel
yum -y groupinstall "Development Tools" "Web Server"
Update system files 
yum -y update
Disable SELINX 
sed -i -r 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
shutdown -r now
Install Postgres database 
postgresql-setup initdb
systemctl enable postgresql.service
systemctl enable httpd.service
systemctl start postgresql.service
systemctl stop httpd.service
sudo -u postgres psql
 Change the entry "XXXXXXX" to your preferable password
ALTER USER postgres PASSWORD 'XXXXXXX';
\q
Edit the config
vi /var/lib/pgsql/data/pg_hba.conf
Look for:

# "local" is for Unix domain socket connections only#local  all  all  peerlocal  all all peer

change "peer" to "md5"

# "local" is for Unix domain socket connections only#local  all  all  peerlocal  all all md5 
systemctl restart postgresql.service
Install CPAN (Comprehensive Perl Archive Network) 
curl -L http://cpanmin.us | perl - --sudo App::cpanminus
Get RT
cd /tmp 
wget https://download.bestpractical.com/pub/rt/release/rt-4.4.3.tar.gz
tar xvzf rt-4.4.3.tar.gz -C /tmp
cd /tmp/rt-4.4.3
Configure RT 
./configure --enable-graphviz --enable-gd --with-web-user=apache --with-web-group=apache --with-db-type=Pg
export RT_FIX_DEPS_CMD=/usr/local/bin/cpanm
make testdeps
Depending on network and CPU step this next step can be 30 minute process
make fixdeps
cpanm HTTP::Headers::Fast --force
make fixdeps

Edit the handler.pm file
vi lib/RT/Interface/Web/Handler.pm
Find these two lines (around line 60)

use RT::Interface::Web::Request;
use File::Path qw( rmtree );
Insert the following line between them

use RT::ObjectCustomFieldValues; 
Make it look like this

use RT::Interface::Web::Request;
use RT::ObjectCustomFieldValues;
use File::Path qw( rmtree );

Complete the installation of RT
make install
Update Firewall Entries
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload
Start RT service
/opt/rt4/sbin/rt-server
Login to RT - http://serverIP

Configure using the web interface refer to the RT documents on what to do

Press CTRL+C

Configure web server

edit 

vi /etc/httpd/conf.d/fcgid.conf

Add the following to the bottom

FcgidMaxRequestLen 1073741824

Create /etc/httpd/conf.d/rt.conf and put this in the file
# RT4 configuration for Apache
#
# With minor changes, this configuration is based on the original documentation:
# https://docs.bestpractical.com/rt/4.4.2/web_deployment.html
#
### Optional apache logs for RT
# Ensure that your log rotation scripts know about these files
# ErrorLog /opt/rt4/var/log/apache2.error
# TransferLog /opt/rt4/var/log/apache2.access
# LogLevel debug

AddDefaultCharset UTF-8

ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/

DocumentRoot "/opt/rt4/share/html"

<Location />
  # For Centos7/Apache 2.4 use this line:
  Require all granted

  # For Centos6/Apache 2.2 use these two lines:
  # Order allow,deny
  # Allow from all

  Options +ExecCGI
  AddHandler fcgid-script fcgi
</Location>


Start apache:
systemctl start httpd.service



9 comments:

  1. Amazing description. Such a pleasure to read, thanks!

    ReplyDelete
    Replies
    1. yes, thank you it is indeed very very helpful. but it is just like taking some one to an unknow place and leave him there. so, pls can i get the remaining steps so i can be able to access RT via the web.

      Delete
  2. Replies
    1. good day everyone after running this command what is the next steps your documentation have been helpful,
      please can i get the full documentation to initialize database and configure RT so i can access it via the web console.
      thank you.
      regards.

      Delete
    2. Thats really it. The rest you have to go to the RT manual and learn how to do.

      Delete
  3. hi everyone, pls what is the next step.

    ReplyDelete
    Replies
    1. Forgot a commmand at the end to start it.
      If you want more information on how to make it work

      I would refer to this document
      https://rt-wiki.bestpractical.com/wiki/CentOS7Install

      Delete