There are many guides and plenty of help on the net to help you setup such a system. The easiest way is to YUM it.
yum --enablerepo=rpmforge trac
But that's not it, you need to do the following post-installs.
Initialize a Trac project for your new repository
trac-admin /var/trac/project_name initenv
From there you will enter the trac-admin commands. Use the defaults if not sure.
File permissions
chown -R apache.apache /srv/svn/project_name
chown -R apache.apache /var/trac/project_name
If you don't like the location, edit the /etc/httpd/conf.d/trac.conf.
Subversion
vim /etc/httpd/conf.d/subversion.conf
Add the following directive:
<Location /svn>
DAV svn
SVNParentPath /srv/svn
AuthType Basic
AuthName "My SVN Repository"
AuthzSVNAccessFile /srv/svn/svn-acl-conf
AuthUserFile /srv/svn/.htpasswd
Require valid-user
</Location>
Add a repository user
touch /srv/svn/.htpasswd
htpasswd -m /srv/svn/.htpasswd username
Create the Access Control List for the SVN Repository
vim /srv/svn/svn-acl-confAdd the following directives:
[project_name:/] username = rwWhere username represents the username of the repository user you created earlier.
Trac Config
vi /etc/httpd/conf.d/trac.conf
Edit this line:
AuthUserFile /srv/svn/.htpasswd
Give admin permissions to the Trac user you just created:
trac-admin /srv/trac/project_name permission add username TRAC_ADMIN
Where username represents the trac user you just added in htpasswd.
Restart Apache
service httpd restart
You should now have http://server/svn/
Resources
- The last part of CentOS HowTos: Subversion will give you a quick introduction on how to use SVN.
- Subversion setup guides: here and here
- Trac setup guides: here and here.
- Setting up CentOS 5.0
沒有留言:
張貼留言