You are on page 1of 3

Ci t Apache+Trac+Svn trn ubuntu Bn ubuntu mnh dng l 10.10 1. Ci t cc module cn thit , bao gm c apache bng apt-get.

sudo apt-get install apache2 libapache2-mod-python libapache2-svn python-setuptools subversion python-subversion 2. Dng easy_install ca python ci TRAC sudo easy_install http://ftp.edgewall.com/pub/trac/Trac-0.12.tar.gz thi im ny th bn 0.12 l bn stable . 3. To cc th mc , cu hnh , add user : sudo mkdir /svn sudo mkdir /trac sudo htpasswd -cm /etc/svnauth yourusername sudo htpasswd -m /etc/svnauth nextusername +To file /etc/svnaccess sudo vim /etc/svnaccess cc bn dng vi vim nano g cng c , localhost th dng gedit cng ch sao. Ni dung ca n kiu th ny . [groups] developers = yourusername, nextusername [ / ] @developers = rw * = r mc ch l to group v gn quyn developer th c v ghi cn * th ch c th c . + Cu hnh apache sudo vim /etc/apache2/sites-available/default thm vo <Location /svn> DAV svn SVNParentPath /svn AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/svnauth Require valid-user AuthzSVNAccessFile /etc/svnaccess </Location> <Location /trac> SetHandler mod_python PythonHandler trac.web.modpython_frontend PythonOption TracEnvParentDir /trac PythonOption TracUriRoot /trac AuthType Basic

AuthName "Trac" AuthUserFile /etc/svnauth Require valid-user </Location> Nh l trong th nh . to file trac.ini trong /etc/ ni dung : /etc/trac.ini [header_logo] alt = Logo height = -1 link = src = /logo.gif width = -1 Ci file logo l 1 file bt k lm logo hin th pha trn tay tri cu trac . ci ny cng khng cn thit lm . Nhng mun p th phi lm #!/usr/bin/perl $sName = $ARGV[0]; $lName = $ARGV[1]; if ($lName eq "") { $lName = $sName; } $sName =~ tr/A-Z/a-z/; $path = "sudo svnadmin create /svn/$sName"; system ($path); $path = "sudo chown -R www-data /svn/$sName"; system ($path); $path = "sudo trac-admin /trac/$sName initenv '$lName' 'sqlite:db/trac.db' 'svn' '/svn/$sName' --inherit=/etc/trac.ini"; system ($path); $path = "sudo chown -R www-data /trac/$sName"; system ($path); $path = "sudo trac-admin /trac/$sName permission add yourusername TRAC_ADMIN permission list yourusername"; system ($path); print "Done!\n\n"; script ny cc bn c th thng vo /trac t tn l create.pl chy perl /trac/create.pl ProjectName ProjectDESC nh thay cc tham s nh . truy cp vo d n : - trac : http://localhost/trac/ProjectName - svn : http://localhost/svn/ProjectName Done . . Vit script add project mi cho nhanh

You might also like