First partJust want to note that this article does not claim credibility - I did everything for the first time on a remote Linux machine. Accordingly, I ask you not to kick too much, but rather to make comments - how something could be done differently, or tips on tuning. All of the following was done on manuals from Google.
With Subversion and Trac I had to suffer - I’ll write here the final one, which earned the option.
')
UPD: It is recommended to first try to install from the repository, specifying the
appropriate sourceapt-get install subversion
Subversion - guided
mainly by this .
apt-get install apache2-threaded-dev # apxs2
apt-get install libapache2-svn python-subversion libapache2-mod-python
a2enmod mod_python # , -
Swing and set Subversion - fresh
cd /tmp
wget subversion.tigris.org/downloads/subversion-1.5.0.tar.bz2
bunzip subversion-1.5.0.tar.bz2
tar -xvf subversion-1.5.0.tar.bz2
cd subversion-1.5.0
./configure --with-apxs=/usr/bin/apxs2
make
make check #
make install
This is where the Subversion installation ends (yes, everything is very simple), and its configuration begins.
When installing svn, I had to swear that I would not write anything in httpd.conf - this is for the best.
We will do everything by hand.
cd /etc/apache2/mods-available
echo "LoadModule dav_svn_module /usr/lib/apache2/modules/mod_dav_svn.so" > dav_svn.load
echo "LoadModule authz_svn_module /usr/lib/apache2/modules/mod_authz_svn.so" > authz_svn.load
Check if svn has installed such modules when installing. If not, they are located in the /tmp/subversion-1.5.0/subversion/ folder - in the appropriate directories.
Resolve them in Apache
cd ../mods-enabled
ln -s ../mods-available/dav.load
ln -s ../mods-available/dav_svn.load
Then we go to apache2.conf and insert the following there (at the end):
<VirtualHost *>
ServerName svn.yourdomain.com
DocumentRoot /var/svn
ServerAdmin svn@youdomain.com
ErrorLog /var/log/apache2/svn-error.log
CustomLog /var/log/apache2/svn-access.log combined
<Location />
DAV svn
SVNPath /var/svn
SVNIndexXSLT "/svnindex.xsl"
AuthType Basic
AuthName "Your Domain's Subversion Repository"
AuthUserFile /etc/apache2/svn.htpasswd
Require valid-user
Then we go to /etc/nginx/nginx.conf and write the section for the created subdomain there - how to do it - described in the previous article. You can remove everything from file exceptions - otherwise the source code of the files will not be displayed.
It remains to create the repository itself.
mkdir /var/svn
svnadmin create /var/svn
chown -R www-data:www-data /var/svn
And the password!
cd /etc/apache2/
htpasswd -c svn.htpasswd yourname
/etc/init.d/apache2 reload
Voila, - if you log in at svn.previously installed, you can log in and see SVN - then everything went well!
The only thing that I failed to overcome is
cd /tmp/subversion-1.5.0/tools/xslt
svn import svnindex.xsl svn.yourdomain.com/svnindex.xsl -m "Improved web interface."
svn import svnindex.css svn.yourdomain.com/svnindex.css -m "Improved web interface."
I wrote that the wrong protocol - here, as I understood it, is a problem on the kernel level. If someone helps, I will be very happy.
I had to do
cd /tmp/subversion-1.5.0/tools/xslt
svn import svnindex.xsl file:///var/svn/svnindex.xsl -m "Improved web interface."
svn import svnindex.css file:///var/svn/svnindex.xsl -m "Improved web interface."
SVN earned!
It remains to configure Trac!
I did not bother much and went
according to the instructions .
apt-get install build-essential # easy=install
easy-install Trac
As an option - you can do so
cd /tmp
wget ftp.edgewall.com/pub/trac/Trac-0.11.tar.gz
tar -xvf Trac-0.11.tar.gz
cd Trac-0.11
python ./setup.py install
Truck installed, now create a folder for it and the base.
Create a MySQL database “trac”. Then
mkdir /var/trac
trac-admin /var/trac initenv
As for MySQL, we specify instead of sqlite -
mysql://user:pass@host:port/trac
The trac base must be empty.
On the question about the path to svn - answer - / var / svn
If you did everything right, then Trac will tell us about it immediately.
Let's configure authorization to the Truck
htdigest -c .htauth realm username # realm - , username -
#
trac-admin /var/trac
# trac-admin
permission add username TRAC_ADMIN
It remains only to run trac!
tracd -p 8000 --auth=*,/var/trac/.htauth,realm /var/trac -s
Where realm is what you specified when creating a password, -s is a single-project, -p is port 8000, an asterisk is like any truck project. Like so.
Now when entering
your.ip.is.here : 8000 - voila - we have Trak in front of us!
Uh, like everything. I could forget any shoals that arose - I experimented a bit - write, I will try to answer and add.