Install a simple SVN Server yourself
Frankly speaking, i haven’t constructed such an svn server before.
After searhing and getting help from Internet, I finished this target this morning by the following steps:
1). Download SVN server file and unzip to anywhere you prefer.
The file i used is the latest version: svn-win32-1.5.6.zip
2). Add its bin directry into PATH environment veriable
Once finished, type ’svn’ command in DOS or terminal to test the installation and settings.
3). Now, let’s create a new project
svnadmin create D:\repository\myproject
4). Configure our new project
After myproject was created successfully, you will find several files and folders created in it.
In conf folder, there are three files – authz, passwd, svnserve.conf – listing.
– svnserve.conf: the main entry for your project configuration.
In general section, set:
anon-access = none ## anonymous users are not allowed to access
auth-access = write ## authenticated users have write privilege.
password-db = passwd ## use the default password file, i.e. passwd file
authz-db = authz ## use the default authorization file, i.e. authz file
realm = myproject ## which realm to be protected. Here is our new project, i.e. myproject
–passwd: the user accounts are stored here
We will add two users for demonstration, harry and sally. You can just uncomment the existing lines.
harry = harryssecret ## harry is the user login name, harryssecret is his password.
sally = sallyssecret
–authz: authorization for the users
We make harry become a developer, sally is an observer only.
[groups]
developers = harry
Then we grant the permissions for them.
[myproject:/]
@developers = rw
sally= r
5). Now, the configuration was finished, so lets start the svn server
svnserve -d -r D:\repository --listen-port 9000
6). Check out our new project
svn co svn://ip|host:9000/myproject myproject --username harry --password harryssecret
You can also make svn server as a windows service:
sc create svn binpath= "[yoursvnfolder]\bin\svnserve.exe --service -r D:\repository --listen-port 9000" displayname= "Subvsersion Server Service" depend= Tcpip start= auto
If you want to reconfigure:
sc config svn binpath= "[yoursvnfolder]\bin\svnserve.exe --service -r D:\repository --listen-port 9000" displayname= "Subvsersion Server Service" depend= Tcpip start= auto
Note: There is a space after each ‘=’ symbol.
P.S. svn server can be integrated with http server wonderfully, so that all svn files can be accessed via http protocol. But this is out of the scope of my article, because I already said I just want a simple svn server
.
Categorized in: Uncategorized · Tagged with: SVN



(