Como Instalar Trac en CentOS

De Kafre.org

La mayor información de como instalar Trac en CentOS (En Debian me rendí, no tenia tiempo por aquel entonces) la saqué de http://www.madboa.com/geek/trac-centos/

el caso lo que viene a decir la pagina es que para instalar Trac en CentOS se necesita:

Contenido

Añadir un par de repositorios /etc/yum.repos.d/dag.repos

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=0
includepkgs=clearsilver python-clearsilver trac
 
[kbs-CentOS-Extras]
name=CentOS.Karan.Org-EL$releasever - Stable
gpgcheck=1
gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
enabled=0
baseurl=http://centos.karan.org/el$releasever/extras/stable/$basearch/RPMS/
includepkgs=python-docutils python-imaging

Usar yum para instalar Trac

yum -enablerepo=dag install trac

Configuro apache para que funcione bien con el trac /etc/httpd/conf.d/trac.conf

...
# load relevent modules
LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
LoadModule python_module modules/mod_python.so
...
<VirtualHost *:80>
  ...
  ### trac
  Alias /trac/ "/srv/trac/"
  <Directory "/srv/trac">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
 
    # mod_python speeds things up considerably
    SetHandler mod_python
    PythonHandler trac.web.modpython_frontend
    PythonOption TracEnvParentDir "/srv/trac"
    PythonOption TracUriRoot "/trac"
    PythonOption TracLocale "es_ES" 
    # authentication
    AuthType Digest
    AuthName "wiki-server"
    AuthDigestDomain /trac
    AuthDigestFile "/etc/httpd/conf/digestpw"
    Require valid-user
    # authorization is handled internally by trac
  </Directory>
 
  ### subversion
  <Location "/svn">
    DAV svn
    SVNParentPath /srv/svn
 
    Order allow,deny
    Allow from all
 
    # authentication
    AuthType Digest
    AuthName "wiki-server"
    AuthDigestDomain /svn
    AuthDigestFile "/etc/httpd/conf/digestpw"
    Require valid-user
 
    # authorization
    AuthzSVNAccessFile "/etc/httpd/conf/svn-auth.ini"
  </Location>
</VirtualHost>

Configuro Subversion

Creo una instancia de Trac

trac-admin /srv/trac/projectname initenv
chgrp -R apache /srv/trac/projectname
chown -R apache /srv/trac/projectname/{attachments,db,log}
chmod -R o-rwx /srv/trac/projectname

Configuro los permisos de Trac

# remove write privileges for anonymous visitors
trac-admin /srv/trac/projectname permission remove anonymous \
  TICKET_CREATE TICKET_MODIFY WIKI_CREATE WIKI_MODIFY
 
for n in adminuser1 adminuser2; do
  trac-admin /srv/trac/projectname permission add $n TRAC_ADMIN
done
 
for n in projectuserA projectuserB projectuserC; do
  trac-admin /srv/trac/projectname permission add $n WIKI_DELETE
done
 
trac-admin /srv/trac/projectname permission add authenticated \
  BROWSER_VIEW CHANGESET_VIEW FILE_VIEW LOG_VIEW MILESTONE_VIEW \
  REPORT_SQL_VIEW REPORT_VIEW ROADMAP_VIEW SEARCH_VIEW \
  TICKET_CREATE TICKET_MODIFY TICKET_VIEW TIMELINE_VIEW \
  WIKI_CREATE WIKI_MODIFY WIKI_VIEW
Herramientas personales