i see that all the directories in the repository are owned by root.
This is
most likely why i cannot write to them. What user do i change the
ownership
too? Why did this happen to begin with. I followed these instructions:
- wget the needed RPM files:
Code:
wget
http://summersoft.fay.ar.us/pub/subversion/latest/redhat-9.0/bin/subversion-1.3.0-1.rh90.i386.rpm
wget
http://summersoft.fay.ar.us/pub/subversion/latest/redhat-9.0/bin/apr-0.9.5-0.2.i386.rpm
wget
http://summersoft.fay.ar.us/pub/subversion/latest/redhat-9.0/bin/apr-util-0.9.5-0.1.i386.rpm
wget
http://summersoft.fay.ar.us/pub/subversion/latest/redhat-9.0/bin/neon-0.24.7-1.i386.rpm
- install them with rpm:
Code:
rpm -Uvh apr-0.9.5-0.2.i386.rpm
rpm -Uvh apr-util-0.9.5-0.1.i386.rpm
rpm -Uvh neon-0.24.7-1.i386.rpm
rpm -Uvh subversion-1.3.0-1.rh90.i386.rpm
- Did it work?
Code:
svn --version
svn, version 1.3.0 (r17949)
compiled Jan 2 2006, 17:22:43
Yay! We have subversion installed. Now to add it to xinetd so that it
starts in inetd mode automatically. First, we’ll add a login for xinetd
to
run svnserve as:
Code:
adduser svnadmin
passwd svnadmin
Next, we’ll add the ports that xinetd is to forward to svnserve, in
/etc/services.
Code:
vi /etc/services
(I like vim, you can use pico or emacs or nano or whatever text editor
it
is that you like) and add the following two lines at the bottom:
Code:
svnserve 3690/tcp #subversion
svnserve 3690/udp #subversion
Save and quit. Next, we’ll add the xinetd script. Create the file with
Code:
touch /etc/xinetd.d/svnserve
and then edit it with your favorite editor. With vi, it would be
Code:
vi /etc/xinetd.d/svnserve
Paste this into the file:
Code:
default: on
Subversion server
service svnserve
{
socket_type = stream
protocol = tcp
user = svnadmin
wait = no
disable = no
server = /usr/bin/svnserve
server_args = -i -r /home/svnadmin
port = 3690
}
Awesome. Now xinetd knows to start svnserve in inetd mode whenever
someone
connects to port 3690. Next, let’s reload xinetd:
Code:
kill -SIGUSR2 cat /var/run/xinetd.pid
Next, let’s make sure xinetd is listening for 3690:
Code:
netstat -anp | grep LISTEN | grep 3690
If you get nothing, you messed up one of the steps above. If you get a
line
that looks like this:
Code:
tcp 0 0 0.0.0.0:3690 0.0.0.0:*
LISTEN 7136/xinetd
Then you are in business. Now to set up svnserve. First, let’s create a
repository using the svnadmin program (not to be confused with the
svnadmin user):
Code:
svnadmin create /home/svnadmin/mysvnrepo
Next, let’s set up the credentials for users connecting to it:
Code:
vi /home/svnadmin/mysvnrepo/conf/svnserve.conf
paste in the following:
Code:
[general]
anon-access = none
auth-access = write
password-db = passwd
realm = My Code Repository
Save and quit. Next, let’s create some users. Go into the svnserve
passwd
file to do it:
Code:
vi /home/svnadmin/mysvnrepo/conf/passwd
Here is an example of what to do. The format is user = password:
Code:
[users]
Jane = mycat’sname
Harry = i’msuchasexystud
I certainly hope you’ll use much better passwords than that
Finally, to make sure everything works, install Subversion and
TortoiseSVN,
right click on your desktop, click TortoiseSVN->Browse Repo, and put in
Code:
svn://mydomainname.com/mysvnrepo