User Tools

Site Tools


Sidebar

tutorials:trac

[http://trac.edgewall.org/wiki/TracInstall TracInstall Wiki page]

  • descărcat surse trac:

icup@anaconda:~$ wget http://ftp.edgewall.com/pub/trac/trac-0.10.4.tar.gz –13:51:39– http://ftp.edgewall.com/pub/trac/trac-0.10.4.tar.gz

         => `trac-0.10.4.tar.gz'

[…]

  • dezarhivat:

icup@anaconda:~/src$ tar xzf trac-0.10.4.tar.gz icup@anaconda:~/src$ ls trac-0.10.4 trac-0.10.4.tar.gz icup@anaconda:~/src$ ln -s trac-0.10.4 trac icup@anaconda:~/src$ ls trac trac-0.10.4 trac-0.10.4.tar.gz

  • instalat

icup@anaconda:~/src/trac$ python setup.py install –prefix=/home/projects/icup/apps/trac

  • adăugat cale în PATH:

PATH=$PATH:/home/projects/icup/apps/trac/bin

  • creare repository SVN

icup@anaconda:~$ svnadmin create svn/

  • adăugat directoarele principale în repository:

icup@anaconda:~/junk$ svn import . file:/home/projects/icup/svn Adding trunk Adding branches Adding svn-commit.tmp Adding tags Committed revision 1. * verificat că e totul OK: icup@anaconda:~/junk$ svn list file:/home/projects/icup/svn branches/ tags/ trunk/

  • creat mediu trac

icup@anaconda:~$ apps/trac/bin/trac-admin trac initenv Creating a new Trac environment at /home/projects/icup/trac/ […] Project Name [My Project]> Imagine Cup […] Database connection string [sqlite:db/trac.db]> (NOTE: default) […] Repository type [svn]> (NOTE: default) […] Path to repository [/path/to/repos]>/ […] Templates directory [/usr/share/trac/templates]> /home/projects/icup/apps/trac/share/trac/templates […]

  • testat (nu a mers)

icup@anaconda:~$ apps/trac/bin/tracd –port 8000 /home/projects/icup/trac & [1] 28759

  • configurare server web (necesită drepturi de administrator - nu ştiu cum să fac pentru a nu fi nevoie de găzduire virtuală; trebuie şi intrare DNS)

<VirtualHost *:80>

       ServerName icup.anaconda.cs.pub.ro
       DocumentRoot /home/projects/icup/public_html

ScriptAlias /trac /home/projects/icup/apps/trac/share/trac/cgi-bin/trac.cgi <Location “/trac”>

               SetEnv TRAC_ENV_PARENT_DIR /home/projects/icup/trac
               SetEnv PYTHON_EGG_CACHE /usr/lib/python2.4/site-packages/TracWebAdmin-0.1.2dev-py2.4.egg         </Location>

<Location “/trac/login”>

               AuthType Basic
               AuthName "Trac"
               AuthUserFile /home/projects/icup/misc/trac.htpasswd
               Require valid-user
       </Location>

</VirtualHost>

  • se reporneşte server-ul web

anaconda:/var/svn-repos# /etc/init.d/apache restart Restarting apache 1.3 web server….

  • se creează conturi pentru autentificare

icup@anaconda:~$ cd misc/ icup@anaconda:~/misc$ htpasswd -c trac.htpasswd razvan New password: Re-type new password: Adding password for user razvan

  • verificat funcţionare svn (folosesc svn+ssh):

razvan@ragnarok:~/junk$ svn co svn+ssh:icup@anaconda.cs.pub.ro/home/projects/icup/svn Password: A svn/trunk A svn/branches A svn/tags Checked out revision 1. razvan@ragnarok:~/junk$ ls svn/ branches tags trunk * adăugat cheie publică pentru uşurinţă în lucru razvan@ragnarok:~$ scp ~/.ssh/id_rsa.pub icup@anaconda.cs.pub.ro:misc/id_rsa_razvan.pub Password: id_rsa.pub icup@anaconda:~/misc$ cat id_rsa_razvan.pub » /home/projects/icup/.ssh/authorized_keys razvan@ragnarok:~/junk$ svn co svn+ssh:icup@anaconda.cs.pub.ro/home/projects/icup/svn A svn/trunk A svn/branches A svn/tags Checked out revision 1.

tutorials/trac.txt · Last modified: 2020/07/20 09:16 (external edit)