logo_kerberos.gif

Difference between revisions of "RT server configuration"

From K5Wiki
Jump to: navigation, search
(PostgreSQL configuration)
(PostgreSQL configuration)
Line 88: Line 88:
   
 
In /etc/postgresql/<version>/main/pg_hba.conf, find the line that reads "local all all peer" and add "map=local" to the end, so it reads "local all all peer map=local". Comment out the line that reads "local all postgres peer", despite the warning not to disable it. Run "service postgresql restart" to reread the affected files. Run "psql -Upostgres --list" to verify that the identity map works.
 
In /etc/postgresql/<version>/main/pg_hba.conf, find the line that reads "local all all peer" and add "map=local" to the end, so it reads "local all all peer map=local". Comment out the line that reads "local all postgres peer", despite the warning not to disable it. Run "service postgresql restart" to reread the affected files. Run "psql -Upostgres --list" to verify that the identity map works.
  +
  +
Run "createuser -Upostgres rt_user" to create the rt_user role.
  +
  +
Run "createdb -ESQL_ASCII -Upostgres -Ttemplate0 rt2" to create the database. This database can be removed with "dropdb -Upostgres rt2" if it becomes necessary to recreate it.
  +
  +
Run "pg_dump -Upostgres -Fc rt2 > /path/to/dumpfile" on the old server, transfer the file to the new server, and run "pg_restore -Upostgres -d rt2 /path/to/dumpfile" on the new server to restore the database. As a simple verification, run "psql -Upostgres -c 'SELECT * FROM keywords;' rt2" on both servers and verify that the tables have the same number of rows.

Revision as of 17:45, 19 October 2017

Our installation of Request Tracker is a modified version 2.0.13. Most of the modifications were tracked in CVS; the repository is on drugstore at /cvs/krbdev in the tracking subdirectory. drugstore no longer serves CVS, so the repository must be copied out and checked out locally. A few changes have been made on the running server without version control.

Packages

RT has the following perl dependencies, along with the corresponding Ubuntu packages they reside in:

 Digest::MD5                           perl                                    
 Storable                              perl                                    
 DBI 1.18                              libdbi-perl                             
 DBIx::DataSource 0.02                 libdbix-datasource-perl                 
 DBIx::SearchBuilder 0.48              libdbix-searchbuilder-perl              
 HTML::Entities                        libhtml-parser-perl                     
 MLDBM                                 libmldbm-perl                           
 Net::Domain                           perl-modules                            
 Net::SMTP                             perl-modules                            
 Params::Validate 0.02                 libparams-validate-perl                 
 HTML::Mason 1.02                      libhtml-mason-perl                      
 CGI::Cookie 1.20                      perl-modules                            
 Apache::Cookie                        libapache2-request-perl                 
 Apache::Session 1.53                  libapache-session-perl                  
 Date::Parse                           libtimedate-perl                        
 Date::Format                          libtimedate-perl                        
 MIME::Entity 5.108                    libmime-tools-perl                      
 Mail::Mailer 1.20                     libmailtools-perl                       
 Getopt::Long 2.24                     perl-base                               
 Tie::IxHash                           libtie-ixhash-perl                      
 Text::Wrapper                         libtext-wrapper-perl                    
 Text::Template                        libtext-template-perl                   
 File::Spec 0.8                        perl-base                               
 Errno                                 perl-base                               
 FreezeThaw                            libfreezethaw-perl                      
 File::Temp                            perl-modules                            
 Log::Dispatch 1.6                     liblog-dispatch-perl                    

The data in RT is stored in a PostgreSQL database. The postgresql Ubuntu package will install the recommended version of PostgreSQL for the current Ubuntu version.

In sum, the following packages must be installed on the RT server:

 libapache-session-perl                                                        
 libapache2-request-perl                                                       
 libdbi-perl                                                                   
 libdbix-datasource-perl                                                       
 libdbix-searchbuilder-perl                                                    
 libfreezethaw-perl                                                            
 libhtml-mason-perl                                                            
 libhtml-parser-perl                                                           
 liblog-dispatch-perl                                                          
 libmailtools-perl                                                             
 libmime-tools-perl                                                            
 libmldbm-perl                                                                 
 libparams-validate-perl                                                       
 libtext-template-perl                                                         
 libtext-wrapper-perl                                                          
 libtie-ixhash-perl                                                            
 libtimedate-perl                                                              
 perl                                                                          
 perl-base                                                                     
 perl-modules
 postgresql

User accounts

The postgresql package will create a postgres user account.

The following user accounts and group entries must be created manually:

  • group rt
  • user rt: primary group rt, homedir /var/rt2, shell /bin/false
  • user rtcvs: primary group rt, homedir /var/rt2, shell /bin/sh

/var/rt2 should contain an empty .k5login file.

PostgreSQL configuration

Many PostgreSQL files live in directories specific to the PostgreSQL major and minor version, such as /etc/postgresql/8.3 for PostgreSQL 8.3.

The Ubuntu postgresql package will create a "main" cluster with a configuration directory in /etc/postgresql/<version>/main.

In /etc/postgresql/<version>/main/pg_ident.conf, add:

 local		root		root
 local		root		postgres
 local		root		rt_user
 local		rt		rt_user
 local		rtcvs		rt_user
 local		postfix		rt_user
 local		nobody		rt_user

In /etc/postgresql/<version>/main/pg_hba.conf, find the line that reads "local all all peer" and add "map=local" to the end, so it reads "local all all peer map=local". Comment out the line that reads "local all postgres peer", despite the warning not to disable it. Run "service postgresql restart" to reread the affected files. Run "psql -Upostgres --list" to verify that the identity map works.

Run "createuser -Upostgres rt_user" to create the rt_user role.

Run "createdb -ESQL_ASCII -Upostgres -Ttemplate0 rt2" to create the database. This database can be removed with "dropdb -Upostgres rt2" if it becomes necessary to recreate it.

Run "pg_dump -Upostgres -Fc rt2 > /path/to/dumpfile" on the old server, transfer the file to the new server, and run "pg_restore -Upostgres -d rt2 /path/to/dumpfile" on the new server to restore the database. As a simple verification, run "psql -Upostgres -c 'SELECT * FROM keywords;' rt2" on both servers and verify that the tables have the same number of rows.