Reference: http://www.blogjava.net/zhouf/articles/251476.html
Http://www.cnblogs.com/thinksasa/archive/2013/04/10/3012215.html
I built the SVN standalone server on the CentOS server two days ago, why is it independent? Because there are two ways to build the SVN server, one is to put SVN on Apache, and the other is a separate SVN server, is usually seen through the svn://way access, such as Svn://192.168.1.100/repos. Both ways have pros and cons, the latter generally because of the local area network more.
Let's get down to the chase.
1. Installation
#yum Install Subversion -v 1.6. One /opt/svn//opt/svn/Repos executes the above command, automatically creates multiple files under Repos, conf, db,format,hooks, locks, README.txt, respectively.
2. Configuration
The above operation is very simple, a few commands will be done, the following operation is not difficult.
Go to the above generated folder conf, configure it, there are several files Authz, passwd, svnserve.conf
Where Authz is the permission control, you can set which users can access which directories, passwd is to set the user and password, Svnserve is to set up SVN-related operations.
2.1 Set passwd First
== Sallyssecrethello=123 user name = password
So we set up a hello user, 123 password
2.2 Set permissions again Authz
[/]hello= RW
This means that the Hello user has read and write access to all directories, but can also be qualified.
If you use it yourself, read it directly.
2.3 Final Setting snvserv.conf
Anon-access = None # makes unauthorized users inaccessible auth-access = Write # gives authorized users write permissions password-db = Passwordauthz-db = Authz =/opt/svn/repos # Authentication namespace, Subversion is displayed in the authentication prompt and as a keyword for credential caching.
The default configuration is used. All of the above statements must be shelf written, the left cannot be blank, or an error will occur.
Well, with the above configuration, your svn will be OK.
3. Connection
Start svn:svnserve-d-r/opt/svn/repos
If you already have SVN running, you can run it on a different port.
3391
-d means running in daemon (background run)
-r/svndata specifies that the root directory is/svndata
So that the same server can run multiple Svnserver
OK, after the successful launch, you can use it.
TORTOISESVN is recommended, the connection address is: SVN://Your server address (if the port is required to add ports to the specified ports : port number)
Shutting down the SVN server
# Killall Svnserve
After the connection can upload the local files, effectively manage your code.
Through the above three steps, you can quickly build up SVN, open your project, if you feel useful, please leave a message, thank you for your support.
Check if SVN started successfully: (see if the svnserve process exists)
Ps-ef|grep Svnserve
attached: The following is a random toss a small script to manage the server's startup, restart, stop and other operations
+x SVN
#!/bin/Bash
Case " $" inchstart) Svnserve-d-r/Svndata Svnport= ' NETSTAT-NATP | grep Svnserve | Awk-f:'{print $4}'| Awk'nr==1'` if[$svnport-eq3690] then echo"SVN Server already runnning. port:3690" ElseEcho"SVN Server Does not Start"fi;; Reload) Svnport= ' NETSTAT-NATP | grep Svnserve | Awk-f:'{print $4}'| Awk'nr==1'` if[$svnport-eq3690] then Killall svnserve&& svnserve-d-R/Svndata Echo"Reload OK" ElseEcho"SVN Server is not Running"fi;; Stop) Killall Svnserve echo"SVN Server has Been Stopped";; Status) Svnport= ' NETSTAT-NATP | grep Svnserve | Awk-f:'{print $4}'| Awk'nr==1'' PID= ' PS aux | grep Svnserve | Grep-v"grep"| Awk'{print $}'` if[$svnport-eq3690] then echo"SVN Server (PID: $pid) is running ..." ElseEcho"SVN Server stops running ..."fi;;*) echo"$0:usage: $ {start|status|stop|reload}"Exit1;; Esac
All right, here we go, with my qq:119658306.
Welcome everybody to discuss study together!
General Linux under Installation configuration SVN standalone service