GuiaInstalacaoDebian: Difference between revisions
m (2 revisions imported) |
(No difference)
|
Latest revision as of 15:11, 6 April 2016
As instrucoes de instalacao dependem da versao do Debian que voce esta usando. Fica mais facil se voce estiver usando uma versao mais atual que a /Woody/.
Debian sarge ou novo
Os pacotes rt3 fazem parte dos pacotes padroes do debian com (quase) todas suas dependencias descritas. Voce pode usar:
apt-get install request-tracker3
e entao ler /usr/share/doc/request-tracker3/README.Debian para a ver as instrucoes essenciais de instalacao.
(Veja tambem a informacao do pacote debian em http://packages.debian.org/testing/misc/request-tracker3)
O sistema de banco de dados usado (postgres ou mysql) nao e considerado uma dependencia. Entao voce presisa estar certo que o sistema de banco de dados que voce quer usar ja esteja instalado. A instalacao pode ser feita com mais um /apt-get install/ .
O banco de dados padrao no arquivo de configuracao e o postgresql. Eu modifiquei isso para mysqld porque eu usava para minha instalacao anterior do RT2, e porque eu tive alguns problemas com o RT3.0.9 e rt2-to-rt3-1.23. Voce pode ter mais sucesso, mas em todo caso, se voce prefere o postgresql, tente isso antes.
Debian woody
Leia o arquivo README incluido no tarball RT.
Note que as versoes dos pacotes perl e mysql no woody sao desatualizadas para o RT. Porem voce pode fazer que o RT funcione mesmo assim. Se alguem encontrar algum problema, por favor adicione-o aqui.
obs: essa traducao e responsabilidade de Tiago Bortoletto Vaz (tiagovaz@im.ufba.br) e certamente pode conter erros.
English Debian Sarge Installation
First thing you need to do is get the requred packages: apt-get install request-tracker3.4 and apt-get install mysql-server(or)pgsql You can choose either of the two database packages or if you already have one installed, you can ignore this step.
Then: apt-get install libapache2-mod-proxy-html
Then run ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load
BASIC RT CONFIGURATION
The first step is to configure RT, this is done via the /etc/request-tracker3.4/RT_SiteConfig.pm file. Start by editing the file as installed. Note that the default settings in RT_Config.pm are used for any options you do put into RT_SiteConfig.pm. You should NEVER edit the RT_Config.pm file directly; always use RT_SiteConfig.pm.
Changing the variables in the distributed RT_SiteConfig.pm should be enough to get RT3 up and running but will probably not solve all your problems. I recommend that you read /etc/request-tracker3.4/RT_Config.pm thoroughly and copy/edit the extra bits you think you need into the RT_SiteConfig.pm file.
The RT_SiteConfig.pm is a real Perl module and as such really does need that last line which looks like:
1;
without it things will not work properly so please do not delete it. As it is a Perl module you can of course use any Perl you like to handle the setting of the configuration options.
DATABASE CREATION AND SCHEMA INSTALLATION
1. Create the database user
As the database administrator (e.g. the postgres or mysql user), or user with rights to create new users and databases, manually create the RT user with SQL like:
(Postgres)
CREATE USER rtuser WITH PASSWORD 'wibble' CREATEDB NOCREATEUSER;
(MySQL)
GRANT ALL PRIVILEGES ON rtdb.* TO rtuser@localhost IDENTIFIED BY 'wibble';
Of course, rtuser and 'wibble' should be replaced with whatever you have configured the $DatabaseUser and $DatabasePassword variables to be in the RT_SiteConfig.pm. The database name is also defined there, by the variable $DatabaseName -- in this file, we use 'rtdb'.
2. Configure the database access permissions
Ensure that you can access the database server as the rtuser SQL user.
For MySQL, you have probably already done this in stage 1.
You could do this for PostgreSQL with psql:
psql -d template1 -U rtuser -W
enter the password at the prompt.
If this fails (it probably will with the default Debian PostgreSQL installation) then you probably need to change the access permissions that you have set for your database server.
For PostgreSQL, this can be solved by editing the file /etc/postgresql/pg_hba.conf and adding lines like these:
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
at the bottom of the file along with the other similar lines - but above existing entries.
(rtdb is whatever you have configured the $DatabaseName variable to be in the RT_SiteConfig.pm.)
Note that the order of entries in the pg_hba.conf DOES MATTER. The first matching entry will be used and there is no fall through mechanism if the first one fails. (See section 6.1 of the PostgreSQL Administrator's manual for full details). The local entries above must be put above the default local all/all if you want to able to access the rtdb database as the rtuser from the command line using psql.
Restart the PostgreSQL server and try again with psql. If the database server is on a different machine from that of the RT instance you will need to configure these lines yourself.
Note that for PostgreSQL the rt-setup-database script needs permission to connect to the template1 database as well as the RT database. Giving permission to connect like this does not give out actual read/write permission so doing this for the rt user can generally be considered safe on the local system. Once you have created and initialised your RT database you should remove the template1 lines as they will not be needed for any other purpose.
Note: If you have problems with MySQL or know how to solve similar issues for that server we would love to hear from you so we can extend this help file.
3. Create and initialise the database
Now to populate the database with the schema, do:
/usr/sbin/rt-setup-database --action init --dba rtuser \ --prompt-for-dba-password
<give the database password for the rtuser SQL account>
Note: if anything does go wrong in this procedure, you will probably need to drop the database 'rtdb' manually.
APACHE CONFIGURATION
There are four config files supplied in /etc/request-tracker3.4/ for the different modes of operation: modperl1, modperl2, speedycgi, fastcgi. These might work straight away; you really should read it before beginning to use RT3.4. The expectation is that you will need to edit the applicable file for your RT3.4 site.
Whichever of the four configuration files you decide to use you will need to ensure you have the correct apache (1 or 2) modules installed. You will also need to edit the RT_SiteConfig.pm to match up these settings:
Set($WebPath , "/rt"); Set($WebBaseURL , "http://my.domain.com");
with any Apache virtual hosts, locations, aliases or rewrites in the Include files, such as:
1)
Alias /rt /usr/share/request-tracker3.4/html
2)
ScriptAlias /rt /usr/share/request-tracker3.4/libexec/mason_handler.scgi
3)
<Location /rt/> </Location>
4)
RewriteRule ^/rt$ /rt/ RewriteRule ^/rt/(.*)$ /usr/share/request-tracker3.4/html/$1
You should ensure that you remove any existing lines such as:
RewriteEngine off
from the relevant VirtualHost section in your config.
For Apache1/modperl1 you probably want to edit the file /etc/apache/httpd.conf.
For Apache2/modperl2 with a fresh Debian install you want to put the Include near the end of the VirtualHost section in the file /etc/apache2/sites-available/default. Otherwise you may need to edit the file /etc/apache2/apache2.conf.
You will almost certainly need to do some editing of this Include file.
modperl 1 or 2 ==============
Add the following line to the VirtualHost section of Apache from which you wish to serve RT.
Include "/etc/request-tracker3.4/apache-modperl.conf"
or for Apache2:
Include "/etc/request-tracker3.4/apache2-modperl2.conf"
You may need to edit this Include file.
If you're using apache-perl you can skip the rest of this section.
You should check that the relevant lines for mod_perl in the Apache httpd.config and make sure they are not commented out with a preceeding '#'.
For Apache1.3 you will want to look for something like:
LoadModule perl_module /usr/lib/apache/1.3/mod_perl.so
If you have the Debian apache-perl package then mod_perl is already compiled in and you do not need to worry about this.
For Apache2 you probably just need to do
- ln -s /etc/apache2/mods-available/perl.load /etc/apache2/mods-enabled/perl.load
- ln -s /etc/apache2/mods-available/perl.conf /etc/apache2/mods-enabled/perl.conf
You may also need to, similarly, enable mod_rewrite, mod_actions (and mod_ssl if you intend to use SSL)
SHORT WAY OF DOING THINGS :) Using apache2:
Alias /rt/ "/usr/share/request-tracker3.4/html" Include /etc/request-tracker3.4/apache2-modperl2.conf ScriptAlias /rt /usr/share/request-tracker3.4/libexec/mason_handler.scgi
fast/speedy cgi ===============
If you want to use something other than mod_perl, there are Mason handler scripts in /etc/request-tracker3.4/. These are:
/etc/request-tracker3.4/apache-speedycgi.conf /etc/request-tracker3.4/apache-fastcgi.conf
Again you will probably need to include these into the relevant VirtualHost section of your Apache config with something like:
Include "/etc/request-tracker3.4/apache-fastcgi.conf"
Most likely they will require some editing before they do exactly what you want.
RT ROOT PASSWORD
Once the web interface is running you need to login as root IMMEDIATELY and change the default password and general configuration. The initial root password is 'password' (without the quotes, of course). Go to 'Configuration' then 'Users', follow the 'root' link. You can then alter the password and other pertinent information.
MAIL CONFIGURATION
[This section has been moved to README.Debian in the rt3-clients package.]
LOCAL MODIFICATIONS
Note that we have added another configuration file called /etc/request-tracker3.4/RT_SiteModules.pm. If you make any local modifications to the HTML::Mason files you can have any necessary extra Perl modules loaded at start time by putting the 'use' statements in this file, e.g.:
use Net::LDAP; 1;
This means you do not need to edit webmux.pl which is the normal RT way to do it. Any changes made to webmux.pl would not be preserved on upgrading of the Debian package as it is not a Debian conffile.
If you do intend to change the look and feel of the site by editing the HTML::Mason files you should, of course, do this in the /usr/local/share/request-tracker3.4/html/ tree to avoid losing your precious changes on upgrade of the Debian package.