HowToForums.net Forum Index HowToForums.net
An Open Source of Knowledge
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

HowTo Install Request-Tracker 3.4 on Ubuntu Dapper 6.06

 
Post new topic   Reply to topic    HowToForums.net Forum Index -> Servers & Applications
View previous topic :: View next topic  
Author Message
jacob
Site Admin
Site Admin


Joined: 16 Mar 2006
Posts: 73
Location: USA

PostPosted: Fri Jun 23, 2006 1:57 pm    Post subject: HowTo Install Request-Tracker 3.4 on Ubuntu Dapper 6.06 Reply with quote

HowTo Install Request-Tracker 3.4 on Ubuntu Dapper Server 6.06
aka HowTo Install Ubuntu, Request-Tracker, Apache2, PostgreSql, Postfix

"RT is an enterprise-grade ticketing system which enables a group of people to intelligently and efficiently manage tasks, issues, and requests submitted by a community of users."
-- http://bestpractical.com/rt/

This HowTo will explain how to install request-tracker on a clean Ubuntu Dapper Server install.
It is tested on Ubuntu Dapper 6.06 and mite work with slight modifications on other versions or Debian based distros.

It also installs the Additional services required for Request-Tracker, such as Apache2 - Web Server, Postfix - Email Server (for sending emails), & PostgreSql-7.4 - Database to Store the RT information.

I create a root user as apposed to using sudo, just because i am used to it but you may add sudo in front of the commands if you prefer the sudo security default method of Ubuntu.

To activate the root user:
Code:

sudo passwd root


Enable universe in your Sources.list
Code:

cp -vpr /etc/apt/sources.list /etc/apt/sources.list.orig
vim /etc/apt/sources.list
#comment this:
###deb cdrom:...
#& uncomment universe sources
apt-get update
apt-get install request-tracker3.4 rt3.4-apache2 rt3.4-clients apache2-doc postfix postgresql postgresql-doc-7.4 lynx


In the "Postfix Configuration":
I choose "Internet Site", just because I preffer to have the system send emails without being dependant on a different mail server.
The logic behind that is because if the email Server goes down, the Ticket-Server should NOT follow.

You Should See this message after the install is done...
Quote:

Postfix is now set up with a default configuration. If you need to make
changes, edit
/etc/postfix/main.cf (and others) as needed. To view Postfix configuration
values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.


You will also see this: Configuring postgresql-common
Quote:

Obsolete major version 7.4

The PostgreSQL version 7.4 is obsolete, but you still have the server and/or client package installed. Please
install the latest packages (postgresql-8.1 and postgresql-client-8.1) and upgrade your existing clusters with
pg_upgradecluster (see manpage).

Please be aware that the installation of postgresql..................

The old server and client..................

Do not worry about it...just click OK, as RT3.4 is certified with 7.4.


BKUP the RT config file...I like to do this for every conf file I modify
Code:

cp -vpr /etc/request-tracker3.4/RT_SiteConfig.pm /etc/request-tracker3.4/RT_SiteConfig.pm.orig


Code:

vim /etc/request-tracker3.4/RT_SiteConfig.pm


Customize using the directions in the file and add this to the end of the file but before the "1;" ...
example config included at the end...
Code:

Set($DatabaseHost   , 'localhost');
Set($DatabaseRTHost , 'localhost');


Create the user for the RT database
Code:

su postgres
psql -d template1
CREATE USER rtuser WITH PASSWORD 'wibble' CREATEDB NOCREATEUSER;
\q
exit



Customize Postgresql permissions
Code:

cp -vpr /etc/postgresql/7.4/main/pg_hba.conf /etc/postgresql/7.4/main/pg_hba.conf.orig
vim /etc/postgresql/7.4/main/pg_hba.conf
at the bottom of the file along with the other similar lines - but
above existing entries.
###according to install.debian for request-tracker
host    template1   rtuser    127.0.0.1    255.255.255.255   password
local   template1   rtuser                                   password
host    rtdb        rtuser    127.0.0.1    255.255.255.255   password
local   rtdb        rtuser                                   password

Code:

cp -vpr /etc/postgresql/7.4/main/postgresql.conf /etc/postgresql/7.4/main/postgresql.conf.orig
vim /etc/postgresql/7.4/main/postgresql.conf
make sure this is enabled
tcpip_socket = true


Restart Database
Code:

/etc/init.d/postgresql-7.4 restart



Test db connection
Code:

psql -d template1 -U rtuser -W
#enter password at the prompt, we set it to wibble in the example above
\q


Create the RT DataBase
Code:

/usr/sbin/rt-setup-database-3.4 --action init --dba rtuser --prompt-for-dba-password
#enter password at the prompt, we set it to wibble in the example above



Configure Apache2
Code:

cp -vpr /etc/apache2/sites-available/default /etc/apache2/sites-available/default.orig
vim /etc/apache2/sites-available/default

Add the following line to the VirtualHost section of Apache from which you wish to serve RT
Code:

    Include "/etc/request-tracker3.4/apache2-modperl2.conf"



Enable Apache2 RewriteEngine
Code:

cd /etc/apache2/mods-enabled/
ln -s ../mods-available/rewrite.load .


Restart Apache
Code:

/etc/init.d/apache2 force-reload



You can now login to http://yourdomain.com/rt
using user root and password "password" (without quotation marks of course)
change this passwd asap via the Configuration menu


-- SSL Mode: https --
If you want to have Request-Tracker Secure than you are going to have to configure apache2 to run in ssl mode.
Take a look at this HowTo for more information:
https://wiki.ubuntu.com/forum/server/apache2/SSL
I have also included my apache2 configs below.

-- Mail Settings --
This part is really network specific, but if you are going to use Request-Tracker as "support" mailbox organizer so to speak, than you need to set up the system to pull email.
One method would be using fetchmail which can grab mail from an IMAP/POP3 account and put it in the system.
The links below describe this process:
http://wiki.bestpractical.com/index.cgi?POP3Mailgate
http://wiki.bestpractical.com/index.cgi?ManualInstallation (Search for "Setting Up the Mail Gateway") for the basic email settings

These are the packages if your going for the configuration with fetchmail and postfix as the outgoing smtp server
Code:

apt-get install fetchmail fetchmailconf fetchmail-ssl postfix ca-certificates


DON'T Forget:
you need to have "CreateTicket" permissions on "Queue General" or any queue that you throw the emails in from the user fetching the mail



-- Example Confs --


Example Request-Tracker Config File
------------------------------------------

/etc/request-tracker3.4/RT_SiteConfig.pm

Code:

# RT_SiteConfig.pm
#
# These are the bits you absolutely *must* edit.
#
# To find out how, please read
#   /usr/share/doc/request-tracker3.4/INSTALL.Debian

# THE BASICS:

Set($rtname, 'support.howtoforums.net');
Set($Organization, 'howtoforums.net');

Set($CorrespondAddress , 'SUPPORT-DO-NOT-REPLY@howtoforums.net');
Set($CommentAddress , 'SUPPORT-DO-NOT-REPLY@howtoforums.net');

Set($Timezone , 'Europe/London'); # obviously choose what suits you

# THE DATABASE:

Set($DatabaseType, 'Pg'); # e.g. Pg or mysql

# These are the settings we used above when creating the RT database,
# you MUST set these to what you chose in the section above.

Set($DatabaseUser , 'rtuser');
Set($DatabasePassword , 'wibble');
Set($DatabaseName , 'rtdb');

# THE WEBSERVER:

Set($WebPath , "/rt");
Set($WebBaseURL , "http://howtoforums.net");

Set($DatabaseHost   , 'localhost');
Set($DatabaseRTHost , 'localhost');

1;




Example Apache2 Configuration files:
-------------------------------------------

/etc/apache2/sites-available/default

Code:

NameVirtualHost *:80
<VirtualHost *:80>
        ServerName support.howtoforums.net
        ServerAdmin support@howtoforums.net

        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
                # Uncomment this directive is you want to see apache2's
                # default start page (in /apache2-default) when you go to /
                #RedirectMatch ^/$ /apache2-default/
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined
        ServerSignature On

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

        #Redirect Request-Tracker to SSL
        RewriteEngine   on
        RewriteCond     %{SERVER_PORT} ^80$
        RewriteRule     ^/rt(.*)$ https://%{SERVER_NAME}/rt$1 [L,R]
        RewriteLog      "/var/log/apache2/rewrite.log"
        RewriteLogLevel 2

        #Request-Tracker Uncomment below if you are not redirecting and you want to answer on port 80
        #Include "/etc/request-tracker3.4/apache2-modperl2.conf"

</VirtualHost>



/etc/apache2/sites-available/ssl
Code:

NameVirtualHost *:443
<VirtualHost *:443>
        ServerName support.howtoforums.net
        ServerAdmin support@howtoforums.net

        SSLEngine On
        SSLCertificateFile /etc/apache2/ssl/apache.pem

        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
                # Uncomment this directive is you want to see apache2's
                # default start page (in /apache2-default) when you go to /
                #RedirectMatch ^/$ /apache2-default/
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined
        ServerSignature On

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

        #Request-Tracker
        Include "/etc/request-tracker3.4/apache2-modperl2.conf"

</VirtualHost>


(For Search Engines)
This HowTo is aka:
HowTo install Request-Tracker on Ubuntu Dapper 6.06
HowTo install Request-Tracker on Ubuntu
Request-Tracker on Ubuntu



Enjoy!
Jacob
http://howtoforums.net
Back to top
gh0st



Joined: 20 Jun 2007
Posts: 2

PostPosted: Wed Jun 20, 2007 12:27 pm    Post subject: Login failure Reply with quote

Jacob - awesome tutorial, would have taken me mere minutes to get working had I not missed a ' from one of the config files Sad Still - it finally works.

One slight problem though - the web gateway won't accept root / password as a login - comes back with login failed.

Any ideas appreciated Smile
Back to top
jacob
Site Admin
Site Admin


Joined: 16 Mar 2006
Posts: 73
Location: USA

PostPosted: Wed Jun 20, 2007 3:24 pm    Post subject: Reset / Recover root password Reply with quote

thanks gh0st

try this:
Code:

su postgres
psql -d rtdb
UPDATE users SET Password=MD5('password') WHERE name='root';
\q
exit


let us know,
Jacob
Back to top
gh0st



Joined: 20 Jun 2007
Posts: 2

PostPosted: Fri Jun 22, 2007 7:49 am    Post subject: database population Reply with quote

Cheers, Jacob.

I gave that a spin, but no luck. A bit of further digging revealed that the rt-setup-database-3.4 script that creates the database had done so, but not populated it with anything, explaining why it wouldn't recognise my login.

The script was coming back with an error that it couldn't find the RT_SiteConfig.pm file in the paths it had in the @INC variable, so I prepended the script with

use lib "/etc/request-tracker3.4";

...and it worked like a beauty.

Thanks for the help.
Back to top
KBD



Joined: 03 Aug 2007
Posts: 2

PostPosted: Fri Aug 03, 2007 5:19 pm    Post subject: Reply with quote

Hello friends !

I have a little problem restarting the apache web service.
I hope that you can help me. Here are the output from the shell:

Code:
sudo /etc/init.d/apache2 force-reload
Syntax error on line 17 of /etc/request-tracker3.6/apache2-modperl2.conf:
Invalid command 'PerlModule', perhaps misspelled or defined by a module not included in the server configuration
 failed!


PLEASE PLEASE HELP ME!!!

Thank you very much in advance !!!!
Back to top
KBD



Joined: 03 Aug 2007
Posts: 2

PostPosted: Fri Aug 03, 2007 5:59 pm    Post subject: Reply with quote

ok, everything is fine - I just forget to install one package.

thank you Laughing
Back to top
Display posts from previous:   
Post new topic   Reply to topic    HowToForums.net Forum Index -> Servers & Applications All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group