Showing posts with label SVN. Show all posts
Showing posts with label SVN. Show all posts

Trac and SVN install / configuration notes

0 comments


Installation:

# rpm -ivh  http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm

# yum install httpd subversion mod_python mod_dav_svn

# yum --enablerepo=rpmforge install trac

Instantiating svn:

# mkdir /var/www/svn

# svnadmin create /var/www/svn/project

Initial svn import:

# mkdir -p /tmp/newsvn/{trunk,tags,branches}

# svn import /tmp/newsvn file:///var/www/svn/project -m "Initial import"

# chown -R apache /var/www/svn/project

# chmod -R go-rwx /var/www/svn/project

Instantiating trac:

# mkdir /var/www/trac

# trac-admin /var/www/trac/project initenv

# mkdir /var/www/{.python-eggs,passwd}

# htpasswd -c /var/www/passwd/.htpasswd <adminuser>

# touch /var/www/passwd/svnauthz

# chgrp -R apache /var/www/trac/project

# chown -R apache /var/www/trac/project/{attachments,db,log,plugins}

# chown -R apache /var/www/{.python-eggs,passwd}

# chmod -R o-rwx /var/www/{trac/project,.python-eggs,passwd}

# chmod g+w /var/www/trac/project/conf/trac.ini

Install trac plugins:

# wget http://peak.telecommunity.com/dist/ez_setup.py

# python ez_setup.py

# easy_install http://svn.edgewall.com/repos/trac/sandbox/webadmin/

# easy_install http://trac-hacks.org/svn/accountmanagerplugin/0.10

# easy_install http://trac-hacks.org/svn/svnauthzadminplugin/0.10

trac.ini conf setup:

[trac]

default_charset=UTF-8

authz_file = /var/www/passwd/svnauthz

[components]

acct_mgr.admin.accountmanageradminpage = enabled

acct_mgr.api.accountmanager = enabled

acct_mgr.htfile.htpasswdstore = enabled

acct_mgr.web_ui.accountmodule = enabled

acct_mgr.web_ui.loginmodule = enabled

trac.web.auth.loginmodule = disabled

webadmin.* = enabled

svnauthz.* = enabled

[account-manager]

password_file = /var/www/passwd/.htpasswd

password_store = HtPasswdStore

Apache trac conf setup:

Alias /trac /var/www/trac

<Location /trac>

SetHandler mod_python

PythonInterpreter main_interpreter

PythonHandler trac.web.modpython_frontend

PythonOption TracEnvParentDir /var/www/trac

PythonOption TracUriRoot /trac

SetEnv PYTHON_EGG_CACHE /var/www/.python-eggs

</Location>

#<Location /trac/*/login>

#        AuthType Basic

#        AuthName 'Trac Server'

#        AuthUserFile /var/www/passwd/.htpasswd

#        Require valid-user

#</Location>

Apache subversion conf setup:

<Location /svn>

DAV svn

SVNParentPath /var/www/svn

# Limit write permission to list of valid users.

# <LimitExcept GET PROPFIND OPTIONS REPORT>

# Require SSL connection for password protection.

# SSLRequireSSL

AuthType Basic

AuthName 'Authorization Realm'

# Trac .htpasswd file used so users will be the same for both

AuthUserFile /var/www/passwd/.htpasswd

Require valid-user

AuthzSVNAccessFile /var/www/passwd/svnauthz

#</LimitExcept>

</Location>

Trac privileges:

# trac-admin /var/www/trac/project permission add admins TRAC_ADMIN

# trac-admin /var/www/trac/project permission add <adminuser> admins

# trac-admin /var/www/trac/projectname permission remove anonymous TICKET_CREATE TICKET_MODIFY etc...

# track-admin /var/www/trac/project permission add devs BROWSER_VIEW CHANGESET_VIEW FILE_VIEW LOG_VIEW        \

MILESTONE_CREATE MILESTONE_VIEW REPORT_CREATE REPORT_MODIFY REPORT_SQL_VIEW REPORT_VIEW  \

ROADMAP_VIEW SEARCH_VIEW TICKET_APPEND TICKET_CHGPROP TICKET_CREATE TICKET_MODIFY \

TICKET_VIEW TIMELINE_VIEW WIKI_CREATE WIKI_MODIFY WIKI_VIEW

Login as the admin user and setup Trac plugins, permissions etc...

How to install subversion client on a Linux server?

1 comments
Svn(subversion) is used to maintain current and historical versions of files such as source code, web pages, and documentation. Its goal is to be a mostly-compatible successor to the widely used Concurrent Versions System (CVS).

It is very easy to install subversion client on linux OS using yum. You can us following command to install subversion client.
root@server [~]# yum install subversion

while installing subversion if you are getting following error  then it seem sot be perl-URI package is not installed on your server so you will have to install first before installing subversion client.

Please follow the following steps to install perl-URI package

You’ll login via SSH as root and run this command:
root@server [~]# yum install subversion

and then you may get this error:
Error: Missing Dependency: perl(URI) >= 1.17 is needed by package subversion

Here’s what you do next (copy/paste):
root@server [~]# wget  ftp://ftp.pbone.net/mirror/archive.fedoraproject.org/
fedora/linux/releases/7/Everything/i386/os/Fedora/
perl-URI-1.35-3.noarch.rpm


root@server [~]# rpm -i perl-URI-1.35-3.noarch.rpm

root@server [~]# yum install subversion

Installed: subversion.x86_64 0:1.4.2-4.el5 subversion.i386 0:1.4.2-4.el5

Dependency Installed: neon.x86_64 0:0.25.5-10.el5 neon.i386 0:0.25.5-10.el5

Complete!

That’s it subversion client is successfully installed on your server you can check it using following command.
root@server [~]#svn --version
svn, version 1.1.4 (r13838)
compiled Aug 21 2005, 20:56:55

Copyright (C) 2000-2004 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
- handles 'http' schema
- handles 'https' schema
* ra_local : Module for accessing a repository on local disk.
- handles 'file' schema
* ra_svn : Module for accessing a repository using the svn network protocol.
- handles 'svn' schema