CentOS7Install: Difference between revisions
Jump to navigation
Jump to search
(Removed CentOS 6 and streamlined the install) |
(Minor tweaks to install sequence.) |
||
Line 70: | 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 | * NOTE: You may need to run the command more than once. | ||
## Confirm dependencies: | ## Confirm dependencies: | ||
<pre>make testdeps</pre> | <pre>make testdeps</pre> | ||
Line 77: | Line 77: | ||
# RT Configuration using Web Interface | # 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. | * (!) 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. | ||
## Configure firewalld to open port 80 | |||
<pre>firewall-cmd --zone=public --add-port=80/tcp --permanent | |||
firewall-cmd --reload</pre> | |||
* Note: This is an example only, which provides full access to the http port.. Configure your firewall as per site policies. | |||
## Start the first run installation instance: | ## Start the first run installation instance: | ||
<pre>/opt/rt4/sbin/rt-server</pre> | <pre>/opt/rt4/sbin/rt-server</pre> | ||
Line 84: | Line 88: | ||
## Shutdown the rt-server instance. | ## Shutdown the rt-server instance. | ||
* When completed Ctrl-C the rt-server instance started above. | * When completed Ctrl-C the rt-server instance started above. | ||
# Configure web server | # Configure web server | ||
## Modify /etc/httpd/conf.d/fcgid.conf. Add: | ## Modify /etc/httpd/conf.d/fcgid.conf. Add: | ||
Line 102: | Line 101: | ||
AddDefaultCharset UTF-8 | AddDefaultCharset UTF-8 | ||
ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/ | |||
ScriptAlias / | |||
DocumentRoot "/opt/rt4/share/html" | DocumentRoot "/opt/rt4/share/html" | ||
<Location / | <Location /> | ||
# For Centos7/Apache 2.4 this line: | # For Centos7/Apache 2.4 use this line: | ||
Require all granted | Require all granted | ||
# For Centos6/Apache 2.2 these two lines: | |||
# For Centos6/Apache 2.2 use these two lines: | |||
# Order allow,deny | # Order allow,deny | ||
# Allow from all | # Allow from all | ||
Options +ExecCGI | Options +ExecCGI | ||
AddHandler fcgid-script fcgi | AddHandler fcgid-script fcgi | ||
Line 119: | Line 118: | ||
## Start apache: | ## Start apache: | ||
<pre>systemctl start httpd.service</pre> | <pre>systemctl start httpd.service</pre> | ||
# Installation Complete | # Installation Complete | ||
## Access RT | ## Access RT | ||
* Connect to RT using your web browser and start your site customization. | * Connect to RT using your web browser and start your site customization. |
Revision as of 13:49, 11 April 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. There is a separate CentOS 6.9 install at https://rt-wiki.bestpractical.com/wiki/CentOS6Install.
- 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. * Note that the EPEL repository is not required for installation on CentOS 7.
- 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 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: We use PostgreSQL as the DB which allows us to enable full text search. (This is a change from the previous version of the document which used MySQL/MariaDB.)
- Patch OS
yum update
- Disable selinux, by editing /etc/sysconfig/selinux:
SELINUX=disabled
* reboot the OS
- Initialize the database:
postgresql-setup initdb
- Adjust local services:
systemctl enable postgresql.service systemctl enable httpd.service systemctl start postgresql.service systemctl stop httpd.service
* NOTE: httpd service needs to be stopped to allow RT web based configuration later.
- Configure Supporting Software
- Configure postgres user password for postgresql, where 'xxx' is the 'password':
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
- Reconfigure postgres local user access
Configure PostgreSQL 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" is for Unix domain socket connections only #local all all ident local all all md5
- Install CPAN minus.
curl -L http://cpanmin.us | perl - --sudo App::cpanminus
- RT Dependencies and Installation
- Get RT
mkdir rt cd rt wget https://download.bestpractical.com/pub/rt/release/rt-4.4.2.tar.gz wget https://download.bestpractical.com/pub/rt/release/rt-4.4.2.tar.gz.asc
- Verify downloads
* NOTE: Release notes are found at https://bestpractical.com/release-notes/rt/4.4.2 * extract the sha256sums from the release notes online and add them to a new sha256sum.txt file.
b2e366e18c8cb1dfd5bc6c46c116fd28cfa690a368b13fbf3131b21a0b9bbe68 rt-4.4.2.tar.gz 2185c2be31b352ad0a7605f9a4e4720b2c3607df75aae1c0cbace9eb9e6fcef8 rt-4.4.2.tar.gz.asc
* confirm the files:
sha256sum -c sha256sum.txt
- Extract the files
tar xvzf rt-4.4.2.tar.gz -C /tmp cd /tmp/rt-4.4.2
- Configure RT:
./configure --enable-graphviz --enable-gd --with-web-user=apache --with-web-group=apache --with-db-type=Pg
- Configure RT to use cpanm for fixdeps:
export RT_FIX_DEPS_CMD=/usr/local/bin/cpanm
- Test the dependencies:
make testdeps
- Install the dependencies:
make fixdeps
* NOTE: You may need to run the command more than once.
- Confirm dependencies:
make testdeps
- Install RT (default install is to the /opt/rt4 directory):
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.
- Configure firewalld to open port 80
firewall-cmd --zone=public --add-port=80/tcp --permanent firewall-cmd --reload
* Note: This is an example only, which provides full access to the http port.. Configure your firewall as per site policies.
- Start the first run installation instance:
/opt/rt4/sbin/rt-server
- 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.
- Shutdown the rt-server instance.
* When completed Ctrl-C the rt-server instance started above.
- Configure web server
- Modify /etc/httpd/conf.d/fcgid.conf. Add:
FcgidMaxRequestLen 1073741824
- 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 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
- Installation Complete
- Access RT
* Connect to RT using your web browser and start your site customization.