📜 ⬆️ ⬇️

Installing SVN + Trac + TracWebAdmin

Hello to all!
Today I will tell you how to install the SVN + Trac + TracWebAdmin bundle correctly and without crap.

What is all this for?

Imagine a situation: you have a project that is under development. Scripts contain thousands of lines of code. Constant saving, backup of files, deletion of code fragments, insertion of new ones force us to maintain precise control over the project source code in order not to lose the already existing and proven ones. You have to write in a text file or on paper the stages of development and testing of individual parts of the system, perhaps even writing versions of files. Perhaps this is convenient ... but not for long - there are moments when manual control of the code becomes physically impossible due to its size. This is where the SVN version control system comes to the rescue. You can start reading here: ru.wikipedia.org/wiki/SVN . And Trac is just a convenient web interface for even more convenient control over your project. You can start looking at Trac from here: ru.wikipedia.org/wiki/Trac

In principle, there are a lot of manuals for installing SVN + Trac and they all offer different ways - I decided to present one of them. The main goal of this topic is to install the TracWebAdmin plugin - having rummaged through the internet I did not find a single FULL mana for installing this feature. Also this topic is a logical continuation of my previous topic. Installing and configuring Apache2 + PHP5 + MySQL + XDebug & Eclipse + PDT + XDebug in Ubuntu 7.10 .
Let's start with ...

Subversion and Trac Installation

1. Put trac, python and subversion:
# apt-get install trac libapache2-svn subversion python-subversion libapache2-mod-python
2. Turn on the python module:
# a2enmod python

Subversion setup

1. Create a group to work with SVN:
# groupadd svn
2. Add yourself (your username in Ubuntu) to the svn group:
# usermod -a -G svn _
3. Add apache to the svn group:
# usermod -a -G svn www-data
4. Create a folder for the future repository:
# mkdir /var/svn
5. Create a repository:
# svnadmin create /var/svn
6. Change the rights to the folder for access to users from the svn group:
# chown -R www-data:svn /var/svn
7. We allow the group and owner to write:
# chmod -R g+ws /var/svn
8. Create a password to access the repository folder, which will later be used by apache:
# htpasswd -c -m /etc/apache2/svn.htpasswd _
9. Now create a rule for Apache to access the svn repository:
# nano /etc/apache2/conf.d/svn
<Location "/svn">
DAV svn
SVNPath /var/svn
AuthType Basic
AuthName "SVN Repo"
AuthUserFile /etc/apache2/svn.htpasswd
Require valid-user
</Location>

10. Restart Apache:
# service apache2 restart
11. SVN is installed! It is available at localhost / svn
')

Trac Setup

1. Create a folder for Trac:
# mkdir /var/trac
2. Create an environment for working with Trac SVN:
# trac-admin /var/trac initenv
3. Change the rights to the folder with trac'om:
# chown -R www-data:svn /var/trac; chmod -R g+ws /var/trac
4. Create a password for admin access to the folder with trac that will later be used by apache:
# htpasswd -c -m /etc/apache2/trac.htpasswd _
5. Create a rule for Apache to access the trac:
# nano /etc/apache2/conf.d/trac
<LocationMatch "/trac/login">
AuthType Basic
AuthName "Projects"
AuthUserFile /etc/apache2/trac.htpasswd
Require valid-user
</LocationMatch>
<Location /trac>
SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /var/trac
PythonOption TracUriRoot /trac
</Location>

6. Trac is installed! It is available at localhost / trac

Install TracWebAdmin plugin

Starting with Trac 0.11, the TracWebAdmin plugin is integrated into the kernel and no additional gestures are required for installation. Now the stable version is considered 0.12.
1. Add yourself to the trac admins:
# trac-admin /var/trac permission add _ TRAC_ADMIN

yoreeq don't hit hard plz;)
The installation of Trac + SVN was taken from here: habrahabr.ru/post/20525

UPD [03/18/2012]: The article is updated in order to keep up with the times :)

Source: https://habr.com/ru/post/26117/


All Articles