CentOS7Install: Difference between revisions

From Request Tracker Wiki
Jump to navigation Jump to search
mNo edit summary
(Updated document to reflect RT 4.4.2 and CentOS 7.4 (and 6.9) with PostgreSQL vice MariaDB)
Line 1: Line 1:
== RT 4.4.1 installation on CentOS 7.2.1511 ==
== RT 4.4.2 installation on CentOS 7.4.1708 ==


This document provides a quick methodology for installing RT 4.4.1 on CentOS/RHEL 7.2 for an internet-connected server.  It should be suitable with minor modifications for installation on CentOS 6.8 also.  Where necessary notes about the different install steps for CentOS/RHEL 6.8 are indicated below.
NOTE:  Original Document was for CentOS 7.2 and RT 4.4.1 with MySQL.  Updated for Centos 7.4, RT 4.4.2 with PostgreSQL.
 
This document provides a quick methodology for installing RT 4.4.2 on CentOS/RHEL 7.4 for an internet-connected server.  It should be suitable with minor modifications for installation on CentOS 6.9 also.  Where necessary notes about the different install steps for CentOS/RHEL 6.9 are indicated below.


# Assumptions
# Assumptions
  * Access to the internet and CentOS OS and update repositories is available.
  * Access to the internet and CentOS OS and update repositories is available.
  * Installation testing was completed using CentOS 7.2.1511 minimal boot ISO.
  * Installation testing was completed using CentOS 7.4.1708 minimal boot ISO.
  * httpd (Apache) 2.4 and mod_fcgid Apache modules were used as the host environment.
  * httpd (Apache) 2.4 and mod_fcgid Apache modules were used as the host environment.
  * Testing was conducted in both KVM and vSphere environments.
  * Testing was conducted in both KVM and vSphere environments.


== Installation Steps ==
== Installation Steps ==
.8 are indicated below.


# Assumptions
* Access to the internet and CentOS OS and update repositories is available.
* Installation testing was completed using CentOS 7.2.1511 minimal boot ISO.
* httpd (Apache) 2.4 and mod_fcgid Apache modules were used as the host environment.
* Testing was conduct
# OS Installation and Initial Configuration
# OS Installation and Initial Configuration
  * (!) It is possible to automate the majority of this section using kickstart files.
  * (!) It is possible to automate the majority of this section using kickstart files.
Line 16: Line 24:
  * Install the OS from ISO or PXE boot using your normal methodology.
  * Install the OS from ISO or PXE boot using your normal methodology.
## Install prerequisites for RT from OS repository.
## Install prerequisites for RT from OS repository.
<pre>yum install expat gd graphviz mariadb-server openssl expat-devel gd-devel graphviz-devel mariadb-devel openssl-devel perl perl-CPAN wget screen mod_fcgid
<pre>yum 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 groupinstall "Development Tools" "Web Server"</pre>
yum groupinstall "Development Tools" "Web Server"</pre>
  * NOTE:  On previous versions of CentOS/RHEL, replace the mariadb-server and mariadb-devel RPMs above with mysql-server and mysql-devel.
  * NOTE:  Instead of MySQL/MariaDB (as per the previous version of this document), we've switched to PostgreSQL to enable future full text search enablement.
## Patch OS
## Patch OS
<pre>yum update</pre>
<pre>yum update</pre>
Line 27: Line 35:
  * reboot the OS
  * reboot the OS
## Adjust local services:
## Adjust local services:
<pre>systemctl enable mariadb.service
<pre>systemctl enable postgresql.service
systemctl enable httpd.service
systemctl enable httpd.service
systemctl start mariadb.service
systemctl start postgresql.service
systemctl stop httpd.service</pre>
systemctl stop httpd.service</pre>
  * CentOS 6.8:
  * CentOS 6.8:
<pre>chkconfig mysqld on
<pre>chkconfig postgresql on
chkconfig httpd on
chkconfig httpd on
service mysqld start
service postgresql start
service httpd stop</pre>
service httpd stop</pre>
  * NOTE:  httpd service needs to be stopped to allow RT web based configuration later.
  * NOTE:  httpd service needs to be stopped to allow RT web based configuration later.
# Configure Supporting Software
# Configure Supporting Software
## Configure root password for mariadb:
## Initialize the database:
<pre>mysqladmin -u root password</pre>
<pre>postgresql-setup initdb</pre>
  * NOTE:  This step configures the internal DB root password for the local instance of mysqld or mariadb
## Configure postgres user password for postgresql:
<pre>sudo -u postgres psql
  ALTER USER postgres PASSWORD 'xxx';
  \q</pre>
  * NOTE:  This step configures the internal DB postgres password for the local instance of postgresql
## Reconfigure postgres local user access to use md5 passwords (needed for RT).  Edit /var/lib/pgsql/data/pg_hba.conf and modify the following line from peer to md5:
<code>local  all  all                md5</code>
## Install CPAN minus.
## Install CPAN minus.
<pre>curl -L http://cpanmin.us | perl - --sudo App::cpanminus</pre>
<pre>curl -L http://cpanmin.us | perl - --sudo App::cpanminus</pre>
Line 47: Line 61:
# RT Dependencies and Installation
# RT Dependencies and Installation
## Get RT and extract to /tmp.
## Get RT and extract to /tmp.
<pre>wget https://download.bestpractical.com/pub/rt/release/rt-4.4.1.tar.gz
<pre>wget https://download.bestpractical.com/pub/rt/release/rt-4.4.2.tar.gz
tar xvzf rt-4.4.1.tar.gz -C /tmp
tar xvzf rt-4.4.2.tar.gz -C /tmp
cd /tmp/rt-4.4.1</pre>
cd /tmp/rt-4.4.2</pre>
## Configure RT:
## Configure RT:
<pre>./configure --enable-graphviz --enable-gd --with-web-user=apache --with-web-group=apache</pre>
<pre>./configure --enable-graphviz --enable-gd --with-web-user=apache --with-web-group=apache</pre>
Line 56: Line 70:
## Install the dependencies:
## Install the dependencies:
<pre>make fixdeps</pre>
<pre>make fixdeps</pre>
  * NOTE:  You may need to run the command more than once.  On RHEL/CentOS 6.8, you may need to manually force the addition of the GD perl module via <code>cpanm GD --force</code>, as there is a known issue with one of the built in tests for GD.
  * NOTE:  You may need to run the command more than once.  On RHEL/CentOS 6.9, you may need to manually force the addition of the GD perl module via <code>cpanm GD --force</code>, as there is a known issue with one of the built in tests for GD.
## Confirm dependencies:
## Confirm dependencies:
<pre>make testdeps</pre>
<pre>make testdeps</pre>

Revision as of 21:13, 18 March 2018

RT 4.4.2 installation on CentOS 7.4.1708

NOTE: Original Document was for CentOS 7.2 and RT 4.4.1 with MySQL. Updated for Centos 7.4, RT 4.4.2 with PostgreSQL.

This document provides a quick methodology for installing RT 4.4.2 on CentOS/RHEL 7.4 for an internet-connected server. It should be suitable with minor modifications for installation on CentOS 6.9 also. Where necessary notes about the different install steps for CentOS/RHEL 6.9 are indicated below.

  1. Assumptions
* Access to the internet and CentOS OS and update repositories is available.
* Installation testing was completed using CentOS 7.4.1708 minimal boot ISO.
* httpd (Apache) 2.4 and mod_fcgid Apache modules were used as the host environment.
* Testing was conducted in both KVM and vSphere environments.

Installation Steps

.8 are indicated below.

  1. Assumptions
* Access to the internet and CentOS OS and update repositories is available.
* Installation testing was completed using CentOS 7.2.1511 minimal boot ISO.
* httpd (Apache) 2.4 and mod_fcgid Apache modules were used as the host environment.
* Testing was conduct
  1. OS Installation and Initial Configuration
* (!) It is possible to automate the majority of this section using kickstart files.
    1. Install OS.
* Install the OS from ISO or PXE boot using your normal methodology.
    1. Install prerequisites for RT from OS repository.
yum 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 groupinstall "Development Tools" "Web Server"
* NOTE:  Instead of MySQL/MariaDB (as per the previous version of this document), we've switched to PostgreSQL to enable future full text search enablement.
    1. Patch OS
yum update
* Reboot the OS.
* If you are continuing to next step immediately, you do not need to reboot.
    1. Disable selinux, by editing /etc/sysconfig/selinux:

SELINUX=disabled

* reboot the OS
    1. Adjust local services:
systemctl enable postgresql.service
systemctl enable httpd.service
systemctl start postgresql.service
systemctl stop httpd.service
* CentOS 6.8:
chkconfig postgresql on
chkconfig httpd on
service postgresql start
service httpd stop
* NOTE:  httpd service needs to be stopped to allow RT web based configuration later.
  1. Configure Supporting Software
    1. Initialize the database:
postgresql-setup initdb
    1. Configure postgres user password for postgresql:
sudo -u postgres psql
  ALTER USER postgres PASSWORD 'xxx';
  \q
* NOTE:  This step configures the internal DB postgres password for the local instance of postgresql
    1. Reconfigure postgres local user access to use md5 passwords (needed for RT). Edit /var/lib/pgsql/data/pg_hba.conf and modify the following line from peer to md5:

local all all md5

    1. Install CPAN minus.
curl -L http://cpanmin.us | perl - --sudo App::cpanminus
    1. Configure RT to use cpanm for fixdeps:
export RT_FIX_DEPS_CMD=/usr/local/bin/cpanm
  1. RT Dependencies and Installation
    1. Get RT and extract to /tmp.
wget https://download.bestpractical.com/pub/rt/release/rt-4.4.2.tar.gz
tar xvzf rt-4.4.2.tar.gz -C /tmp
cd /tmp/rt-4.4.2
    1. Configure RT:
./configure --enable-graphviz --enable-gd --with-web-user=apache --with-web-group=apache
    1. Test the dependencies:
make testdeps
    1. Install the dependencies:
make fixdeps
* NOTE:  You may need to run the command more than once.  On RHEL/CentOS 6.9, you may need to manually force the addition of the GD perl module via cpanm GD --force, as there is a known issue with one of the built in tests for GD.
    1. Confirm dependencies:
make testdeps
    1. Install RT (default install is to the /opt/rt4 directory):
 make install
  1. RT Configuration using Web Interface
* (!) It is possible to complete this step by editing the RT files directly, and creating the database.  Refer to the RT documentation for manual steps.
    1. Start the first run installation instance:
/opt/rt4/sbin/rt-server
    1. Configure using the web interface.
* Access the server using a web browser to access the http port.
* Configure the RT instance using the web interface.  Refer to the RT documentation.
    1. Shutdown the rt-server instance.
* When completed Ctrl-C the rt-server instance started above.
  1. Configure RT:
* Modify RT to allow web access using a trailing /rt
* (!) This is a personal preference.  The web server example in the next section assumes /rt is used.
    1. Modify /opt/rt4/etc/RT_SiteConfig.pm. Add the following line:

Set( $WebPath, '/rt' );

  1. Configure web server
    1. Modify /etc/httpd/conf.d/fcgid.conf. Add:

FcgidMaxRequestLen 1073741824

    1. Create /etc/httpd/conf.d/rt.conf:
# RT4 configuration for Apache
### 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

Alias /rt/NoAuth/images /opt/rt4/share/html/NoAuth/images/

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

DocumentRoot "/opt/rt4/share/html"

<Location /rt>
  # For Centos7/Apache 2.4 this line:
  Require all granted
  # For Centos6/Apache 2.2 these two lines:
  # Order allow,deny
  # Allow from all
  Options +ExecCGI
  AddHandler fcgid-script fcgi
</Location>
    1. Start apache:
systemctl start httpd.service
* CentOS 6.8: service httpd start
    1. Modify firewalld
* Complete your firewalld configuration to suite your local requirements.
* (!) NOTE:  Depending on install method, firewalld may not be installed.  You can also stop it for testing with the systemctl stop firewalld command.
* On CentOS 6.8, you will need to modify your iptables configuration, or stop iptables using service iptables stop
  1. Installation Complete
    1. Access RT
* Connect to RT using your web browser and start your site customization.