Install RT on Ubuntu

1.Add the DNS server in the /etc/hosts.And make sure this server has privilege to access internet.
10.216.104.100    DCWH01
10.216.108.100    DCWH02

2.Install SSH&FTP.(Refer to <SSH and FTP in Ubuntu>)

3.Install Apache/2.2.11.
# sudo apt-get install apache2
4.Install MySQL 5.0.75.
# sudo apt-get install mysql-server
5.Install gcc 4.3.3.
# sudo apt-get install build-essential

6.Install RT 3.8.8.
(1) Perl configuration.
# ./configure
(2) Check for RT’s Perl Dependencies.
# make testdeps  
(There are many Perl modules missing, so need to install these modules first.Until you see "All dependencies have been found.")
# make fixdeps
(3) Install
# make install
(4) Initialize the Database
# make initialize-database

7.Sit Configuration.
Configure the file "/opt/rt3/etc/RT_SiteConfig.pm"
8.Configure the Web Server.
Configure the file "/etc/apache2/sites-available/default"

9.Install other packages.
(1) Install the mod-perl.
# sudo apt-get install libapache2-mod-perl2
(2) Install RTFM.(RTFM-2.4.1.tar.gz)
perl Makefile.PL
make install
make initdb
Set(@Plugins,qw(RT::FM));  #in the RT_SiteConfig.pm
rm -rf /opt/rt3/var/mason_data/*
Restart the web server.
(3) Install RTIR.(RT-IR-2.4.1.tar.gz)
Before starting RTIR installation, make sure the following Perl packages installed:
a.Version.pm: # sudo apt-get install libsort-versions-perl  (not necessary)
b.YAML.pm: # sudo apt-get install libconfig-yaml-perl
perl Makefile.PL
make install
make initdb
Set(@Plugins, ‘RT::FM’, ‘RT::IR’);   #in the RT_SiteConfig.pm
Restart the web server.
(4) In order to download the XLS from the RT system, need to install the following Perl module.
# cpan
CPAN> install Spreadsheet::WriteExcel
(5) Other RT packages.
RT-Extension-SearchResults-XLS-0.05.tar.gz
RT-Extension-MandatorySubject-0.01.tar.gz
Bundle-RT-0.030601.tar.gz
Also need to configure the RT_SiteConfig.pm:
Set(@Plugins,’RT::FM’,’RT::IR’,’RT::Extension::MandatorySubject’,’RT::Extension::SearchResults::XLS’);
(6) Install and Enable External Authentication.
a.Install the package RT-Authen-ExternalAuth-0.08.tar, and configure the RT_SiteConfig.pm as below:
Set(@Plugins,’RT::FM’,’RT::IR’,’RT::Extension::MandatorySubject’,’RT::Extension::SearchResults::XLS’,’RT::Authen::ExternalAuth’);
b.Using CPAN to install NET:LDAP. Otherwise an error will occur when restart the web service: "Can’t locate Net/LDAP.pm in @INC".
CPAN> install Net::LDAP
There may be some packages not successfully installed. Such as following:
Failed during this command:
 FLORA/Net-SSLeay-1.36.tar.gz                 : make NO
 SULLR/IO-Socket-SSL-1.33.tar.gz             : make_test NO
 GBARR/perl-ldap-0.4001.tar.gz                : make_test NO one dependency not OK (IO::Socket::SSL)
c.Install openssl.
# sudo apt-get install openssl
# sudo apt-get install libssl-dev
# sudo apt-get install libssl0.9.8
d.Install the missing packages by the following order.
Net-SSLeay-1.36.tar.gz
IO-Socket-SSL-1.33.tar.gz
perl-ldap-0.4001.tar.gz
e.Using CPAN to install DBI. Otherwise there will be an error "Can’t locate DBD/DBI_DRIVER.pm in @INC".
CPAN> install DBI

10.Configure the External Authentication.
(1) Change the the RT configuration file.
EDIT: Add the following in the /opt/rt3/etc/RT_SiteConfig.pm
require "/opt/rt3/local/plugins/RT-Authen-ExternalAuth/etc/RT_SiteConfig.pm";
(2) Change the External Authentication configuration file.
EDIT:/opt/rt3/local/plugins/RT-Authen-ExternalAuth/etc/RT_SiteConfig.pm
Set($ExternalAuthPriority,  [   ‘My_LDAP’,
                                ‘My_MySQL’,
                                ‘My_SSO_Cookie’
                            ]
);
Set($ExternalInfoPriority,  [   ‘My_MySQL’,
                                ‘My_LDAP’
                            ]
);
Set($ExternalServiceUsesSSLorTLS,    0);
Set($AutoCreateNonExternalUsers,    0);
Set($ExternalSettings,      {   # AN EXAMPLE DB SERVICE
                                ‘My_MySQL’   =>  {      ## GENERIC SECTION
                                                        ‘type’                      =>  ‘db’,
                                                        ‘server’                    =>  ‘localhost’,
                                                        ‘database’                  =>  ‘rt3’,
                                                        ‘table’                     =>  ‘Users’,
                                                        ‘user’                      =>  ‘root’,
                                                        ‘pass’                      =>  ‘f12_sys’,
                                                        ‘port’                      =>  ‘3306’,
                                                        ‘dbi_driver’                =>  ‘mysql’,
                                                        ‘u_field’                   =>  ‘Name’,
                                                        ‘p_field’                   =>  ‘Password’,
                                                        ‘p_enc_pkg’                 =>  ‘Digest::MD5’,
                                                        ‘p_enc_sub’                 =>  ‘Password’,
                                                        ‘attr_match_list’           =>  [   ‘Gecos’,
                                                                                            ‘Name’
                                                                                        ],
                                                        ‘attr_map’                  =>  {   ‘Name’ => ‘Name’,
                                                                                            ‘EmailAddress’ => ‘EmailAddress’,
                                                                                            ‘ExternalAuthId’ => ‘ExternalAuthId’,
                                                                                            ‘Gecos’ => ‘Gecos’
                                                                                        }
                                                    },
                                ‘My_LDAP’       =>  {   ## GENERIC SECTION
                                                        ‘type’                      =>  ‘ldap’,
                                                        ‘server’                    =>  ‘DCWH02.smic-wh.com’,
                                                        ‘user’                      =>  ‘adread’,
                                                        ‘pass’                    =>  ‘Wxic2010’,
                                                        ‘base’                      =>  ‘OU=721001 F12 IT,OU=721000 Corp IT 

Center,OU=700005 Corp F&A Office,OU=700000 WXIC,OU=Users Org Chart,DC=SMIC-WH,DC=COM’,
                                                        ‘filter’                    =>  ‘(ObjectClass=*)’,
                                                        ‘d_filter’                  =>  ‘(objectClass=FooBarBaz)’,
                                                        ‘tls’                       =>  0,
                                                        ‘ssl_version’               =>  3,
                                                        ‘net_ldap_args’             => [    version =>  3   ],
                                                        # This example shows what you *can* specify.. I recommend reducing this
                                                        ‘attr_match_list’           => [    ‘Name’,
                                                                                            ‘EmailAddress’,
                                                                                            ‘RealName’
                                                                                        ],
                                                        ‘attr_map’                  =>  {   ‘Name’ => ‘sAMAccountName’,
                                                                                            ‘EmailAddress’ => ‘mail’,
                                                                                            ‘Organization’ => ‘department’,
                                                                                            ‘RealName’ => ‘mailNickname’
                                                                                        }
                                                    },
                                ‘My_SSO_Cookie’  => {   # # The type of service (db/ldap/cookie)
                                                        ‘type’                      =>  ‘cookie’,
                                                        ‘name’                      =>  ‘loginCookieValue’,
                                                        ‘u_table’                   =>  ‘users’,
                                                        ‘u_field’                   =>  ‘username’,
                                                        ‘u_match_key’               =>  ‘userID’,
                                                        ‘c_table’                   =>  ‘login_cookie’,
                                                        ‘c_field’                   =>  ‘loginCookieValue’,
                                                        ‘c_match_key’               =>  ‘loginCookieUserID’,
                                                        ‘db_service_name’           =>  ‘My_MySQL’
                                                    }
                                }
);
1;
(3) Restart the Web service.

11.Configure the NTP service.
# sudo apt-get install ntp
Edit the file /etc/ntp.conf
server 10.216.108.200

12.If you want to login the RT system with the domain user, need to create the user(only need the Name) and grant the privilege "Let this 
user be granted rights" to that user. Otherwise there will be an error "Can’t locate object method "ACLEquivalenceObjects" via package 
"RT::FM::System" at /opt/rt3/bin/../lib/RT/Principal_Overlay.pm line 327. "

This entry was posted in Daily work. Bookmark the permalink.

Leave a comment