Version 4 (modified by iolaneandrade, 3 meses atrás) (diff)

--

ATENÇÃO: Fora de uso

Instalação do Subversion e Trac no Ubuntu Linux 5.04

Instalando o Trac, Subversion, Apache e outras dependências

$ apt-get install apache2 subversion trac libapache2-svn

Criando Repositorio SVN

$ svnadmin create /dados/svn

Criando usuários

$ htpasswd -c /dados/svn/dav_svn.passwd admin
$ htpasswd -s /dados/svn/dav_svn.passwd usuario

Configurando Repositorio SVN

$ vi /dados/svn/conf/svnserve.conf
[general]
anon-access = read
auth-access = write
realm = Repositorio Interlegis
[auth]
store-auth-creds = no

Configurando Apache para o SVN

$ vi /etc/apache2/sites-available/repositorio
$ rm /etc/apache2/mods-enabled/dav_svn.conf
NameVirtualHost 10.1.2.39:80
<VirtualHost 10.1.2.39:80>
  ServerName repositorio.interlegis.gov.br
  ServerAlias repositorio
  ServerAdmin admin-stc@interlegis.gov.br
  ErrorLog /var/log/apache2/error_repositorio_log
  CustomLog /var/log/apache2/access_repositorio_log common
  <Location "/">
    DAV svn
    SVNPath /dados/svn
    AuthType Basic
    AuthName "Repositorio Interlegis"
    AuthUserFile /dados/svn/dav_svn.passwd
    <LimitExcept GET PROPFIND OPTIONS REPORT>
      Require valid-user
    </LimitExcept>
    # SSLRequireSSL
  </Location>
</VirtualHost>
$ ln -s /etc/apache2/sites-available/repositorio /etc/apache2/sites-enabled/repositorio

Criando a Base para do Trac

$ trac-admin /dados/trac initenv
Project Name [My Project]> Colab Interlegis
Path to repository [/var/svn/test]> /dados/svn
Templates directory [/usr/share/trac/templates]> (enter)

Configurando o Trac

$ vi /dados/trac/conf/trac.ini
[header_logo]
src = logo_colab.gif
alt = Colab Interlegis
height = 58
link = http://colab.interlegis.gov.br/
width = 183

[logging]
log_file = trac.log
log_level = DEBUG
log_type = none

[trac]
default_charset = iso-8859-15
templates_dir = /usr/share/trac/templates
repository_dir = /dados/svn
htdocs_location = /trac/
database = sqlite:db/trac.db

[notification]
smtp_enabled = false
smtp_replyto =
smtp_always_cc =
smtp_server = smtp.interlegis.gov.br
smtp_from = admin-stc@interlegis.gov.br
always_notify_reporter = false

[project]
url = http://colab.interlegis.gov.br/
footer =  Este conte&uacute;do est&aacute; sob a licença<br /><a href="http://creativecommons.org/licenses/by/2.5/deed.pt">Creative Commons</a>
name = Colab Interlegis
descr = Portal Colaborativo Interlegis
icon = interlegis.ico

[mimeviewer]
enscript_path = enscript

[attachment]
max_size = 1024000

[timeline]
changeset_show_files = 0

[diff]
tab_width = 8

[ticket]
default_version =
default_severity = normal
default_component = component1
default_priority = normal
default_milestone =

Configurando Apache para o Trac

Link de apoio:
http://projects.edgewall.com/trac/wiki/TracPrettyUrls

$ vi /etc/apache2/sites-available/colab
NameVirtualHost 10.1.2.42:80
<VirtualHost 10.1.2.42:80>
  ServerName colab.interlegis.gov.br
  ServerAlias colab
  ServerAdmin admin-stc@interlegis.gov.br
  CustomLog /var/log/apache2/access_colab_log combined
  ErrorLog /var/log/apache2/error_colab_log
  Alias /trac "/usr/share/trac/htdocs"
  SetEnv TRAC_ENV "/dados/trac"
  ScriptAliasMatch ^/(.*) /usr/lib/cgi-bin/trac.cgi/$1
  <Location "/login">
    AuthType Basic
    AuthName "Colab Interlegis"
    AuthUserFile /dados/svn/dav_svn.passwd
    Require valid-user
    # SSLRequireSSL
  </Location>
</VirtualHost>
$ ln -s /etc/apache2/sites-available/colab /etc/apache2/sites-enabled/colab

Habilitando CGI para o Trac no Apache

$ ln -s /usr/share/trac/cgi-bin/trac.cgi /usr/lib/cgi-bin/trac.cgi

Habilitando o Modo Rewrite no Apache

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

Configurando as Permissões para o Apache

$ chown -R www-data.www-data /dados/svn /dados/trac

Reiniciando o Apache

$ /etc/init.d/apache2 restart

Habilitando permissões no Trac

$ trac-admin /dados/trac permission list
$ trac-admin /dados/trac permission add usuario TRAC_ADMIN
...

Traduzindo os templates do trac

Baixar os templates de http://projects.edgewall.com/trac/attachment/wiki/TracL10N/trac-0.9.1-templates-pt-br.tar.gz

Movê-los para /usr/share/trac/templates/

Anexos (1)

Download de todos os anexos como .zip

 

The contents and data of this website are published under license:
Creative Commons 4.0 Brasil - Atribuir Fonte - Compartilhar Igual.