Difference between revisions of "CentOS7Install"

From Request Tracker Wiki
Jump to navigation Jump to search
m (Edit.)
m (Additional formatting.)
Line 18: Line 18:
  # Install OS.
  # Install OS.


  * 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 mariadb-server openssl expat-devel gd-devel graphviz-devel mariadb-devel openssl-devel perl perl-CPAN wget screen mod_fcgid
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:  On previous versions of CentOS/RHEL, replace the mariadb-server and mariadb-devel RPMs above with mysql-server and mysql-devel.


# Patch OS
# Patch OS


<pre>yum update
  <pre>yum update
reboot the OS.</pre>
reboot the OS.</pre>


* If you are continuing to next step immediately, do not reboot.
  * If you are continuing to next step immediately, do not reboot.


# Disable selinux, by editing /etc/sysconfig/selinux:
# Disable selinux, by editing /etc/sysconfig/selinux:


<code>'''SELINUX=disabled'''</code>
  <code>'''SELINUX=disabled'''</code>
* reboot the OS


# Adjust local services:
  * reboot the OS
 
# Adjust local services:
   
   
<pre>systemctl enable mariadb.service
  <pre>systemctl enable mariadb.service
systemctl enable httpd.service
systemctl enable httpd.service
systemctl start mariadb.service
systemctl start mariadb.service
systemctl stop httpd.service</pre>
systemctl stop httpd.service</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:
# Configure root password for mariadb:
   
   
<pre>mysqladmin -u root password</pre>
  <pre>mysqladmin -u root password</pre>


* NOTE:  configure the internal DB password for the local instance of mysqld or mariadb
  * NOTE:  configure the internal DB password for the local instance of mysqld or mariadb


# 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>


# Configure RT to use cpanm for fixdeps:
# Configure RT to use cpanm for fixdeps:


<pre>export RT_FIX_DEPS_CMD=/usr/local/bin/cpanm</pre>
  <pre>export RT_FIX_DEPS_CMD=/usr/local/bin/cpanm</pre>


=== 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.1.tar.gz
tar xvzf rt-4.4.1.tar.gz -C /tmp
tar xvzf rt-4.4.1.tar.gz -C /tmp
cd /tmp/rt-4.4.1</pre>
cd /tmp/rt-4.4.1</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>


# Test the dependencies:
# Test the dependencies:


<pre>make testdeps</pre>
  <pre>make testdeps</pre>


# Fix the dependencies:
# Fix 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 build in tests for GD.
  * 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.


# Confirm the dependencies are complete:
# Confirm the dependencies are complete:
   
   
</pre>make testdeps<pre>
  </pre>make testdeps<pre>


# Install RT (default install is to the /opt/rt4 directory):
# Install RT (default install is to the /opt/rt4 directory):


<pre> make install</pre>
  <pre> make install</pre>


=== RT Configuration using Web Interface ===
=== RT Configuration using Web Interface ===
Line 98: Line 99:
(!) 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.
(!) 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.


# Run the first run installation instance:
# Run the first run installation instance:


<pre>/opt/rt4/sbin/rt-server</pre>
  <pre>/opt/rt4/sbin/rt-server</pre>


* Access the server using a web browser on the http 80 port.
# Configure using the web interface.


# Configure the rt instance using the web interface.  Refer to the RT documentation.
  * Access the server using a web browser on the http 80 port.


# Shutdown the rt-server instance.
  * Configure the RT instance using the web interface.  Refer to the RT documentation.


* When completed Ctrl-C the rt-server instance started above.
# Shutdown the rt-server instance.
 
  * When completed Ctrl-C the rt-server instance started above.


=== Configure RT for hostname.domain.name/rt directory ===
=== Configure RT for hostname.domain.name/rt directory ===
Line 114: Line 117:
(!) This is a personal preference.  The web server example below assumes /rt is used.
(!) This is a personal preference.  The web server example below assumes /rt is used.


# Modify /opt/rt4/etc/RT_SiteConfig.pm.  Add the following line:
# Modify /opt/rt4/etc/RT_SiteConfig.pm.  Add the following line:


<code>'''Set( $WebPath, '/rt' );'''</code>
  <code>'''Set( $WebPath, '/rt' );'''</code>


=== Configure web server ===
=== Configure web server ===


# Modify /etc/httpd/conf.d/fcgid.conf.  Add:
# Modify /etc/httpd/conf.d/fcgid.conf.  Add:
   
   
<code>'''FcgidMaxRequestLen 1073741824'''</code>
  <code>'''FcgidMaxRequestLen 1073741824'''</code>
 
# Create /etc/httpd/conf.d/rt.conf:
 
  <code>'''# 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/


# Create /etc/httpd/conf.d/rt.conf:
ScriptAlias /rt /opt/rt4/sbin/rt-server.fcgi/


<code>'''# RT4 configuration for Apache
DocumentRoot "/opt/rt4/share/html"


### Optional apache logs for RT
<Location /rt>
# Ensure that your log rotation scripts know about these files
  # For Centos7/Apache 2.4 this line:
# ErrorLog /opt/rt4/var/log/apache2.error
  Require all granted
# TransferLog /opt/rt4/var/log/apache2.access
  # For Centos6/Apache 2.2 these two lines:
# LogLevel debug
  # Order allow,deny
  # Allow from all
AddDefaultCharset UTF-8
  Options +ExecCGI
  AddHandler fcgid-script fcgi
Alias /rt/NoAuth/images /opt/rt4/share/html/NoAuth/images/
</Location>'''</code>
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>'''</code>


# Start apache:
# Start apache:


<pre>systemctl start httpd.service</pre>
  <pre>systemctl start httpd.service</pre>


# Modify firewalld
# Modify firewalld


* Complete your firewalld configuration to suite your local requirements.
  * 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.
  (!) NOTE:  Depending on install method, firewalld may not be installed.  You can also stop it for testing with the "systemctl stop firewalld" command.


# Access RT
# Access RT


* Connect to RT using your web browser and start your customization.
  * Connect to RT using your web browser and start your customization.

Revision as of 09:31, 12 October 2016

RT 4.4.1 installation on CentOS 7.2.1511

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 conducted in both KVM and vSphere environments.

Installation Steps

OS Installation and Initial Configuration

(!) It is possible to automate the majority of this section using kickstart files.

# Install OS.
  * Install the OS from ISO or PXE boot using your normal methodology.
# Install prerequisites for RT from OS repository.

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
yum groupinstall "Development Tools" "Web Server"
  * NOTE:  On previous versions of CentOS/RHEL, replace the mariadb-server and mariadb-devel RPMs above with mysql-server and mysql-devel.
# Patch OS
yum update
reboot the OS.
  * If you are continuing to next step immediately, do not reboot.
# Disable selinux, by editing /etc/sysconfig/selinux:
  SELINUX=disabled
  * reboot the OS
# Adjust local services:

systemctl enable mariadb.service
systemctl enable httpd.service
systemctl start mariadb.service
systemctl stop httpd.service
  * NOTE:  httpd service needs to be stopped to allow RT web based configuration later.

Configure Supporting Software

# Configure root password for mariadb:

mysqladmin -u root password
  * NOTE:  configure the internal DB password for the local instance of mysqld or mariadb
# Install CPAN minus.
curl -L http://cpanmin.us | perl - --sudo App::cpanminus
# Configure RT to use cpanm for fixdeps:
export RT_FIX_DEPS_CMD=/usr/local/bin/cpanm

RT Dependencies and Installation

# Get RT and extract to /tmp.

wget https://download.bestpractical.com/pub/rt/release/rt-4.4.1.tar.gz
tar xvzf rt-4.4.1.tar.gz -C /tmp
cd /tmp/rt-4.4.1
# Configure RT:
./configure --enable-graphviz --enable-gd --with-web-user=apache --with-web-group=apache
# Test the dependencies:
make testdeps
# Fix the dependencies:
make fixdeps
  * 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 cpanm GD --force, as there is a known issue with one of the built in tests for GD.
# Confirm the dependencies are complete:

make testdeps

# Install RT (default install is to the /opt/rt4 directory):
<pre> make install

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.

# Run the first run installation instance:
/opt/rt4/sbin/rt-server
# Configure using the web interface.
  * Access the server using a web browser on the http 80 port.
  * Configure the RT instance using the web interface.  Refer to the RT documentation.
# Shutdown the rt-server instance.
  * When completed Ctrl-C the rt-server instance started above.

Configure RT for hostname.domain.name/rt directory

(!) This is a personal preference. The web server example below assumes /rt is used.

# Modify /opt/rt4/etc/RT_SiteConfig.pm.  Add the following line:
  Set( $WebPath, '/rt' );

Configure web server

# Modify /etc/httpd/conf.d/fcgid.conf.  Add:

  FcgidMaxRequestLen 1073741824
# Create /etc/httpd/conf.d/rt.conf:
  # RT4 configuration for Apache
      1. Optional apache logs for RT
  1. Ensure that your log rotation scripts know about these files
  2. ErrorLog /opt/rt4/var/log/apache2.error
  3. TransferLog /opt/rt4/var/log/apache2.access
  4. 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"

 # 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

# Start apache:
systemctl start httpd.service
# 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.
# Access RT
  * Connect to RT using your web browser and start your customization.