https://rt-wiki.bestpractical.com/api.php?action=feedcontributions&user=86.25.244.212&feedformat=atomRequest Tracker Wiki - User contributions [en]2024-03-29T12:08:39ZUser contributionsMediaWiki 1.37.2https://rt-wiki.bestpractical.com/index.php?title=HowToInstallRequestTracker3.8OnUbuntu11.04&diff=1622HowToInstallRequestTracker3.8OnUbuntu11.042012-04-30T14:21:53Z<p>86.25.244.212: /* Install RT 3.8 libraries for Apache */</p>
<hr />
<div>{{OutdatedInstallGuide}}<br />
__TOC__<br />
<br />
= HowTo Install RT 3.8 with MySQL on Ubuntu 11.04 Server =<br />
'''DRAFT; IN-PROCESS REVISION OF [[HowTo Install Request-Tracker 3.8 on ubuntu 9.10 and MySQL]]'''<br />
<br />
This How-To will explain how to install request-tracker on a clean Ubuntu Server 11.04 64-bit install. It is tested on Ubuntu 11.04 with LOCAL and REMOTE MySQL databases. These tests were done using FULLY VIRTUALIZED servers running under VirtualBox4.1.0<br />
<br />
It also installs the additional services required for Request-Tracker:<br />
* MySql - Database to Store the RT information.<br />
* Postfix - Email Server (for sending emails)<br />
* Apache2 - Web Server<br />
* Configuration for using a MySQL database on another local server.<br />
<br />
= Ubuntu Server =<br />
== Install Ubuntu Server ==<br />
# Boot from ISO or DVD.<br />
# Accept all defaults plus...<br />
# Software Selection:<br />
## OpenSSH server<br />
## LAMP server<br />
## Mail server<br />
# Assign password for MySQL "root" user.<br />
# Repeat password<br />
# Accept remaining defaults and reboot<br />
<br />
== Update and Upgrade ==<br />
# Logon via SSH to make cut-and-paste easier<br />
# Make sure you have the latest software<br />
#:<tt>sudo apt-get update</tt><br />
#:<tt>sudo apt-get upgrade</tt><br />
<br />
= MySQL =<br />
== Install MySql with PERL interface ==<br />
''MySQL Server should already be installed if you selected '''LAMP server''' above. If not...''<br />
#<tt>sudo apt-get install mysql-server</tt><br />
#<tt>sudo apt-get install libdbd-mysql-perl</tt><br />
<br />
== Install MySQL libraries for RT 3.8 ==<br />
# <tt>sudo apt-get install rt3.8-db-mysql</tt><br />
<br />
= Apache =<br />
== Install PERL libraries for Apache ==<br />
# <tt>sudo apt-get install libapache-dbi-perl </tt><br />
<br />
== Install RT 3.8 libraries for Apache ==<br />
<tt>sudo apt-get install rt3.8-apache2</tt><br />
<br />
= Mail Server =<br />
== Install Postfix mail server (SMTP Server) ==<br />
# <tt>sudo apt-get install postfix</tt><br />
# Choose "Internet Site" in the install dialogue.<br />
# Accept or correct the name of the mail server<br />
#: ''e.g. <tt>rt.server.yourdomain.com</tt>''<br />
<br />
= Request Tracker 3.8 Itself =<br />
== Install RT server and client ==<br />
#<tt>sudo apt-get install request-tracker3.8 rt3.8-clients</tt><br />
'''NOTE: RT default install DIR is <tt>/usr/share/request-tracker3.8/</tt>'''<br />
<br />
== Name Your RT instance ==<br />
'''This is something you won't ever want to change. It will appear in the subject of <u>EVERY</u> piece of mail RT sends out, and most of the mail your users will send in as well. It will be shown on every RT screen in the title "RT for {rt_name}". Pick carefully!'''<br />
# Enter something like <tt>mydomain.com</tt> or <tt>rt.mydomain</tt><br />
<br />
== Baseline Configuration of Your RT Instance ==<br />
# Answer "Yes" to "Handle [[RT SiteConfig|RT_SiteConfig]].pm permissions?"<br />
# Answer “No” to "Configure database for request-tracker3.8 with dbconfig-common?"<br />
<br />
== Additional Configuration of Your RT Instance ==<br />
'''NOTE:''' Many of the install guides specify direct modification of <tt>RT_SiteConfig.pm</tt>. '''This is no longer the correct method for configuration updates!''' Instead you should use the following method for all RT configuration updates:<br />
# Go to the RT_SiteConfig.d '''directory'''<br />
#:<tt>cd /etc/request-tracker3.8/RT_SiteConfig.d</tt><br />
# Modify one or more of the configuration files in that directory, e.g.:<br />
#:<tt>sudo vim 40-timezone</tt> '''or''' <tt>sudo nano 40-timezone</tt><br />
#:<tt>sudo vim 50-debconf</tt><br />
#:<tt>sudo vim 51-dbconfig-common</tt><br />
#:<tt>sudo vim 90-local</tt> '''''Put your own special configuration elements in this file.'''''<br />
# Backup the RT_SiteConfig.pm file<br />
#:<tt>cd ..</tt><br />
#:<tt>sudo cp RT_SiteConfig.pm RT_SiteConfig.pm.orig </tt><br />
# <tt>Re-generate the RT_SiteConfig.pm file </tt><br />
#:<tt>sudo update-rt-siteconfig-3.8</tt><br />
<br />
== Check/Modify Basic Configuration ==<br />
# Enter the configuration directory<br />
#:<tt>cd /etc/request-tracker3.8/RT_SiteConfig.d</tt><br />
# Look at the basic configuration file (press "q" to exit)<br />
#:<tt>sudo less 50-debconf </tt><br />
# Modify if needed<br />
#:<tt>sudo cp 50-debconf 50-debconf.orig </tt><br />
#:<tt>sudo vim 50-debconf</tt><br />
To eliminate an extra (for me) "/rt" in the URL, I change the WebPath as follows:<br />
FROM: Set($WebPath , "/rt");<br />
TO: Set($WebPath , "");<br />
So my '''<tt>50-debconf</tt>''' file looks like this:<br />
<pre><br />
# THE BASICS:<br />
<br />
Set($rtname, 'dev.mydomain.com');<br />
Set($Organization, 'rt.mydomain.com');<br />
<br />
Set($CorrespondAddress , 'rt@rt.mydomain.com');<br />
Set($CommentAddress , 'rt-comment@rt.mydomain.com');<br />
<br />
# THE WEBSERVER:<br />
<br />
Set($WebPath , "");<br />
Set($WebBaseURL , "http://rt.mydomain.com");<br />
</pre><br />
<br />
<br />
== Check/Modify Database Configuration ==<br />
# Enter the configuration directory<br />
#:<tt>cd /etc/request-tracker3.8/RT_SiteConfig.d</tt><br />
# Look at the basic configuration file (press "q" to exit)<br />
#:<tt>sudo less 51-dbconfig-common </tt><br />
# Modify if needed<br />
#:<tt>sudo cp 51-dbconfig-common 51-dbconfig-common.orig</tt><br />
#:<tt>sudo vim 51-dbconfig-common</tt><br />
To use MySQL on '''<tt>localhost</tt>''', my '''<tt>51-dbconfig-common</tt>''' file looks like this::<br />
<pre><br />
# THE DATABASE:<br />
# generated by dbconfig-common<br />
# Updated to use MySQL only<br />
<br />
# map from dbconfig-common database types to their names as known by RT<br />
# my %typemap = (<br />
# mysql => 'mysql',<br />
# pgsql => 'Pg',<br />
# sqlite3 => 'SQLite',<br />
# );<br />
<br />
# Set($DatabaseType, $typemap{} || "UNKNOWN");<br />
Set($DatabaseType, 'mysql');<br />
<br />
# Values for a LOCALHOST database:<br />
Set($DatabaseHost, 'localhost');<br />
Set($DatabasePort, '');<br />
<br />
<br />
# Values for a REMOTE DATABASE SERVER:<br />
# Set($DatabaseHost, 'dbhostname');<br />
# Set($DatabasePort, '3306');<br />
<br />
Set($DatabaseUser , 'rtuser');<br />
Set($DatabasePassword , 'rtdbpasswd');<br />
<br />
# SQLite needs a special case, since $DatabaseName must be a full pathname<br />
# my $dbc_dbname = ''; if ( "" eq "sqlite3" ) { Set ($DatabaseName, '' . '/' . $dbc_dbname); } else { Set ($DatabaseName, $dbc_dbname); }<br />
<br />
my $dbc_dbname = 'rtdb';<br />
Set ($DatabaseName, $dbc_dbname);<br />
</pre><br />
<br />
== Create New RT_SiteConfig.pm File ==<br />
# Backup the RT_SiteConfig.pm file<br />
#:<tt>cd ..</tt><br />
#:<tt>sudo cp RT_SiteConfig.pm RT_SiteConfig.pm.orig </tt><br />
# <tt>Re-generate the RT_SiteConfig.pm file </tt><br />
#:<tt>sudo update-rt-siteconfig-3.8</tt><br />
<br />
== Create the Database ==<br />
# Use script to create database (don’t worry about user error message we will fix this later)<br />
#: <tt>sudo /usr/sbin/rt-setup-database --action init --dba root --prompt-for-dba-password</tt><br />
# '''On your database host''', login to [[MySQL]] as '''root'''<br />
#: <tt>mysql -uroot -p</tt><br />
# Create user <u>properly</u><br />
#: <tt>CREATE USER rtuser IDENTIFIED BY 'rtdbpasswd';</tt><br />
# Grant access rights to rtuser<br />
#* If using a remote database host, replace "localhost" (below) with the name of your '''RT host'''.<br />
#: <tt>GRANT ALL PRIVILEGES ON rtdb.* TO 'rtuser'@'localhost' IDENTIFIED BY 'rtdbpasswd';</tt><br />
#: <tt>FLUSH PRIVILEGES;</tt><br />
#: <tt>QUIT</tt><br />
# Drop the database<br />
#: <tt>mysqladmin drop rtdb -p</tt><br />
# '''Back on the RT host''', recreate the database using the script (it should work this time)<br />
#:<tt>sudo /usr/sbin/rt-setup-database --action init --dba root --prompt-for-dba-password</tt><br />
<br />
= Update Apache Configs (basic) =<br />
'''NOTE:''' These instructions provide <u>basic</u> connectivity via Apache. They do not cover advanced connectivity elements such as SSL, use of conf.d directory, etc.<br />
<br />
== Add RT PERL module to Apache ==<br />
# Backup apache configuration file<br />
#:<tt>sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/default.orig</tt><br />
# Open the Apache default configuration file for editing<br />
#:<tt>sudo vim /etc/apache2/sites-available/default</tt><br />
# Add the following line to the [[VirtualHost]] section of Apache from which you wish to serve RT<br />
#: (Paste at the end of the file just before the closing <nowiki></VirtualHost></nowiki> tag.)<br />
#:<tt>Include /etc/request-tracker3.8/apache2-modperl2.conf</tt><br />
#:<tt>RedirectMatch ^/$ /rt</tt><br />
# Add the module <br />
#:<tt>sudo a2enmod rewrite</tt><br />
<br />
== Restart Apache ==<br />
# This might work the first time:<br />
#:<tt>sudo service apache2 restart</tt><br />
# If you get an error, there is a PERL module missing. Install it:<br />
#:<tt>sudo apt-get install libapache-dbi-perl</tt><br />
# Try again -- it should work now.<br />
#:<tt>sudo /etc/init.d/apache2 restart</tt><br />
<br />
<br />
= Start using Request Tracker =<br />
<br />
Now you are ready to logon to Request Tracker on 'http://yourdomain.com/rt' using<br />
<br />
User: root<br />
<br />
Password: password<br />
<br />
And you are on your way, have fun :-).</div>86.25.244.212