Install Request Tracker 3.8

Greetings,% habrauser%!
Background:
At the moment I work in a small office that is engaged in consulting, auditing and IT services. Although the office is small, the number of clients has grown rapidly, and it was already very difficult to manage without a normal help desk. Having considered a decent list of products, both paid and free, our choice fell on the BestPractical product , which is called the very simple Request Tracker.
Request Tracker is an open source enterprise-level accounting and tracking system for managing tasks, problems, and external requests from users. The system is written in the object-oriented language Perl. The system began to be developed since 1996, and is used by system administrators, technical support staff, IT managers, developers and marketing departments.
en.wikipedia.org/wiki/Request_Tracker
Was selected by the following criteria
- free (it is possible to use the SaaS model with a monthly fee)
- cross-platform (written in PERL)
- GPLv2 free license
- very well documented
- supports various DBMS (MySQL, PostgreSQL, SQlite, Oracle DB)
- RTFM engine integrated (Wiki equivalent)




The current version is 3.8.8 from May 5, 2010, and now we will install it now.
Installation:
As an operating system, I use Freebsd 8 branches. As usual, before installing anything update ports
# portsnap fetch updateas a web server, I'll use the classic version: apache 2.2 with mod_perl2 (can use nginx or lighttpd) Now set himself RT 3.8: As the database I use MySql 5.1 After setting prescribes the possibility run applications in /etc/rc.conf and now run only mysql-server Now we check whether all RT dependencies are installed correctly: If we see the line “All dependencies have been found” at the end, then everything is fine, if not, then configure CPAN and install the missing dependencies:
# cd /usr/ports/www/apache22 && make install clean
# cd /usr/ports/www/mod_perl2 && make install clean
# cd /usr/ports/www/rt38 && make install clean# cd /usr/ports/database/mysql51-server && make install cleanapache22_enable="YES"
mysql_enable="YES"# /usr/local/etc/rc.d/mysql-server start# /usr/local/sbin/rt-test-dependencies --with-mysql --with-modperl2# /usr/bin/perl -MCPAN -e shell
# /usr/local/sbin/rt-test-dependencies --with-mysql --with-modperl2 –install
We figured out the software, now let's move on to setting up RT. RT has two configuration files RT_Config.pm and RT_SiteConfig.pm. The RT_Config.pm file contains default values that are replaced with the values from the RT_SiteConfig.pm file. Therefore, we open the RT_SiteConfig.pm file and specify our values instead of the default ones: Before that, we start the user in mysql and specify his username and password in this file. Now we initialize the RT database (we initialize from the root, the script itself will give the necessary rights for the user whom we specified in RT_Config.pm): Assign the rights to configuration files:
Set( $rtname, 'Firma');
Set($WebBaseURL , "rt.domen.com");
Set( $WebPath , "");
Set($DataBaseType , 'mysql');
Set($DatabaseHost , 'localhost');
Set($DatabaseRTHost , 'localhost');
Set($DatabaseName , 'rt3');
Set($DatabaseUser, 'rt38');
Set($DatabasePassword , password);
Set($Timezone, 'Asia/Sakhalin');
Set($CorrespondAddress, '[email protected]);
Set($CommentAddress, '[email protected]);
Set($RTAddressRegexp, '^support(-comment)?\@(domen)\.(com)$');
Set($OwnerEmail, '[email protected]');
Set($AutoCreate, {Privileged => 1});
Set($NotifyActor, 1);
1;
# rt-setup-database --action init --dba root --prompt-for-dba-password# Chown www /usr/local/etc/rt38/RT_Config.pm
# Chmod 600 /usr/local/etc/rt38/RT_Config.pm
# Chown www /usr/local/etc/rt38/RT_SiteConfig.pm
# Chmod 600 /usr/local/etc/rt38/RT_SiteConfig.pm
In principle, everything is ready to launch RT, but we have one caveat, corporate mail works through Google Apps and the [email protected] account is started there, therefore we need to somehow teach RT how to receive mail from Google Apps. Fetchmail will help us with this, we install:
# cd /usr/ports/mail/fetchmail/ && make install cleanSince gmail works on an encrypted protocol, we need to slip these fetchmail certificates. To do this, create a directory for certificates:
# mkdir /usr/local/certs/Create a file inside this directory:
# touch /usr/local/certs/gmail.pemAnd run the script to get the certificate:
# openssl s_client -connect pop.gmail.com:995 -showcerts > /usr/local/certs/gmail.pemEdit the resulting file, delete everything before ----- BEGIN CERTIFICATE ----- and everything after ----- END CERTIFICATE ----- Then copy the hash utility and perform certificate hashing:
# cp /usr/src/crypto/openssl/tools/c_rehash /usr/local/bin/c_rehash
# chmod +x /usr/local/bin/c_rehash
# c_rehash /usr/local/certs/Now we need to get the fingerprint of the certificate and paste it into the fetchmail config.
# openssl x509 -in /usr/local/certs/gmail.pem -noout -md5 –fingerprintThe fingerprint is received, it remains to fix the fetchmail config to something like this: (here is a slight digression, fetchmail is launched from its fetchmail user, but for some reason he didn’t want to work for me, and in the logs I wrote “fetchmail: Cannot switch effective user id to 0: Operation not permitted” therefore, as a temporary solution to this problem, I launched fetchmail under the root, which is not good. If someone knows the solution to the problem, I will be very glad to hear) Add to /etc/rc.conf create a log file for fetchmail, actually it and so puts the logs in / var / log / maillog but so that they do not mix with the rest and start fetchmail
defaults protocol pop3,
timeout 60,
fetchall
set logfile=/var/log/fetchmail
poll pop.gmail.com
port 995
username [email protected]
password '****'
mda "/usr/local/bin/rt-mailgate --url ip-address --action correspond --queue General"
ssl
sslcertpath /usr/local/certs/
sslfingerprint "6B:**:**:**:**:**:**:**:**:**:**:**:**:**:B6"fetchmail_enable="YES"
fetchmail_user="root"# touch /var/log/fetchmail# /usr/local/etc/rc.d/fetchmail startBy default, fetchmail checks mail every 900 seconds, this can be configured by correcting the start script.
It remains to fix the apache config virtual host of the following content and start it. We send an email to [email protected] and go to rt.domen.com and see what we get, the standard username / password is root / password. If something is wrong, look at the apache and fetchmail logs. This completes the installation of Request Tracker 3.8. If this topic is interesting, I will continue to write about this system, and in the next article we will consider the configuration. PS is not very detailed painted?
ServerName rt.domen.com
ServerAdmin [email protected]
DocumentRoot /usr/local/share/rt38/html
AddDefaultCharset UTF-8
PerlModule Apache::DBI
PerlRequire /usr/local/bin/webmux.pl
Order allow,deny
Allow from all
SetHandler perl-script
PerlResponseHandler RT::Mason
Order allow,deny
Allow from IP-ADDRESS
Satisfy any
Order allow,deny
Allow from IP-ADDRESS
Satisfy any